CGProductBuilder how to create a condition
Posted: Thu May 04, 2017 7:16 am
Hello! How to create a condition in which, when selecting one option, there would be inactive others, in the following list.
I have several options, for example:
1.1. butter
1.2 cheese
1.3 sausages
1.4 bucket
2.1 bread
2.2 water
2.3 Salt
As when selecting the "bucket" on the first page, make sure that only the "water" item is active on the next page,
I have several options, for example:
1.1. butter
1.2 cheese
1.3 sausages
1.4 bucket
2.1 bread
2.2 water
2.3 Salt
As when selecting the "bucket" on the first page, make sure that only the "water" item is active on the next page,
Code: Select all
{if !$cgpb_info->finished}
{* the current optionset *}
<h3>{$cgpb_info->cur_optionset->name}</h3>
<div class="description">{$cgpb_info->cur_optionset->description}</div>
<div class="paddingtop-20">
{$options = $cgpb_info->cur_optionset->get_options()}
{foreach $options as $option}
{$filter=$option->wholesaleprice}
{if $filter =="0" }
<h5>{$option->name}</h5>
{else}
{$price=$option->retailprice}
<div class="option {if $option->description}i-have-a-tooltip{/if}" {if $option->description}data-description="{$option->description}"{/if} >
<input id="idx{$option@index}" type="radio" name="{$actionid}cgpb_option" value="{$option->name}"
{if in_array($option->name,$cgpb_info->sel_options)}checked="checked"{/if}/>
<label for="idx{$option@index}"> {$option->name} <em>({$price|number_format:2} ₽/м<sup><small>2</small></sup>)</em></label>
</div>
{/if}
{/foreach}
</div>
{/if}