Hi - I'm in the process of setting-up a site for a customer. They sell in the UK and overseas and currently have a simple way of calculating the shipping - £2.50 if the address is in the UK, £6.50 if it is anywhere else.
I've looked to see if it's possible to emulate this using Foxycart but have so far just managed to confuse myself. Is this something it's possible to do? (I'd be happy if it's possible but not straightforward btw.)
Many thanks,
Gordon
This is definitely possible, but is would require some custom JavaScript in your checkout template. You can see a list of links to different shipping customizations here:
http://wiki.foxycart.com/v/0.6.0/docs/advanced/forum
This one, in particular, might be useful to you:
http://forum.foxycart.com/comments.php?DiscussionID=1441&page=2#Item_10
Lance
cheers,
Gordon
You can always call the updatePriceDisplay function when the page loads. This will cause your custom script to fire right away.
Lance
Gordon
I've whispered the site location to you (it's still in development at the moment).
cheers,
Gordon
Try changing this one thing:
Replace:
[code]
FC.checkout.updatePriceDisplay();
[code]
With:
[code]
FC.checkout.updateShipping(-1);
[code]
cheers,
Gordon
That's weird. It should be working fine. It looks like something isn't there on page load for some reason. Can you replace the updateMyShippingCost with this to work out what's going on?
cheers,
Gordon
Update: Adam, I've added in another alert so the last few lines of the function are reading -
and it looks like the FC.checkout.config.orderFlatRateShipping is being updated OK. It's what happens after this that isn't working quite right.
Further update: I've tried using firebug to spot what's going on but don't really know enough about what your code is doing to really be able to identify anything.
Maybe try replacing your overload to:
If that doesn't work, try adding this as the last line of the updateMyShippingCost function
And then change your document ready function to be this: