Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Append Code to final code

I have a product form like:

<form action="foxycart">
<select name="color">
<option value="Black{c+001|p+0}">Red</option>
<option value="White{c+002|p+0}">Blue</option>
<input type="hidden" name="name" value='My Awesome Item' />
<input type="hidden" name="code" value='6029' />
<input type="hidden" name="price" value='20.00' />

Choosing this item would result in a code with: 6029001 for Black
How can I modify the final code to produce: 6029001p

We are creating promotional versions and want to denote the promotion.
Appending 'p' to the code produces 6029p001.

  • lukeluke FoxyCart Team
    Hello @richtestani.

    It sounds like instead of "c+001" you want to use "c+001p", correct? Is that what you're doing or does "c+001p" produce "6029p001"?
  • I wanted the p at the very end of the code. I wanted to append the 'p' separately from the color selection which already modifies the code.
    So I tried adding a second hidden field to append like:
    <input type="hidden: name="promo" value="promo{c+p}" />

    Doing this appends it to the base, and not the final.

    I eventually edited the color select, but it wasn't my ideal way of handling it.
Sign In or Register to comment.