force login after I empty my cart

  • Posts: 24
  • Thank you received: 2
  • Hikashop Essential
1 year 4 months ago #353352

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

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 4 months ago #353354

Hi,

Try changing the line:

if(!empty($cart) && empty($user_id)) {
to:
if(!empty($cart) && !empty($cart->cart_products) && empty($user_id)) {
in the function "show" of the file components/com_hikashop/controllers/cart.php and it should fix the problem.

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

  • Posts: 24
  • Thank you received: 2
  • Hikashop Essential
1 year 4 months ago #353356

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

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 4 months ago #353358

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.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum