Answer the question
In order to leave comments, you need to log in
How to add a product property to the cart in Bitrix?
The product card has a property of type list, multiple. It is output in this way:
<? if ($arResult["PROPERTIES"]["DIMENSIONS"]["VALUE"]) { ?>
<div class="catalog-detail__options">
<select name="size">
<option disabled><?=GetMessage("SELECT_SIZE")?></option>
<? foreach($arResult["PROPERTIES"]["DIMENSIONS"]["VALUE"] as $size) { ?>
<option value="<?=$size?>"><?=$size?></option>
<? } ?>
</select>
</div>
<? } ?>
Answer the question
In order to leave comments, you need to log in
On one of the sites we have done something like this, through api
Add2BasketByProductID(
$PRODUCT_ID,
1,
array(
array("CODE" => "DIMENSIONS", "NAME" => "Размер", "VALUE" => $_POST['size']),
)
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question