Old post but to build of what Bruce - PhosphorMedia posted, I thought this might be helpful.
On a site not using page builder:
As far as the best way to do this in page builder? At the moment, I'm not totally sure. I see the PROD page now uses page builder.
I'd assume somthing would have to be added to the Product Details Flex Component or a Fragment can be used but maybe Nick can shed more light on this.
Or perhaps a future release will give us control over setting the min and max values of the quantity input in page builder. With the option to use the Quantity Limits module to set those values... hint hint ;)
On a site not using page builder:
Code:
<mvt:item name="quanlimits" param="QuantityLimit_Load_Product( l.settings:product:id, 0, l.settings:product:limits )" /> <mvt:if expr="l.settings:product:limits:max_quan AND l.settings:product:limits:min_quan"> You must order between &mvt:product:limits:min_quan; AND &mvt:product:limits:max_quan;. <input type="number" id="quantity" name="Quantity" min="&mvt:product:limits:min_quan;" max="&mvt:product:limits:max_quan;" /> <mvt:elseif expr="l.settings:product:limits:max_quan AND NOT(l.settings:product:limits:min_quan)"> This product is limited to &mvt:product:limits:max_quan; items. <input type="number" id="quantity" name="Quantity" max="&mvt:product:limits:max_quan;" /> <mvt:elseif expr="NOT(l.settings:product:limits:max_quan) AND (l.settings:product:limits:min_quan)"> You must order at least &mvt:product:limits:min_quan;. <input type="number" id="quantity" name="Quantity" min="&mvt:product:limits:min_quan;" /> <mvt:else> <input type="number" id="quantity" name="Quantity" /> </mvt:if>
I'd assume somthing would have to be added to the Product Details Flex Component or a Fragment can be used but maybe Nick can shed more light on this.
Or perhaps a future release will give us control over setting the min and max values of the quantity input in page builder. With the option to use the Quantity Limits module to set those values... hint hint ;)
Comment