Link from script no longer adding the correct price to the cart

kanjigirlkanjigirl Member
in Help edited September 2013
Back in 2012 my programmer built a script to send the prices generated by choosing an option in a select box to the cart as part of the link, you can see it working here.

http://www.kontour.com/typefaces_axia_styles.html

If you choose a different option in the select menu on the right, see the prices in red change with the number of CPUS?

Before, the generated price was going to the cart. In the link it is the 'price=NUM' part:
<a href="https://secure.kontour.com/cart?name=Axia Collection (10 Styles) Open Type Desktop&price=NUM&category=Fonts&code=Axcomp15&quantity_max=1">add to cart</a>

If I choose the last option and click add to cart for the first product, then on the cart page, the price is right in the URL (9900) but in the cart itself, it shows as 330.00, which is the *first* option from the select menu.

https://secure.kontour.com/cart?name=Axia Collection (10 Styles) Open Type Desktop&price=9900&category=Fonts&code=Axcomp15&quantity_max=1&fcsid=1ilf3qfjmho3b427pp0m5rlqr0

So something about the way we're sending the price isn't getting there anymore. Please help?
Tagged:
Comments
  • fc_adamfc_adam FoxyCart Team
    @kanjigirl,

    As you're working with Downloadables - the details for that product is actually defined from within the FoxyCart administration. It's the one exception to how our add to carts work - but essentially with the downloadables, based on the product and category codes you pass in, the products name and price will be dictated. You'll need to find the product code you're working with in the administration for your store and edit it's price directly there.
  • This setup (about which I chatted with FoxyCart support several times as we were doing it) was working perfectly fine at launch in 2012, sending the generated prices for downloadable products directly to the cart.

    You're saying that something has changed, and that now we can't use this script to deliver generated prices to the cart anymore? We don't have one product/one price, we have one product that will have several prices based on the number of machines it will be used on, which is where the select box comes in.
  • fc_adamfc_adam FoxyCart Team
    @kanjigirl,

    Actually nothing has changed to my knowledge - as far as I'm aware, downloadables have always worked that way - that the price of a given downloadable was always set by the administration when you're using FoxyCart's inbuilt downloadables. The only way you could set it up like your describing would be to either have a downloadable for each price-bracket, or set up self-hosted downloadables which would allow you to define your price from within the add to cart link/form.

    There was a bug at one point where if you tried to modify the price of a downloadable using price modifiers, it would appear to work when added to the cart, but on a reload of the cart or on proceeding to the checkout, the product would revert to the price listed against the downloadable line item in the administration.

    Quickly looking over your transactions - I'm not seeing anything purchased that isn't the standard price for a given downloadable. Do you have any examples of where this has occurred in the past?
  • I don't know - it's not my business. When we first set this up, both I and my programmer both did testing where we went through each price option for each product and verified that the correct prices were showing up in the cart and in checkout. No question that it was working fine at launch all the way through

    So what do we need to do now? Are the only choices self-hosting the downloads or adding about 10x the current number of products to cover all the options and redoing all of the product pages and links, which is probably not going to be feasible? Can self-hosted downloads be anywhere, like at Amazon S3? Would we have to change anything about the add to cart links if we did that?
  • fc_adamfc_adam FoxyCart Team
    @kanjigirl,

    That's right - from what I understand of what you're wanting to do - those would be your two options.

    Using self-hosted downloadables, you can indeed host wherever you want to. The existing integration on our wiki is actually already set up for Amazon S3 - you can find that here: http://wiki.foxycart.com/integration - it has notes on how to set it up, but it's essentially pointing your stores datafeed to that script included in the integration, and making some changes to your categories, and configuring products in that database from the integration.
  • What if we alternatively added new product codes and prices to FoxyCart, and modified the script so that instead of the 'price=NUM' in the link, it modified the product code? Would the correct price, etc. be added to the cart as long as the product code was correct in the link?

    If that would work, which of these two options would you recommend - self-hosting vs. adding new products? I want to give my client the full extent of what this will take to do.
  • fc_adamfc_adam FoxyCart Team
    @kanjigirl,

    That would work as well.

    As to which approach I would suggest - well both would work fine, but both have their drawbacks. Maintaining the in-built downloadables functionality, you'd have to duplicate each new product 10 or however many times to match the different pricing on your page. If you add a new pricing tier for all of the products on your site, you'd then need to reupload each product again to add the additional tier.

    The self-hosted approach would give you the flexibility to use whatever pricing you need to from the add to cart, as well as apply product option modifiers for pricing if you needed to as well. The downside here is that it would require some initial development time to get set up - but would ultimately give you more flexibility.

    If time allows, I'd suggest the self-hosted approach, but either would work.
  • Thanks, I'll get in touch with my programmer and then will contact the client with the options.

    If she wants to use Amazon S3 for storing the downloadable files, we could create the database, config file, etc. described in the integration files on her shared hosting account, then link to the files at S3, yes?
  • fc_adamfc_adam FoxyCart Team
    @kanjigirl,

    I believe that is correct - you can see the details for the installation of the script on the wiki page to confirm.
Sign In or Register to comment.