Last active
April 2, 2016 13:41
-
-
Save d1i1m1o1n/1baefa5edf57e4c1e1cf to your computer and use it in GitHub Desktop.
Bitrix add product to last viewed
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
//добавление товара в просмотренные | |
CModule::IncludeModule("sale"); | |
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