Created
November 15, 2015 20:08
-
-
Save d1i1m1o1n/4ff5df3cfb5405a3f8ce to your computer and use it in GitHub Desktop.
Bitrix add product to viewed list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//добавление товара в просмотренные | |
use \Bitrix\Catalog\CatalogViewedProductTable as CatalogViewedProductTable; | |
$user_id = CSaleBasket::GetBasketUserID(); | |
if($user_id > 0) { | |
$product_id = $arResult['ID']; | |
CatalogViewedProductTable::refresh($product_id, $user_id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment