Jump to content

Recommended Posts

Добрый вечер. Не работает <select> в категориях (только в мозилле, в остальных браузерах на отлично работает), но на страничке товара в той же мозилле опции работают.
В чём может быть проблема ? Ссылка-пример категории и товара
 
Часть кода, которая отвечает за вывод опции в категории:

<?php if ($product['options']) { ?>
                <div class="options">
                  <form id="pppr<?php echo $product['product_id']; ?>">
                  <?php foreach ($product['options'] as $option) { ?>
                  <?php if ($option['type'] == 'select') { ?>
                  <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
                    <?php if ($option['required']) { ?>
                    <span class="required">*</span>
                    <?php } ?>
                    <b><?php echo $option['name']; ?>:</b><br />
                    <select name="option[<?php echo $option['product_option_id']; ?>]" onchange="vvv = $('[name=rrr' + $(this).val() + ']'); $(this).next().next().val($(vvv).val()); $(this).next().next().attr('prefix', $(vvv).attr('prefix')); countPrice();">
                      <?php $option_price = -1; ?>
                      <?php foreach ($option['option_value'] as $option_value) { ?>
                       <?php if($option_price == -1) {$option_price = $option_value['price_clear']; $price_prefix = $option_value['price_prefix'];} ?>
                      <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?></option>
                      <?php } ?>
                    </select>
                    <div class="values">
                    <?php foreach ($option['option_value'] as $option_value) { ?>
                      <?php //if ($option_value['price']) { ?>
                        <input type="hidden" name="rrr<?php echo $option_value['product_option_value_id']; ?>" prefix="<?php echo $option_value['price_prefix']; ?>" value="<?php echo $option_value['price_clear']; ?>" />
                      <?php //} ?>
                      <?php } ?>
                    </div>
                    <input type="hidden" class="option_price" name="asd[]" value="<?php echo $option_price; ?>" prefix="<?php echo $price_prefix; ?>" />
                  </div>
                  <?php } ?>
                  <?php } ?>
                  </form>
                </div>
            <?php } ?>

Share this post


Link to post
Share on other sites

Консоль браузера в помощь.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

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.