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.

custom sidecart not updating consistently

I have a somewhat customized sidecart implementation, using basically foxycart.jsonp.sidecart.js, but with the difference that I am loading the cart into a specific div and using my own sliding functionality to show/hide the cart. It all works great, sometimes. I am finding when I had products there are times when the sidecart doesn't update, looking at the console logs, it seems to be missing a call to render the cart include twig template after the product has been added. I can't figure out what is causing this to happen only some of the time and I also can figure out where I could add something so that I can force the re-rendering of the twig template.
Additionally, some of the add to carts are really slow and the "loading" style disappears even before the cart is updated.
Any ideas on where my issue might be? Whispering my dev site url.
  • fc_adamfc_adam FoxyCart Team

    Thanks for whispering those details. We'll take a look and get back to you as soon as we can!
  • Hi,
    I've switched to using the custom cart as recommend. What I would like to do is use your sidecart implementation for the cart, but inside my own sliding functionality, I don't want to fully rewrite my own JSON cart, I'd rather use the default code for that, but I want to customize the way the slide-in, slide-out would be done using my own js & css.
  • fc_adamfc_adam FoxyCart Team

    Good question. If it's ok with you, I'll follow up in the next couple days with some code to help you get started there.
  • That would be great, thank you!
  • Another part of this cart issue, we have some products that shipped and others that are not shipped, and others that are downloadable. As soon as a shippable product is added to the cart, then the "Ship to" sections are shown. If there were already non-shipping products in the cart, they all go under the Ship to: Me section. If new non-shipping products are added after the shipping products, then they appear to go into whichever was the most recent ship to section.
    So first example:
    1. I add a non-shippable ecard, (it shows in the cart w/out any "ship to" information)
    2. I add a shippable gift for Fred, it shows in the cart under the "Ship to: Fred" section and moves the gift from step 1 into a "Ship to: Me" section.

    Second example:
    1. I add a shippable gift for Fred, it shows in the cart under the "Ship to: Fred" section.
    2. I add a non-shippable ecard, it shows in the cart under the "Ship to: Fred" section.
    3. I add a shippable gift for Barney, it shows in the cart under the "Ship to: Barney" section.
    4. I add a downloadable pdf card, it shows in the cart under the "Ship to: Barney" section.

    Even if I remove the Ship to Fred and Ship to Barney gifts, the next new non-shipping gift I add will go into Barney because it was the last shipping I provided.

    Ideally, the gift categories without shipping would be in a "No shipping" section, but at the very least, would all be in the Ship to: Me section.
  • fc_adamfc_adam FoxyCart Team
    edited August 2015

    I tried to reproduce this on my 2.0 test store - but adding a shipto product for one user, then adding another product without a shipto name attached adds that second product to the "Me" shipto group - which indeed is the expected result for any products that don't include a shipto parameter.

    Looking at your form - I'm seeing the shipto field being maintained in the form no matter what option is selected in your dropdown. This means that when you add a product that doesn't explicitly make use of the multiship option - that field is still being submitted with the product. And as the multiship javascript pre-selects the last used shipto name, you're seeing subsequent products add to that shipto group.

    You'll want to ensure that either the shipto parameter is only submitted with the form when you're actually using it - or you clear out the shipto field depending on the users selection in the product dropdown to ensure it's cleared when it's not being used.

    Also - I haven't forgotten about your original request here, but I haven't had a chance to sit down and spec that out for you. I'll follow up again on that soon.
  • Ah, ok. I see that issue with clearing out shipto now, thank you for the help!

    Looking forward to your thoughts on the rest when you get a chance. Thanks!
  • fc_adamfc_adam FoxyCart Team

    Just quickly - could you let me know what different sliding sidebar javascript library you're wanting to make use of?
  • Also, no worries on the timing. I am out on Wed/Thurs this week, so that's fine. I do need to have a working FoxyCart 2.0 solution by the end of the month so that I can make the switch to 2.0 meet our timeline for our holiday campaign.
Sign In or Register to comment.