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.

Add to cart button adds product twice, and name is incorrect

kanjigirlkanjigirl Member
in Help edited October 2012
In this page -

I'm using a link with a custom product option, at the bottom of the box on the right:

<a href=" Collection (10 Styles) Open Type Desktop&price=60&category=Fonts&code=Axcomp15&includes=Axia%20Light,%20Axia%20Light%20,%20Axia%20Regular,%20Axia%20Italic,%20Axia%20Bold,%20Axia%20Bold%20Italic,%20Axia%20Black,%20Axia%20Black%20Italic,%20Axia%20Stencil%20Light,%20Axia%20Stencil%20Black">Test Item - Axia Collection</a>

This is kind of working, but I have two questions:

1) It's adding the product twice, once with and once without the custom option (screenshot: - what you see is from 1 click of the add button, not two.

2) I have a name= option, but it's not using it, instead it's using the name associated with the code/downloadable product on Foxycart.

Please help?
  • fc_adamfc_adam FoxyCart Team

    I was just doing some testing on your page, and I got it to replicate duplicated products like you saw once, but then after that it only added a single product at a time.

    First things first, you're including two copies of jQuery which will interfere with things a little bit. I'd suggest removing the version of jQuery being included in the footer of your page which looks like this:
    <script src=""></script>;

    Next, it looks like you're not wanting to use the colorbox cart. If that's the case, you can switch your FoxyCart include from "foxycart.colorbox.js" to simply "foxycart.js". That will still keep the FoxyCart smarts on your page, but not use colorbox at all.

    As to your specific issue, this is related to an existing issue with downloadables currently not supporting product options. When you add the product to the cart, it appears to work fine as the product is built out from the add to cart request, but on a reload of the page the product is pulled from the server which has removed the product options from the product. If you're also adding that same product to the cart again, it will add the new product with product options, and the existing product won't have those product options so it will look like two products. We have this issue ticketed currently, but unfortunately for the moment your best bet would be to not use custom product options on downloadables.

    What I think you might be running into with the product appearing twice is that you're adding the product to the cart, removing it, and then pressing your browsers back button to get back to your add to cart page. In doing that, you'll have to go back through the add to cart page of your cart as well - which will actually add the product to your cart again, so by the time you get back to your product page the product will be in the cart already. Could that be the case there?
  • Thanks - I made these changes and removed the custom product option, seems to working fine.
  • fc_adamfc_adam FoxyCart Team
    @kanjigirl - awesome
Sign In or Register to comment.