Answer the question
In order to leave comments, you need to log in
How to pass values from component to modal window?
Hello. Help me please. Completely confused.
I have a catalog.section component.
There is a product with a Buy button. When I click on this button, I need a modal window to open with the name and price of the product. Now I have this:
//Код вывода товара на страницу
foreach($arResult['ITEMS'] as $key => $arItem){
<?=$arItem['NAME']?>
<?=$arItemIDs['PRICE']?>
<button class="to-basket">Купить</button>
//код модального окна
<div id="ModalBasket">
<div id="wellknow"><?=$arItem["NAME"]?></div>
<div class="info">
<div class="add-basket-block-elem "><?=$arItemIDs['PRICE']?></div>
</div>
<button id="<?=$arItemIDs['BUY_LINK']?>" class="btn-big btn-red">Положить в корзину</button>
<a href="" class="btn-big btn-white" id="trigger">Отмена</a>
</div>
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question