The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Flat rate shipping rules not consistently working

Hi Support,

Today I received the following information from my Customer Support team:

"I had a customer call earlier today and said it was charging $300.00 for shipping [Part # 726112]. I went on and tried and it said $100.00. Then I tried again later and it showed $300.00. It is still showing me $300.00, even though I have nothing else in my cart.. I asked Zack and Kevin to try and it is showing $100.00 for them."

This has never happened before and I haven't changed anything related to our shipping. Do you know what could be causing this? Could it be related to some orders not being charged shipping at all? (another issue we began experiencing at the end of August; I posted separately about this.).

Thanks!
Karen
Comments
  • fc_adamfc_adam FoxyCart Team
    @kmadler,

    Could you whisper me the store and the transaction information? I'll take a look and see if anything stands out here.
  • fc_jedfc_jed FoxyCart Team
    @kmadler

    I've replicated the issue, it does indeed return a $300.00 Standard Delivery. Actually, I tried changing the zip code a couple of time and it adds in increments of $100, I even reached a value of > $1000 for the shipping. It would seem like something in your custom code is referencing the current shipping cost and adds from there every time the checkout renders and the function get_shipping_cost() is called. Making sure that it resets the value back to 0 is the key thing to resolve this.
  • fc_adamfc_adam FoxyCart Team
    @kmadler,

    I just took a quick look - and Jed was spot on the money there. Try pulling the following code which you have at the top of your javascript block to be inside the get_shipping_cost() function instead:
    var extraShipping = 0;
    var free_shipping = false;
    var free_shipping_required_total = 100;
    var shipping_cart_total = 0;
    var display_freeship_minimum_notice = false;
    From your console logs it was extraShipping which was multiplying each time.
  • Hi Adam,

    Thanks so much for the follow up and direction. I have made this change and everything seems to be working as expected now.

    Thank you (and Jed) again!
    Karen
Sign In or Register to comment.