D
D
dmitryIG2016-08-04 14:40:51
PHP
dmitryIG, 2016-08-04 14:40:51

How to pass value to cart?

There is an online clothing store. Now the size of the goods is transferred to the basket in this way

foreach ($arResult['PROPS']['PROP2']['VALUE'] as $key => $value):?>
                    <div class="inline_block_top radio">
                        <div class="inline_block_top text">
                            <span><?=$value?></span>
                        </div>
                        <input id="checkbox-<?=$value?>" <?if (!$checked): $checked = false;?>checked<?elseif(isset($_GET['razmer']) && $_GET['razmer'] == $value):?>checked<?endif;?> type="radio" value="<?=$value?>" name="prop[PROP2]">
                        <label for="checkbox-<?=$value?>"></label>
                    </div>
                <?endforeach;?>

You need to flip the checkboxes under the list
<select>
       
   <?foreach ($arResult['PROPS']['PROP2']['VALUE'] as $key => $value){ ?>
                    <option  value="<?=$value?>" ><?=$value?></option>
                <? } ?>

            </select>

but the handler doesn't read the value. Where to change the handler code? I rarely work with Bitrix...
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
ThunderCat, 2016-08-04
@ThunderCat

location.href=this.value;
wtf?
What do you need???
What handler?
What should happen?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question