Forum
Is there a way to not show inventory in variant drop-down...
So:
<perch:input id="product" type="select" class="variants" options="<perch:shop id="_variant_opts" type="hidden" />" placeholder="Please choose" required="true" class="sm-form-control" />
brings the variants onto the template... But can you control whether or not the stock level is shown? If so, what template would that be?
Not currently. The alternative is to template them directly: https://docs.grabaperch.com/addons/shop/products/template-tags/options/
I see, thank you.
So if I wanted to duplicate the standard dropdown, just without the inventory levels it would be something like this:
The options display correctly for me but the add to cart button no longer adds the selected item to the cart...
Looking at source, with the default dropdown, my option values are 19, 22 and 25; but with the code above, the values are 5,6 and 7. So
<perch:productvalue id="valueID" />
must be the incorrect tag. Also, would I just pick up the id of the select element from the default dropdown code as I did here?Thanks for your help!
Those aren't product IDs - they're option value IDs. You need to specify the field name as per the documentation and also provide the productID that the options relate to.
If you have multiple options I'm not sure that's easy to do in a single select field.
so I'm doing it wrong or you don't think it's doable? Either way, I guess it's beyond me.
Do you have multiple options or just one?
Just sizes in this case.
I think it's probably possible to do in that case. You could prototype it using the radio button example in the documentation.
what would be the perch tag that calls in the option id?
There's an example here under "full control": https://docs.grabaperch.com/addons/shop/products/template-tags/options/