- Posts: 32
- Thank you received: 1
Empty cart redirect
- jeffmcbiscuit
-
Topic Author
- Offline
Less
More
5 years 10 months ago #325876
by jeffmcbiscuit
Empty cart redirect was created by jeffmcbiscuit
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.22
-- PHP version -- : 7.4
Currently when the cart is empty and a user (for example) clicks the Carts button from the cpanel, they're taken to /product/listing and a message is shown at the top to say the cart is empty.
How can I change this so that the message appears at the top of the current screen (wherever that is) but there's no redirect?
-- Joomla version -- : 3.9.22
-- PHP version -- : 7.4
Currently when the cart is empty and a user (for example) clicks the Carts button from the cpanel, they're taken to /product/listing and a message is shown at the top to say the cart is empty.
How can I change this so that the message appears at the top of the current screen (wherever that is) but there's no redirect?
Please Log in or Create an account to join the conversation.
5 years 10 months ago #325907
by nicolas
Replied by nicolas on topic Empty cart redirect
Hi,
You can try to change the line:
$this->setRedirect($checkoutHelper->getRedirectUrl($override), JText::_('CART_EMPTY'));
to:
$app->enqueueMessage(JText::_('CART_EMPTY'));
in the file components/com_hikashop/controllers/cart.php
You can try to change the line:
$this->setRedirect($checkoutHelper->getRedirectUrl($override), JText::_('CART_EMPTY'));
to:
$app->enqueueMessage(JText::_('CART_EMPTY'));
in the file components/com_hikashop/controllers/cart.php
Please Log in or Create an account to join the conversation.
- jeffmcbiscuit
-
Topic Author
- Offline
Less
More
- Posts: 32
- Thank you received: 1
5 years 10 months ago #326427
by jeffmcbiscuit
Replied by jeffmcbiscuit on topic Empty cart redirect
Hi Nicolas. That almost worked thanks 
The only problem is when cancelling once you get to the Paypal screen, where it again sends you back to product/listing. Is there a way to send the user to the homepage from cancelling paypal?
The only problem is when cancelling once you get to the Paypal screen, where it again sends you back to product/listing. Is there a way to send the user to the homepage from cancelling paypal?
Please Log in or Create an account to join the conversation.
5 years 10 months ago #326434
by nicolas
Replied by nicolas on topic Empty cart redirect
Hi,
No. However, I would recommend to change the "Clean cart when order is" setting to "confirmed" in the HikaShop configuration.
That, way if you cancel the payment on paypal, you'll go back to the checkout as you'll still have the cart available.
I believe it's better for the customer.
No. However, I would recommend to change the "Clean cart when order is" setting to "confirmed" in the HikaShop configuration.
That, way if you cancel the payment on paypal, you'll go back to the checkout as you'll still have the cart available.
I believe it's better for the customer.
Please Log in or Create an account to join the conversation.
Time to create page: 0.152 seconds