Discounts problem

johnb41johnb41 Member
in Bugs & Feature Requests edited January 2009
In my testing, I'm trying to apply this kind of discount: discount_quantity_amount=Discount{100-25}

Does this kind of thing not work in a "form"? I append that string into the action for the form, like this: (also included is entire form)
<form class="foxycart" action="https://myawesomekickasscompany.foxycart.com/cart?[b]discount_quantity_amount=Discount{100-25}[/b]" method="post" accept-charset="utf-8">

<input type="hidden" name="name" value="Foobar Widget 2.0" />
<input type="text" name="quantity" value="0" />
<input type="hidden" name="price" value="0" />

<input type=checkbox value="{p+1.50}" name="a">Option A</input>
<input type=checkbox value="{p+2.00}" name="b">Option B</input>
<input type=checkbox value="{p+2.00}" name="c">Option C</input>
<input type=checkbox value="{p+0.35}" name="d">Option D</input>

<input type="submit" name="Add to cart" value="Add to cart" class="submit" />

</form>

The discount does not show up in the cart. But if i put that string into a link (not in a form), then it works. But as you can see above, i need to have the customer click one or more checkboxes before clicking a Submit button. So it has to be a form.

Thanks!
John
Comments
  • brettbrett FoxyCart Team
    You need to take that string and make it a hidden input, not part of the action attribute of the form. ;)

    name="discount_quantity_amount" value="blah"
  • Ahh... it's now so obvious after i see the answer!! Thanks again!

    John
Sign In or Register to comment.