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.

Product Options In The Cart


Firstly, thanks for FoxyCart, it's awesome.

My question is add to cart form has product options which look similar to this:

<select name="size">
<option value="1">Small</option>
<option value="2">Medium</option>
<option value="3">Large</option>

When I add to cart, the product options show the option value e.g. Size = 2

What can I do so that the name of the option appears instead? e.g. Size = Medium


  • AdeelAdeel Member
    edited April 2015
    Hi @joeBloggs,

    Try this.
    <select name="size">
    <option value="small">Small</option>
    <option value="medium">Medium</option>
    <option value="large">Large</option>
  • Hi Adeel,

    Thanks for the reply. Sorry I should have made my situation clearer...for this case I actually need the values to be IDs e.g. 1,2,3

    I've read around the forum and it seems like it can't work this way so I'll need to come up with another solution.

    Thanks for your help!


  • brettbrett FoxyCart Team
    Hi @JoeBloggs
    One thing that might be worth pointing out would be the option "modifiers", which would look like this:
    <option value="Medium{c+2}">Medium</option>
    The option value would be "Medium", but the "code" would get "2" appended to it.
    More info here:
  • Genius, it works! That's a great workaround, thank you @brett !
  • brettbrett FoxyCart Team
    @JoeBloggs, awesome, glad that'll make sense for you :)
Sign In or Register to comment.