I have three product options that a user can buy/select; sample, a returnable sample and a length of fabric. If the user selects to buy a length of fabric they can enter the length required in a input field next to the radio button, this is not a perch generated input field just a standard hand-coded one. I'd like to fill the "placeholder=" and "min=" attributes with the value of the minimum order quantity for the product. This value is available in the perch:shop namespace but when I use <perch:shop id="spec_min"> nothing is inserted. Any thoughts as to what I'm doing wrong or is this something that simply can't be done?
Code
- <perch:before>
- <ul class="choices">
- </perch:before>
- <li>
- <perch:if id="valueTitle" match="contains" value="Returnable"><a class="info tooltip"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="info"><path d="M256 340c-15.464 0-28 12.536-28 28s12.536 28 28 28 28-12.536 28-28-12.536-28-28-28zm7.67-24h-16c-6.627 0-12-5.373-12-12v-.381c0-70.343 77.44-63.619 77.44-107.408 0-20.016-17.761-40.211-57.44-40.211-29.144 0-44.265 9.649-59.211 28.692-3.908 4.98-11.054 5.995-16.248 2.376l-13.134-9.15c-5.625-3.919-6.86-11.771-2.645-17.177C185.658 133.514 210.842 116 255.67 116c52.32 0 97.44 29.751 97.44 80.211 0 67.414-77.44 63.849-77.44 107.408V304c0 6.627-5.373 12-12 12zM256 40c118.621 0 216 96.075 216 216 0 119.291-96.61 216-216 216-119.244 0-216-96.562-216-216 0-119.203 96.602-216 216-216m0-32C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8z"/></svg><span class="tooltiptext tooltip-bottom"><span class="explanation">A <strong>Returnable</strong> is a larger sample approximately 50cm x 50cm (depending on pattern repeat). £20 will be refunded back to the card that you paid with, if returned within 28 days in good condition.</span></span></a></perch:if>
- <label class="control control--radio">
- <perch:input id="options" name="opt-<perch:productvalue id="optionID">[]" class="<perch:productvalue id="valueTitle" urlify="true">" data-color="<perch:productvalue id="valueTitle" urlify="true">" value="<perch:productvalue id="valueID">" type="radio" required="required" checked="" autocomplete="off">
- <label for="opt-<perch:productvalue id="optionID">[]">
- <perch:productvalue id="valueTitle">
- <perch:if id="valueTitle" match="contains" value="sample"> (£ <perch:member has-tag="trade"/>0·00<perch:else:member/>0·75</perch:member>)</perch:if>
- <perch:if id="valueTitle" match="contains" value="Returnable"> (£ <perch:member has-tag="trade"/>23·00<perch:else:member/>23·00</perch:member>)</perch:if>
- </label>
- <span class="control__indicator"></span>
- </label>
- <perch:if id="valueTitle" match="contains" value="length">
- <input id="inputMeters" placeholder="<??here??>" min="<??here??>" class="qty" step=".1" type="number" oninput="LengthConverter(this.value)" onchange="LengthConverter(this.value)">
- <p class="qty_CM">CM: <perch:input id="qty" class="qty"></p>
- </perch:if>
- </li>
- <perch:after>
- </ul>
- </perch:after>