zimmer-media Posted December 25, 2017 Posted December 25, 2017 I read a few days ago in a topic that in the product view for articles with variants of the customer must choose because there is no pre-selection. Since I had this time in a PS-Shop, I have again found in the PS-Forum. Here I would like to emphasize that I have not completely tested the ordering process, but the product in the shopping cart works. So you see in products with variants, no preselection of a particular variant. find in your theme/product.tpl {foreach from=$group.attributes key=id_attribute item=group_attribute} <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'html':'UTF-8'}">{$group_attribute|escape:'html':'UTF-8'}</option> {/foreach} replace with <option value="choose" selected="selected" title="--choose--">{l s='--Please Select--'}</option> {foreach from=$group.attributes key=id_attribute item=group_attribute} <option value="{$id_attribute|intval}" {if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute)} selected="selected" {/if} title="{$group_attribute|escape:'html':'UTF-8'}"> {$group_attribute|escape:'html':'UTF-8'} </option> {/foreach} before _ after changing
zimmer-media Posted December 25, 2017 Author Posted December 25, 2017 Note, it only works with the dropdown box
MockoB Posted December 25, 2017 Posted December 25, 2017 Great, I will try it as soon as I find some time. Does it have custom warning message if you click on add to cart button before choosing the attributes? Or I have to change the meaning of other predefined message? Merry Christmas to everybody!
zimmer-media Posted December 25, 2017 Author Posted December 25, 2017 @mockob No, unfortunately not yet. I think it would be necessary to insert an additional code in which, for example, only after the selection of the shopping cart appears active. But it is a start.
MockoB Posted December 25, 2017 Posted December 25, 2017 It would be better to be active and when you click on add to cart to show pop up message informing customer to choose attributes. If the button is not active the customer may decide the product is out of stock and just leave the page.
zimmer-media Posted December 25, 2017 Author Posted December 25, 2017 @mockob I have now changed the code in my first post. There will be no error message, because the shopping cart is shown after selecting. The add to cart button is hidden. The first line of the changed code is: <option value="choose" selected="selected" title="--choose--">{l s='--Please Select--'}</option> -- --
MockoB Posted December 26, 2017 Posted December 26, 2017 It looks great @zimmer-media but as I told earlier, I believe the customers don't like to read! So they could easily miss adding product to cart because there is no button, especially if most products (without features) are with add to cart button. Check eBay or aliexpress on both the buttons are not hidden. Edit: I got troubles with the eBay link but it could be easily checked.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now