- Posts: 43
- Thank you received: 0
pop up instead of directito page when Cart empty
12 years 3 weeks ago #170872
by mentor
pop up instead of directito page when Cart empty was created by mentor
-- HikaShop version -- : 2.3.2
Hi,
At the moment, when the user goes to view cart and the cart is empty, he is directed to another page. Is it possible to show a pop up saying that the cart is empty instead?
I am using the Free version of Hikashop
Hi,
At the moment, when the user goes to view cart and the cart is empty, he is directed to another page. Is it possible to show a pop up saying that the cart is empty instead?
I am using the Free version of Hikashop
Please Log in or Create an account to join the conversation.
12 years 2 weeks ago #170878
by Xavier
Replied by Xavier on topic pop up instead of directito page when Cart empty
Hi,
You will have to do an override of a core file, the file "components/com_hikashop/views/checkout/view.html.php" and in the function 'initCart()" replace:
By tour code to display a popup.
You will have to do an override of a core file, the file "components/com_hikashop/views/checkout/view.html.php" and in the function 'initCart()" replace:
Code:
$config =& hikashop_config();
$redirect_url = $config->get('redirect_url_when_cart_is_empty');
if(!preg_match('#^https?://#',$redirect_url)) $redirect_url = JURI::base().ltrim($redirect_url,'/');
$app->redirect( JRoute::_($redirect_url,false), JText::_('CART_EMPTY'));
return true;
Please Log in or Create an account to join the conversation.
Time to create page: 0.167 seconds