M
M
msk_sergey2021-11-10 19:44:21
1C-Bitrix
msk_sergey, 2021-11-10 19:44:21

Adding a product property value to the shopping cart for printing Bitrix?

Hello. There is a template for printing an order. There is an article insertion line in it, I decided to replace it with one of the custom properties of the product: (ARTICLE was replaced with DEVICE_TYPE)

$db_props = CIBlockElement::GetProperty($ar_res["IBLOCK_ID"],$ar_res["ID"],array(),array("CODE"=>"DEVICE_TYPE"));
if($ar_props = $db_props->Fetch())
$arBasketTmp["DEVICE_TYPE"]=$ar_props["VALUE"];

As a result, instead of the article, I began to print not the value of the DEVICE_TYPE property itself, but the ID of the value (for example, I have the value "CCTV camera" with ID 568 - it prints "568" and not the name. Tell me what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
msk_sergey, 2021-11-10
@msk_sergey

He asked himself answered) if it is useful for someone, instead of VALUE in the code, put VALUE_ENUM (the DEVICE_TYPE property was a list)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question