Jump to content

Shipping options not updating following an ajax cart update


Recommended Posts

This is a weird bug I came across recently whilst testing a new version of a shop upgraded from 1.5.6.1 to 1.6.1.6 and switching from a custom theme to bootstrape default.

 

Basically I have set up 3 shipping options, Local delivery set to Uk Zone, worldwide delivery set to all other zones and FREE delivery which kicks on when order over £50 on all zones

 

So if I have a cart that is to the value of < £50, I get the two shipping options. if I am signed in and have a uK address I get only the local delivery option, so far so good. If I then increase the quantity of an item in the cart or add another product so the value goes above £50 suddenly with some wonderful ajax magic  the shipping changes to FREE and the free option becomes available in shipping options of OPC

 

So far so good, this is like a dream in prestashop everything going as expected. Now if I go and remove something from the cart, the shipping value displayed in the cart goes back up to Local or worldwide rate...almost there I can see the finish line, but suddenly the FREE option is still available on the shipping options AGHHHHH

 

So someone can basically switch to the free option and not pay shipping even if their order goes back below the £50 ( I also noticed that the string Best and cheapest option gets appended at the end of the option

 

Anyone know why or what s going on here

 

Do I need to hook the delivery options to something associated with the ajax cart updating?

 

Thanks for any help anyone can offer

Link to comment
Share on other sites

UPDATE: THis seems to have resolved itself. I chanegd the FREE SHIPPING option to NOT BE FREE SHIPPING with the slider in the backoffice ( A bit conter intuative)

 

I then set a range with lower and upper limits from £50 - £1000000 (wishful thinking!!lol)

 

It now works exactly as I intended

 

So I am a bit confused as to what the FREE SHipping setting does, but hope this help someone else

Link to comment
Share on other sites

×
×
  • Create New...