After update to 4.5.1 deleting cart doesn't work

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
2 years 5 months ago #341954

-- HikaShop version -- : 4.5.1

Hi Support,

After update from 4.4.2 to 4.4.3 or higher cart module does not disappear after deleting latest product in cart.
When you delete the product the cart stays visible, but when you go to the page shopping cart (or other page) only then does the mini cart disappear.

See difference on:
startenfinish.com/theorievragen/online-oefenen (Hikashop 4.3.0)
ledentest.startenfinish.com/theorievragen/online-oefenen (Hikashop 4.5.1)

What could cause this issue?

See video: lumiga.nl/1/2022-05-25_14-50-25.mp4

Our configuration:



Kind regards,
Lumiga


Kind regards,
Lumiga
Attachments:
Last edit: 2 years 5 months ago by Lumiga.

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

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
2 years 5 months ago #341956

Without override on the view cart or on all other views the issue persist
Also turning off "Regular Labs - Cache Cleaner" doesn't help.
Turning off SEF in Joomla doesn't help.
In the module configuration "Drop downcart" and "Dropdown cart (hover)" makes no difference both have this issue.

All cart files that have been modified from 4.4.2 to 4.4.3:
Hope you can find where the issue is coming from.

back/classes/cart.php
back/views/cart/tmpl/form.php
back/views/cart/view.html.php
front/views/cart/tmpl/listing.php
front/views/cart/tmpl/product_edit.php
front/views/cart/tmpl/share.php
front/views/cart/tmpl/show.php
front/views/cart/view.html.php
front/views/checkout/tmpl/show_block_cart.php
front/views/product/tmpl/add_to_cart_ajax.php
front/views/product/tmpl/cart.php
plugins/mod_hikashop_cart/tmpl/default.php
plugins/plg_hikashop_reminder/emails/cart_reminder.preload.php


Kind regards,
Lumiga
Last edit: 2 years 5 months ago by Lumiga.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 5 months ago #341962

Hi,

I've looked at the situation on both websites and I'm not sure what is the problem.
I can see the AJAX requests sent to the server to get the new cart module content and I can see the spinner added and then removed on the cart module on the pages.
So normally, the system is supposed to get the text returned by the server and replace the HTML content of the cart module with the new text and I don't see any reason why it wouldn't do it.
Of course, this works fine with the latest version on a local test website.

The only thing I noticed on your website, and which might be linked to the problem, is that when I look at was is returned by the server, I see that the server returns nothing at all:
i.imgur.com/QmVinoa.png
On my end when I do something similar I get this:
i.imgur.com/A7OyaRc.png
So the fact that you don't have the text "The cart is empty" is normal as it can be removed with a translation override.
But the fact that you don't have the two HTML tags for the "loading" is strange.
I can only think it comes from your view override.
And with an empty response from the server, I can understand that the javascript thinks the cart module should not be updated.
And maybe it's linked to the update as we changed the javascript to handle the AJAX requests in between those versions.
However, you're saying that you still have the issue without the product / cart view override and I find this strange if my theory is correct.
So maybe I'm wrong and the issue is not linked to that.
It's hard to say without adding some debug to the javascript to understand why it's not updating nor being able to check your view override.
I would need a backend and a FTP access to look deeper into it and add some debugging. However, I would first recommend to double check that it's not linked to the product / cart override and to clear the cache of website and of your browser when you test this.

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

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
2 years 5 months ago #341972

Hi Nicolas,

I have delete all product / cart overrides now
Cleared cache en tried other browsers.

But nothing seems to work.

I have tested all older version from hikashop and after 4.4.2 this issue come forward.
I have this issue on all my website, But didn't noticed it before.

I'll sent you the login credentials, meaby you can find something.

It's a test site, so you are allowed to install older versions or other things.
I have made a back-up before I have sent you the login credentials.

Thanks for your help.

Kind regards,
Lumiga


Kind regards,
Lumiga
Last edit: 2 years 5 months ago by Lumiga.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 5 months ago #341981

Hi,

I was able to access the backend and FTP you provided. However, I'm not able to modify the files via the FTP access. Could you please double check the permissions as I need to add debug in the files to better understand what's going on.

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

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
2 years 5 months ago #341991

Sorry, permission is set to read and write now!

P.S. If you install 4.4.2 or lower you see that it's working as expected.
You are allowed to do that! I think in that case it's better to uninstall HikaSerial first?


Kind regards,
Lumiga
Last edit: 2 years 5 months ago by Lumiga.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 5 months ago #341995

Hi,

Thanks, it worked.
I've changed the code:

text = '';
			}
		}
		if(text) {
to:
text = false;
			}
		}
		if(text !== false) {
in the file media/com_hikashop/js/hikashop.js and it then worked fine.
As expected, the issue is that the server returns an empty response, which is not supposed to happen normally.
That's why no one else had the issue.
We'll add that change in the next version of HikaShop, the 4.6.0, which is to be released soon.

The following user(s) said Thank You: Lumiga

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

Time to create page: 0.081 seconds
Powered by Kunena Forum