There are two fields name and number in the options, it is necessary that when choosing the name was changed article?

Good day Opencart 2.3 need in the options what would previsora options change the article, since Js is not strong?

<div class="form-group<?php echo ($option['required'] ? 'required' : "); ?>">
 <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label>
 <select name="option[<?php echo $option['product_option_id']; ?>]" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control">
 <option value><?php echo $text_select; ?></option>
 <?php foreach ($option['product_option_value'] as $option_value) { ?>
 <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
 <?php if ($option_value['price']) { ?>
 (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
 <?php } ?>
</option>
 <?php } ?>
</select>

<span>Article:</span>
 <?php foreach ($option['product_option_value'] as $option_value) { ?>
 <span class="<?php echo $option_value['product_option_value_id']; ?>"> <?php echo $option_value['model']; ?></span>
 <?php } ?>
 </div>
June 3rd 19 at 19:10
0 answer

Find more questions by tags JavaScript