Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Free Shipping Options (freeoptions) and Rewards

    Hello everyone,

    I'm having a bit of an issue with the way freeoptions works and I really need some help.

    I offer free shipping regardless of the product categories in the cart, to orders over $100. We also have implemented a Rewards Program that gives the customer points for every purchase that can be used to pay for future purchases (discount).

    The problem is when the value of the reward points and the freeoptions are used together.

    Say for example a customer has $100 worth of products in the cart, which qualifies him for free shipping, but he also uses the equivalent of $15 in reward points which discounts the subtotal for the order. As it is right now, the customer can still get free shipping even though the order has a discount of $15 and the total it's below the $100 minimum mark.

    Is there any way to make freeoptions work with the total for the order rather than the subtotal??

    Thanks in advance for the help =)

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Free Shipping Options (freeoptions) and Rewards

    What are the sort-orders for your active Modules->Order Total? Specifically, is the sort-order for Reward Points less than that for Shipping?

    If not, perhaps making that change would allow the Reward Points module to do its calculations prior to those for Shipping and the issue might sort itself out.

  3. #3
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Free Shipping Options (freeoptions) and Rewards

    Hi lat9,
    I have ot_shipping at 200 and ot_rewardpoints at 900.
    I've played with the sort order and has no effect on it though. Free shipping still applies regardless of.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Free Shipping Options (freeoptions) and Rewards

    Quote Originally Posted by mvstudio View Post
    Hi lat9,
    I have ot_shipping at 200 and ot_rewardpoints at 900.
    I've played with the sort order and has no effect on it though. Free shipping still applies regardless of.
    I've not used the Reward Points module, so I'm kind of "shooting in the dark" here, but if you want to have Free Shipping as the only shipping option for those orders > $100.00, you could configure the ot_shipping module to (a) allow free shipping and (b) set free shipping for orders over $100.00. If you do that, you'll want to remove/uninstall the freeoptions shipping method.

  5. #5
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Free Shipping Options (freeoptions) and Rewards

    Unfortunately ot_shipping with free shipping wouldn't work at all. It has its limitations when it comes to the weight of the package. We wouldn't be able to offer free shipping on a freight order for example.

    The Free Shipping Option (ground shipping using the freeoptions) is offered additionally other shipping options (priority, express, fedex, etc.) based on (I was hopping) the order total and the weight of the package. I don't want to force customers a shipping option that's by definition the cheapest and the lowest (most of the time) when they can very well opt for a faster one or have their orders delivered overnight if they wish to do so even if that costs more. To me the option must always be with the client to select what works for them.

    I'm trying to figure out if there is a way to change the way freeoptions calculates the total for the order or at least include a statement that if certain plugin is selected (like coupons or rewards) that modifies the order total, the a recalculation must take place. But my limited knowledge of PHP is kicking me in the face right now lol!

  6. #6
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Free Shipping Options (freeoptions) and Rewards

    I was able to work something else which accomplishes the same result. Sort of.

    For anyone interested...

    In includes/templates/YOUR_TEMPLATE/template/tpl_checkout_confirmation_default.php

    locate this
    PHP Code:
    <div class="buttonRow"><?php echo TEXT_CONTINUE_CHECKOUT_PROCEDURE?></div>
    <div class="buttonRow confirm-order"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDERBUTTON_CONTINUE_CHECKOUT_CONFIRMATION_ALT'name="btn_submit" id="btn_submit"') ;?></div>
    <div class="buttonRow"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE?></div>
    and replace for this
    PHP Code:
    <!-- bof disable checkout button on orders less than $100 -->
    <?php
    if (!IS_ADMIN_FLAG) { 
      global 
    $order
      if (
    $order->info['total'] < 100) { 
        echo 
    '<p style="text-align: center;border: 3px solid #777777; padding: 10px 0;"><strong>Your order does not qualify for Free Shipping at this time.</strong><br /><strong>Please go back to select another shipping option or add additional items to the shopping bag to meet the minimum order to qualify for free shipping.</strong></p>'
      } else {
    ?>
    <!-- eof disable checkout button on orders less than $100 -->

    <div class="buttonRow"><?php echo TEXT_CONTINUE_CHECKOUT_PROCEDURE?></div>
    <div class="buttonRow confirm-order"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDERBUTTON_CONTINUE_CHECKOUT_CONFIRMATION_ALT'name="btn_submit" id="btn_submit"') ;?></div>
    <div class="buttonRow"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE?></div>

    <!-- bof disable checkout button on orders less than $100 -->
    <?php } } ?>
    <!-- eof disable checkout button on orders less than $100 -->
    What this code does is prevent placing the order by hiding the checkout button if order is less than $100. A message appears in place of the button with instructions to select another shipping option or add more products to the shopping cart. Maybe not the best or the most elegant solution but it works.

  7. #7
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Free Shipping Options (freeoptions) and Rewards

    I made a change for it to work only if freeoptions is selected. My knowledge of php is very limited, so please feel free to correct/fix the code if it's ugly or needs to be improved.

    PHP Code:
    <!-- bof disable checkout button on orders less than $100 and if freeoptions is selected  1 of 2 -->
    <?php
    if (!IS_ADMIN_FLAG) { 
      global 
    $order
      if ((
    $order->info['total'] < 100) && is_object ($freeoptions)) { 
        echo 
    '<p style="text-align: center;border: 3px solid #777777; padding: 10px 0;"><strong>Your order does not qualify for Free Shipping at this time.</strong><br /><strong>Please go back to select another shipping option or add additional items to the shopping bag to meet the minimum order to qualify for free shipping.</strong></p>'
      } else {
    ?>
    <!-- eof disable checkout button on orders less than $100 and if freeoptions is selected  1 of 2 -->

    <div class="buttonRow"><?php echo TEXT_CONTINUE_CHECKOUT_PROCEDURE?></div>
    <div class="buttonRow confirm-order"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDERBUTTON_CONTINUE_CHECKOUT_CONFIRMATION_ALT'name="btn_submit" id="btn_submit"') ;?></div>
    <div class="buttonRow"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE?></div>


    <!-- bof disable checkout button on orders less than $100 and if freeoptions is selected  1 of 2 -->
    <?php } } ?>
    <!-- eof disable checkout button on orders less than $100 and if freeoptions is selected  1 of 2 -->

  8. #8
    Join Date
    Jul 2019
    Location
    Holyoke, MA
    Posts
    7
    Plugin Contributions
    0

    Default Re: Free Shipping Options (freeoptions) and Rewards

    Quote Originally Posted by mvstudio View Post
    I made a change for it to work only if freeoptions is selected. My knowledge of php is very limited, so please feel free to correct/fix the code if it's ugly or needs to be improved.

    PHP Code:
    <!-- bof disable checkout button on orders less than $100 and if freeoptions is selected  1 of 2 -->
    <?php
    if (!IS_ADMIN_FLAG) { 
      global 
    $order
      if ((
    $order->info['total'] < 100) && is_object ($freeoptions)) { 
        echo 
    '<p style="text-align: center;border: 3px solid #777777; padding: 10px 0;"><strong>Your order does not qualify for Free Shipping at this time.</strong><br /><strong>Please go back to select another shipping option or add additional items to the shopping bag to meet the minimum order to qualify for free shipping.</strong></p>'
      } else {
    ?>
    <!-- eof disable checkout button on orders less than $100 and if freeoptions is selected  1 of 2 -->

    <div class="buttonRow"><?php echo TEXT_CONTINUE_CHECKOUT_PROCEDURE?></div>
    <div class="buttonRow confirm-order"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDERBUTTON_CONTINUE_CHECKOUT_CONFIRMATION_ALT'name="btn_submit" id="btn_submit"') ;?></div>
    <div class="buttonRow"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE?></div>


    <!-- bof disable checkout button on orders less than $100 and if freeoptions is selected  1 of 2 -->
    <?php } } ?>
    <!-- eof disable checkout button on orders less than $100 and if freeoptions is selected  1 of 2 -->
    Hello!

    First of all, I would like to thank you for your contribution! I'm not a PHP developer either, but your ideas pointed me in the right direction.

    I did change your "if" statement to match our needs, so when the order is < $350 (our shop) AND the word "free" is present in the shipping method, it would display the warning. Otherwise, checkout would proceed as normal. It has worked out great for us.

    Code:
    if (($order->info['total'] < 350) && (stristr($order->info['shipping_method'], 'free', true))) {
    I also added a link to the shipping options page to the text, made the border one point thicker, and made it red.

    Code:
    echo '<p style="text-align: center;border: 4px solid #ff0000; padding: 10px 0;"><strong>Your order does not qualify for Free Shipping at this time.</strong><br><strong>Please <a href="index.php?main_page=checkout_shipping"><u>go back to select another shipping option</u></a> or add additional items to the shopping cart<br>to meet the minimum order to qualify for free shipping.</strong></p>';
    I still need to work with Ceon (we use Advanced Shipper) to make sure the free shipping option is not available if discounts bring the order below $350, but your contribution is a solid step in the right direction while that happens.

    Once again, thank you!

  9. #9
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Free Shipping Options (freeoptions) and Rewards

    Quote Originally Posted by monarchacct View Post
    Hello!

    First of all, I would like to thank you for your contribution! I'm not a PHP developer either, but your ideas pointed me in the right direction.

    I did change your "if" statement to match our needs, so when the order is < $350 (our shop) AND the word "free" is present in the shipping method, it would display the warning. Otherwise, checkout would proceed as normal. It has worked out great for us.

    Code:
    if (($order->info['total'] < 350) && (stristr($order->info['shipping_method'], 'free', true))) {
    I also added a link to the shipping options page to the text, made the border one point thicker, and made it red.

    Code:
    echo '<p style="text-align: center;border: 4px solid #ff0000; padding: 10px 0;"><strong>Your order does not qualify for Free Shipping at this time.</strong><br><strong>Please <a href="index.php?main_page=checkout_shipping"><u>go back to select another shipping option</u></a> or add additional items to the shopping cart<br>to meet the minimum order to qualify for free shipping.</strong></p>';
    I still need to work with Ceon (we use Advanced Shipper) to make sure the free shipping option is not available if discounts bring the order below $350, but your contribution is a solid step in the right direction while that happens.

    Once again, thank you!
    So glad I could help and gave you the base to build up on it!

  10. #10
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Free Shipping Options (freeoptions) and Rewards

    This is what happens when one has no clue what one is doing.... So I ran into a big issue.

    The code I wrote now looks like this
    PHP Code:
    <!-- bof disable checkout button from displaying  -->
    <?php
    if (!IS_ADMIN_FLAG) { 
        global 
    $order$db;
          if ((
    $order->info['total'] < MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN) && (substr_count($_SESSION['shipping']['id'], 'freeoptions') !=0)) { 
      
        echo 
    '<div style="border: 3px solid #777777; padding: 10px 0;"><p style="text-align: center;"><strong>Your order no longer qualifies for Free Shipping.</strong></p>
        <p style="text-align: center;"><strong>The total for your order is below the minimum qualifying for Free Shipping.</strong></p>
        <p style="text-align: center;"><strong>Please head back to the - <a href="index.php?main_page=shopping_cart">SHOPPING BAG</a> - to increase the quantity of products in your bag, add more products or select 
        a different shipping option.</strong></p>'

        echo
    '<span id="opc-order-confirm"></span>';  
      } else {
    ?>
    <!-- eof disable checkout button from displaying  -->
    The code works fine and does what it needs to do, but if a customer uses a gift certificate to pay for order, and if order falls below the threshold (gift certificates lower the amount as if it was a matter of a discount), customer cannot checkout.

    How could I get the code to not be triggered when payment is in the form of gift certificate, partially or totally?

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Free Shipping Options freeoptions
    By jmberman in forum General Questions
    Replies: 5
    Last Post: 7 Jul 2018, 07:15 PM
  2. Rewards Points Module and rewards by friends (MLM)
    By DArnaez in forum General Questions
    Replies: 1
    Last Post: 15 Dec 2012, 07:25 PM
  3. v138a Force to show free shipping icon w/ freeoptions on
    By prettyodd in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 14 Dec 2012, 12:09 PM
  4. exclude a product or category from Free Shipping freeoptions
    By gotlogos in forum Built-in Shipping and Payment Modules
    Replies: 18
    Last Post: 14 Feb 2012, 01:05 AM
  5. Rewards Points Module and rewards by friends (MLM)
    By minshop.no in forum General Questions
    Replies: 0
    Last Post: 9 Sep 2008, 11:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR