I am making an option to use the Other Info Prompt as a drop down list.
It mostly works but I would be grateful for comments and any fine tuning?
Creat three variables at product level, panel name 'Prompts':
<actinic:variable name="OtherInfoUseDropDown" /> True/False
<actinic:variable name="OtherInfoChoiceOne" /> Text
<actinic:variable name="OtherInfoChoiceTwo" /> Text
Find the Other info dialogue in the product summary and product page product layout and change to:
The preg replace removes the space in 'Ice Cream' for 'name'.
Two issues:
1. Other Info prompt in Shopping Cart is editable as an input field - how to make it readonly?
2. The choice name remains without the space or the underscore in the checkout.
See and test at: https://www.webeg.co.uk/oi/acatalog/...rrings-46.html
Thank you!
It mostly works but I would be grateful for comments and any fine tuning?
Creat three variables at product level, panel name 'Prompts':
<actinic:variable name="OtherInfoUseDropDown" /> True/False
<actinic:variable name="OtherInfoChoiceOne" /> Text
<actinic:variable name="OtherInfoChoiceTwo" /> Text
Find the Other info dialogue in the product summary and product page product layout and change to:
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsOtherInfoPromptShown%22%20%2f%3e" > <fieldset class="product-prompt"> <actinic:block if="%3cactinic%3avariable%20name%3d%22OtherInfoUseDropDown%22%20%2f%3e%20%3d%3d%20false" > <label><span class="actrequired"><actinic:variable encoding="actinic" name="OtherInfoPrompt" /></span></label> <input class="input-border" type="text" name="O_<actinic:variable name="ProductID" />" maxlength="1000" value="" /> </actinic:block> <actinic:block if="%3cactinic%3avariable%20name%3d%22OtherInfoUseDropDown%22%20%2f%3e%20%3d%3d%20true"> <label for="O_<actinic:variable name="ProductID" />"><actinic:variable encoding="actinic" name="OtherInfoPrompt" />:</label> <select name="O_<actinic:variable name="ProductID" />" id="O_<actinic:variable name="ProductID" />"> <option value="<actinic:block php="true">echo preg_replace('/\s+/', '_', '<actinic:variable encoding="perl" name="OtherInfoChoiceOne" selectable="false" />');</actinic:block>"><actinic:variable name="OtherInfoChoiceOne" /></option> <option value="<actinic:block php="true">echo preg_replace('/\s+/', '_', '<actinic:variable encoding="perl" name="OtherInfoChoiceTwo" selectable="false" />');</actinic:block>"><actinic:variable name="OtherInfoChoiceTwo" /></option> </select> </actinic:block> </fieldset> </actinic:block>
Two issues:
1. Other Info prompt in Shopping Cart is editable as an input field - how to make it readonly?
2. The choice name remains without the space or the underscore in the checkout.
See and test at: https://www.webeg.co.uk/oi/acatalog/...rrings-46.html
Thank you!
Comment