Jump to content

(SOLVED) Free shipping only to appear after customer reach a certain level


Recommended Posts

Hello,

I am setting the free shipping option in order to reward my best customers of course. So the free shipping is for orders over 2000$.

But here my question comes, if someone orders a product for 100$ and he sees the text : amount remaining before free shipping : 1900$ is will probably make them feel bad. So i would like that text to appear only when customer order already for 1500$ then we could have the amount remaining is 500$ to get free shipping.

This would make more sense for my customers.

Please can you help me as to what code to edit in order to set this up.

Thank you!

Link to comment
Share on other sites

Change line 150 of shopping-cart.tpl in your theme's directory from:

{if $free_ship > 0 AND !$isVirtualCart}



to:

{if $free_ship > 0 AND $free_ship <= 500 AND !$isVirtualCart}



This will make it so the remaining shipping isn't displaying if it is more than $500.

Link to comment
Share on other sites

  • 4 months later...
Change line 150 of shopping-cart.tpl in your theme's directory from:

{if $free_ship > 0 AND !$isVirtualCart}



to:

{if $free_ship > 0 AND $free_ship <= 500 AND !$isVirtualCart}



This will make it so the remaining shipping isn't displaying if it is more than $500.



um, sorry. is this really NOT displaying if MORE than 500? shouldn't it be the other way around, only showing if >500? anyway, I don't get it. the idea behind it is so good that wanted to add it to my shop but results vary. Actually free shipping starts at 70 bucks and I do not want to have the remainder shown unless 50 bucks are reached. which one would be the correct 'logic' then? something like

{if $free_ship > 0 AND $free_ship > 50 AND !$isVirtualCart}



best
phil

Link to comment
Share on other sites

No, it is right. The variable $free_ship contains the amount remaining to get free shipping. When the amount remaining is greater than 0 and less than or equal to $500, then the message is displayed. Since the free shipping is $70 and you don't want the amount remaining shown until $50, you should use $70 - $50 = $20:

{if $free_ship > 0 AND $free_ship <= 20 AND !$isVirtualCart}

Link to comment
Share on other sites

{if $free_ship > 0 AND $free_ship <= 20 AND !$isVirtualCart}



Ok, makes sense. Will check it asap. In the meantime: is there another tpl which also uses this code? Asking because when playing around with your code snippet yesterday I sometimes saw the 'remaining' part in my cart summary and then also just before payment (possibly order step 1 and 5, respectively). Maybe it was my bad code. Or do I have to change it in more than one file?
Link to comment
Share on other sites

The "Remaining amount to be added to your cart in order to obtain free shipping" is in shopping-cart.tpl only, so you shouldn't see it only any page except the shopping cart summary.


rocky, I deleted the wording also on the shopping-cart.tpl but still see it in step 5 when I select the payment method. found out that the same line is also in the order-summary.tpl. just in case someone wonders...

phil
Link to comment
Share on other sites

PrestaShop doesn't come with an order-summary.tpl. Are you using a third-party checkout module?


Yes. You are right. I use GermaNext. Love it and don't want to miss it. It adds just another summary page right before the payment as this is a requirement by German law. Great addon. Just wasn't aware it add the code in their tpl again. Fixed now.

best
phil
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...