Jump to content
thirty bees forum

Products with variants without pre-selection of a variant


Recommended Posts

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 0_1514235153594_cc0e3ac7-81d7-4ca6-a3e4-374d9e1c5a51-grafik.png

_ after changing 0_1514235221749_67a959f0-0265-4f46-bc85-c7a4d54c5211-grafik.png



Link to comment
Share on other sites


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>






Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...