- Posts: 25
- Thank you received: 2
force login after I empty my cart
3 years 3 months ago #353352
by li_gordon
force login after I empty my cart was created by li_gordon
-- HikaShop version -- : 4.7.4
-- Joomla version -- : 4.3.3
-- PHP version -- : 7.4
-- Browser(s) name and version -- : chrome
We use only the GUEST CHECKOUT, as we do not want users logging into Joomla to make purchases.
the Guest checkout works PERFECTLY, except when we do the following:
This works: ---> The master delete button on the top of the page works fine and it does bring the buyer back to the list of literature.
This brings us to a login screen: ---> But I am still being sent to the member to log in when I delete everything in my cart individually , and this only happens when I use the trash can under each item and only happens if all the items added to the cart are deleted this way
Is there something that I should be setting so if I use the TRASH can for each item and the cart is emptied the system does NOT take me to the login screen?
thanks,
Laura
-- Joomla version -- : 4.3.3
-- PHP version -- : 7.4
-- Browser(s) name and version -- : chrome
We use only the GUEST CHECKOUT, as we do not want users logging into Joomla to make purchases.
the Guest checkout works PERFECTLY, except when we do the following:
This works: ---> The master delete button on the top of the page works fine and it does bring the buyer back to the list of literature.
This brings us to a login screen: ---> But I am still being sent to the member to log in when I delete everything in my cart individually , and this only happens when I use the trash can under each item and only happens if all the items added to the cart are deleted this way
Is there something that I should be setting so if I use the TRASH can for each item and the cart is emptied the system does NOT take me to the login screen?
thanks,
Laura
Please Log in or Create an account to join the conversation.
3 years 3 months ago #353354
by nicolas
Replied by nicolas on topic force login after I empty my cart
Hi,
Try changing the line:
to:
in the function "show" of the file components/com_hikashop/controllers/cart.php and it should fix the problem.
Try changing the line:
Code:
if(!empty($cart) && empty($user_id)) {
Code:
if(!empty($cart) && !empty($cart->cart_products) && empty($user_id)) {
Please Log in or Create an account to join the conversation.
3 years 3 months ago #353356
by li_gordon
Replied by li_gordon on topic force login after I empty my cart
But if I make that chnage to cart.php, if I install any updates to hika shop won't that change be removed?
Is there a way this could be an option if you are using GUEST checkout... if GUEST is being used, and the person isn't logged in, you shouldn't be forced to login, right?
thanks,
Laura
Is there a way this could be an option if you are using GUEST checkout... if GUEST is being used, and the person isn't logged in, you shouldn't be forced to login, right?
thanks,
Laura
Please Log in or Create an account to join the conversation.
3 years 3 months ago #353358
by nicolas
Replied by nicolas on topic force login after I empty my cart
Hi,
This won't be an option. If you can confirm that the modification works, we'll include it in the next version of HikaShop of course.
This won't be an option. If you can confirm that the modification works, we'll include it in the next version of HikaShop of course.
Please Log in or Create an account to join the conversation.
Time to create page: 0.112 seconds