Jump to content
thirty bees forum

Products with variants without pre-selection of a variant


zimmer-media

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

0_1514235240771_05c0c8ba-eb18-437c-958f-09f3402ac5a0-grafik.png

0_1514235251512_eef27a23-f312-4c53-8fc4-b8c7cc81e8fa-grafik.png

Link to comment
Share on other sites

@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>

0_1514239564499_4096fb7a-c09f-4882-9865-d599dd6fa89c-grafik.png

--

0_1514239579248_1e312feb-0b2b-49ee-91ba-e11e8d8c25b0-grafik.png

--

0_1514239598587_e08f1c07-fc91-4b4f-86bd-3b1051936df7-grafik.png

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...