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.

Variable Pricing based on options...

I would like to set up my product pages similar to the following link, though I would rather use a dropdown menu rather than buttons:

As you can see the price dynamically updates when you choose liquid or soft gel, 180 count, 120 count, 90 count, etc.

I only know basic CSS/HTML so I can program this myself? Does Foxy offer this option natively?
  • If I understand this snippet correctly my question is answered here:

    Anyone have a real world example or link using variable pricing?
  • fc_adamfc_adam FoxyCart Team

    You're spot on - that snippet will allow you to add a dynmically calculated total price to your product pages. You can use a select dropdown too, you'll include product option modifiers within the form to dictate how each option changes the price. For example:
    <select name="size">
    <option value="Small">Small</option>
    <option value="Medium{p+5}">Medium (+$5)</option>
    <option value="Large{p+8}">Large (+$8)</option>
  • Thanks Adam!

    Currently the script only shows the price. Would it be possible to amend the script to show other options as well automatically?

    For example:

    180 Count Bottle Retail Price: $24.95 Sale Price: $22.95

    Basically you would need to add a hidden variable that shows the retail price and you would need to pass on the option chosen in the drop down menu.

    I'd be THRILLED if someone could update the functionality of this script!
  • fc_adamfc_adam FoxyCart Team

    Thanks for reaching out. It wouldn't necessarily need to be part of the same script - but some additional javascript could help with that. It would rely on you being able to output the retail price with each of the different options on the page too - as I'm guessing you'd need a different retail price for each different bottle size?

    For the bottle size - that information could be retrieved from and updated whenever a change is detected for your size dropdown.

    If you've got a page set up where you have the product option modifiers set and that script in place that you could share with us, we can give you some direction then in how you could dynamically show that extra data too.
Sign In or Register to comment.