Spend X to get free shipping module



  • So, I have ported https://forum.thirtybees.com/user/daresh 's module gmgetfreeshipping to thirtybees!
    NOTE: Only use this module if you have backoffice>shipping>preferences> “free shipping starts at” greater than 0.

    Here is this original module…
    0_1509467555547_gmgetfreeshipping.zip

    Here is the new port for thirtybees…
    0_1509467600480_getfreeshipping.zip

    You will also need to do some theme mods… Here are mine already done…
    0_1509469142621_getfreeshipping_mods.zip
    NOTE: replace “your theme name” with your actual them name, like “community-theme-default”.

    Here are the manual instructs on how to do it…

    In <your theme name>\js\modules\blockcart\ajax-cart.js line# 717 you see:

    ajaxCart.refreshVouchers(jsonData);
    

    After add:

          ajaxCart.updateFreeShipping(jsonData);
        }
      },
    
      updateFreeShipping : function(cart) {
        if (cart.freeShippingFloat > 0) {
          $('.free_shipping_not_enough').removeClass('hidden');
          $('.free_shipping_float').text($.trim(cart.freeShipping));
        } else {
          $('.free_shipping_not_enough').addClass('hidden');
          $('.ajax_cart_shipping_cost').html(freeShippingTranslation);
    

    In /modules/blockcart/includes/dropdown.tpl you see line# 162-165 you see:

       </div>
    
        <div class="cart-buttons">
    

    Before add:

          <p class="free_shipping_not_enough {if $free_shipping <= 0} hidden{/if}">{l s='Spend another' mod='blockcart'} <span class="free_shipping_float">{convertPrice price=$free_shipping}</span> {l s='to get free shipping for your order!' mod='blockcart'}</p>
    

    In /modules/blockcart/includes/popup.tpl you see line# 127-129 you see:

          <div class="button-container">
            <nav>
              <ul class="pager">
    

    Before add:

          <div class="layer_cart_row">
            <p class="free_shipping_not_enough {if $free_shipping <= 0} hidden{/if}">{l s='Spend another' mod='blockcart'} <span class="free_shipping_float">{convertPrice price=$free_shipping}</span> {l s='to get free shipping for your order!' mod='blockcart'}</p>
         </div>
    
    

    Of course this is all based off of…https://www.prestashop.com/forums/topic/494147-free-module-spend-x-to-get-free-shipping/

    you can see it running at http://thirtybees.paganliving.net. Pick a low priced item like in Candles>Chime Candles.



  • Nice, thanks for sharing!

    It is something I should be adding to my store one day.



  • Yeah it’s a great module, as long as you have free shipping set > 0, if not, it screws up the cart dropdown



  • Actually those template changes utilize data already present in Prestashop, nothing added by the module. All that this module does is displaying the same info under the cart. So if you want to optimize those messages, you need to work on the template.



  • Here is my version of how to do it from a non-programmer viewpoint and with help from my theme developer:

    Transformer theme (PS 1.6 version)

    How to edit the text and how to move the “spend another $xx.xx to get free shipping” to go under the cart total:

    /public_html/modules/gmgetfreeshipping/views/templates/hook

    Back up and then edit gmgetfreeshipping.tpl as you wish.

    I changed it to show: Spend $xx.xx more for Free Shipping!

    The text was originally left-justified (all the to the left) so for the Transformer theme, Jonny Li said:

    Do these two steps:

    1. Put this code to the “Custom CSS Code” field

    #HOOK_SHOPPING_CART .block_get_free_shipping{text-align:right;}

    1. Go to BO > Modules > Positions > page, change the sort order of modules in the “displayShoppingCartFooter” section to move that text above.

    In other words: slide the whole “get free shipping” module up in the positions for displayShoppingCartFooter (using the arrows did not work for me).

    0_1510149147976_XF theme - slide the get free shipping module up in the positions displayShoppingCartFooter.jpg



  • @wakabayashi since you helped me move my Amazon Pay button once before, can you please help with this? Or @Daresh can you please help with this?

    I need a space or two between “spend XX for free shipping” and the amazon pay button:

    0_1510149412038_need a space or two between spend XX for free shipping and the amazon pay button.jpg



  • Are you using my getfreeshipping port, or the authors original, gmgetfreeshipping? Nevermind, I can tell by the logo you are using the original. 🙂 You need to copy the /modules/gmgetfreeshipping/views/templates/hook/gmgetfreeshipping.tpl, to the same path but in you <your theme>modules folder. Then open gmgetfreeshipping.tpl, and add a <br /> after the last </p>.



  • @SLiCK_303 I used the original since I already had it before and didn’t want to get confused.

    I’ll move this: /public_html/modules/gmgetfreeshipping

    to /public_html/themes/transformer/modules

    Right?



  • no there is already a /modules/gmgetfreeshipping/views/templates/hook/gmgetfreeshipping.tpl. you need to copy that file into the same path, but in your theme. So, if you are using the default theme, there should be a /themes/community-theme-default/modules/gmgetfreeshipping/views/templates/hook/gmgetfreeshipping.tpl file



  • No, there is no gmgetfreeshipping at all in the Transformer theme, which is why I just updated in /public_html/modules/gmgetfreeshipping



  • copy it there…



  • not /modules/gmgetfreeshipping…just that one file



  • No folder there at all



  • I don’t know how many ways I can say this. Copy /modules/gmgetfreeshipping/views/templates/hook/gmgetfreeshipping.tpl. you need to copy that file into the same path, but in your theme. So, if you are using the default theme, there should be a /themes/Transformer/modules/gmgetfreeshipping/views/templates/hook/gmgetfreeshipping.tpl file



  • OK, in other words, keep the /public_html/modules/gmgetfreeshipping folder where it is, but just copy the one template file?



  • right



  • ok it’s going to be all by itself there. poor thing.



  • hehe



  • it needs to be in that whole path though, not in the themes root



  • In this path: /public_html/themes/transformer/modules right?


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.