What is the whole subject? As seen in the photo there is 1 option and two properties. (I apologize for the design) alt text

On the site they are displayed as

alt text

here is the code

<form class="variants" action="/cart"> <select name="variant1" {if $product->variants|count==1 && !$product->variant->name1}style='display:none;'{/if}> {foreach $product->variants as $v} <option value="{$v->id}" {if $v->compare_price > 0}compare_price="{$v->compare_price|convert}"{/if} price="{$v->price|convert}"> {$v->name1} </option> {/foreach} </select> <select name="variant2" {if $product->variants|count==1 && !$product->variant->name2}style='display:none;'{/if}> {foreach $product->variants as $v} <option value="{$v->id}" {if $v->compare_price > 0}compare_price="{$v->compare_price|convert}"{/if} price="{$v->price|convert}"> {$v->name2} </option> {/foreach} </select> <div class="price"> <strike> {if $product->variant->compare_price > 0} {$product->variant->compare_price|convert} {/if} </strike> <span>{$product->variant->price|convert}</span> <i>{$currency->sign|escape}</i> </div> <input type="submit" class="button" value="в корзину" data-result-text="добавлено"/> </form> <!-- Выбор варианта товара (The End) --> 

It is necessary to make it like here

I removed variant name 1 ... and everything seems to be fine ... but there is one BUT ... if you choose the first "RED" and the first "35" - everything is good .... but in order to choose 36 red. "red" second and "36" second .... tell me how to make it so that there are no duplicate options and everything was sent to the basket without errors

  • one
    Do you know that you do not have a php code but a template? Why not specify which dvizhek template is used. Where clack is there on jquery done. - zb '
  • Can it be better to have only one drop-down list of the name of the option ? If I went to the site to buy a phone, then it would be more convenient for me, because the options are immediately visible regardless of anything (maybe option 36 does not exist blue, or there is option 37 only pink). P.S. This is a personal opinion, it does not express the opinion of the majority. - ReinRaus
  • simpla engine ... and how better .... better to burn the engine's creator ... there is no other possibility to decorate the module .... but what if there is a jquery ... then how to do the same? - HoPkInS
  • Auuu. Will anyone tell me a solution or not? - HoPkInS
  • aha, copy "from there", nobody will be undermined to learn simpla for you. - zb '

1 answer 1

So fit?

  • Less than a year ... thanks so much) - HoPkInS