Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

Выбор первой опции ratio по умолчанию


Recommended Posts

Здравствуйте!

Столкнулся с проблемой выбора опции по умолчанию

Вот код, что нужно сделать чтоб выбиралась первая опция?
 

        <?php if ($option['type'] == 'radio') { ?>
        <div id="input-option<?php echo $option['product_option_id']; ?>" class="option form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
          <b><?php if ($option['required']) { ?>* <?php } ?><?php echo $option['name']; ?>:</b>
          <?php foreach ($option['product_option_value'] as $option_value) { ?>
		  <div class="option_radio">
          <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"></label>
		  <label for="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 } ?>
          </label>
          </div>
          <?php } ?>
        </div>
        <?php } ?>

 

Link to post
Share on other sites

Можно установить модуль 

 

  • +1 1
Link to post
Share on other sites

58 минут назад, shalan сказал:

Можно установить модуль 

 

Помогло, еще бы на категориях такое сделать

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.