Сообщение #1 zenlounge » 08.12.2023, 09:55
Приветствую. кто то сталкивался?
Если товар был выключен в админке, а у кого то он был ранее в корзине, то его без проблем оформляет.
Я думаю поменять время хранения корзины в localstorage.
- Спойлер
Кто подскажет где поменять?)
Добавлено спустя 14 минут 58 секунд:Нашел в Okay/Core/cart.php
- Спойлер
Код: Выделить всё
*/
public function saveShoppingCart(array $items)
{
if (!empty($items)) {
$_COOKIE['shopping_cart'] = json_encode($items);
setcookie('shopping_cart', $_COOKIE['shopping_cart'], time() + 30 * 24 * 3600, '/'); // на месяц
} else if (empty($items)) {
// And delete the cookie variable when we empty the trash
if (isset($_COOKIE['shopping_cart'])) {
unset($_COOKIE['shopping_cart']);
}
setcookie('shopping_cart', '', time()-3600, '/');
}
ExtenderFacade::execute(__METHOD__, $this, func_get_args());
}
Приветствую. кто то сталкивался?
Если товар был выключен в админке, а у кого то он был ранее в корзине, то его без проблем оформляет.
Я думаю поменять время хранения корзины в localstorage.
[spoiler][img]https://iili.io/JI6YFZN.png[/img][/spoiler]
Кто подскажет где поменять?)
Нашел в Okay/Core/cart.php
[spoiler][code] */
public function saveShoppingCart(array $items)
{
if (!empty($items)) {
$_COOKIE['shopping_cart'] = json_encode($items);
setcookie('shopping_cart', $_COOKIE['shopping_cart'], time() + 30 * 24 * 3600, '/'); // на месяц
} else if (empty($items)) {
// And delete the cookie variable when we empty the trash
if (isset($_COOKIE['shopping_cart'])) {
unset($_COOKIE['shopping_cart']);
}
setcookie('shopping_cart', '', time()-3600, '/');
}
ExtenderFacade::execute(__METHOD__, $this, func_get_args());
}[/code][/spoiler]