pop up instead of directito page when Cart empty

  • Posts: 43
  • Thank you received: 0
10 years 11 months ago #170872

-- 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

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #170878

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:

				$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;
By tour code to display a popup.

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum