Options in Shop have Different Prices
  • I am setting up an eCommerce site where the items in the shop have Size options (S, M, L), but each Size is a different price. I was thinking of creating a sub-collection called Options that would hold the Size and it's related Price. Then I could display the Size & Price combo in a select menu. The problem is that I'm not sure how to pass the Price of the selected Size into Vae eCommerce. Any ideas?

  • 3 Answers sorted by
  • Vae will handle that automatically as long as the price structure in the Options collection is the named the same as the price structure in the main collection of items.

    We will soon be updating <v:option_select> to show the price differential as well in the dropdown.

  • Thanks Kevin. I had not added a Price structure for the main Items collection, but now that I have done that, it is returning an error saying that "Adding an item to cart, but the price field is blank."

    So the main collection is called Store with fields for Name, Description, Image, Price, [Options]. Options is a sub-collection with fields for Size, Price.

    This is the code I am using on item.html to add the item to the cart:
    <v:store:add_to_cart redirect="/cart" name_field="name" options_collection="options" option_field="size" price_field="price" >

    Quantity: <v:text_field name="quantity" value="1" />

    <select name="options">
    <v:collection path="options">
    <option value="<v->"><v:text path="size" /> - $<v:text path="price" /></option>

    <input type="submit" value="Add to Cart" />


  • This was a Vae bug and we got it corrected.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion