Hello.

There is an online store on Bitrix.

Tell me, how can I make the transfer of an additional parameter to the basket when the user clicks on the "buy" button?
Now I have the following link to the button: href="?action=ADD2BASKET&id=<?=$arResult["ID"]?>&kredit=yes&clear_cache=Y"

I need the parameter " kredit=yes " already as it was designated in the basket of goods and I could select this product. Where is action=ADD2BASKET and how to add a parameter to the $arResult["ITEMS"]["AnDelCanBuy"] basket component?

  • I decided. Used method CSaleBasket :: Add ($ arFields); When you click, a new product is added to the cart and updated if it already exists. And an additional parameter was written into the key "NOTES" of the $ arFields array. - Saturn
  • Carefully, there are some pitfalls. Before adding to the basket, I deleted this item, and then added it. Otherwise, if you already have this product in your basket, then 1 more is added to the quantity already added (that is, the quantity just changes). - Bars

0