Cart doesnt update after clicking continue shoppin

  • Posts: 76
  • Thank you received: 5
11 years 10 months ago #86672

Guys,

Not sure if this is normal behaviour but when I click continue shopping from pop up it returns me to the same page but the cart continues to tell me there are no items in it.

When I go to proceed to checkout the items have been added.

Thanks in advance
Rob


MItrax Trading
www.mitrax.com.au

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

  • Posts: 12953
  • Thank you received: 1778
11 years 10 months ago #86688

Hi,

1. Did you use the "Use AJAX when possible for add to cart buttons" through "Hikashop->System->Configuration->Checkout" ?

2. Can I have a link to your web site ? it would maybe help me to understand what the problem is and if you have a JavaScript error.

Thanks.

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

  • Posts: 76
  • Thank you received: 5
11 years 10 months ago #86696

Hi,

URI is www.mitrax.com.au

Use AJAX is checked.

Thanks for the quick reply.


MItrax Trading
www.mitrax.com.au

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

  • Posts: 12953
  • Thank you received: 1778
11 years 10 months ago #86737

Hi,

The problem is probably a cache issue, so you should disable all cache through :
- The joomla global configuration
- Any plugin which is using cache
- Your template cache

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

  • Posts: 76
  • Thank you received: 5
11 years 10 months ago #86826

Hi,

All Caching that I can see has been turned off & cache has been cleared.

Unfortunately no change.

Regards
Rob


MItrax Trading
www.mitrax.com.au

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

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #86885

Hi,

Are you using the latest HikaShop version ?

Check in the cart plugin options if the cache is enabled. Are you sure that you template don't have cache system ?

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

  • Posts: 76
  • Thank you received: 5
11 years 9 months ago #86899

Hikashop is version 2.0.0.

Template is JSN Epic pro 4.5.2

The template has the ability to perform JS/CSS compression and caching . This has been de-activated and there is no other template caching.

I have also checked my hosting and turned off all caching & have cleared the cache in my browser. Joomla system caching has also been turned off.

Every thing seems to work ok when I remove an item from the cart with the x button but when I hit continue shopping it doesnt appear to attempt to reload the page in order to update the cart.


MItrax Trading
www.mitrax.com.au

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

  • Posts: 69
  • Thank you received: 11
11 years 9 months ago #87199

In my opinion, a real AJAX call would go to the DB, store the data, then come back to the client side ( user screen ) and update the interface either with pure JS or with Motools/JQuery.

If in JQ I do the following upon sucessfull update of othe cart in the DB via AJAX: $("#id").text("3").. or any other operation, it shouldn't be affected by cache at all. The change should be reflected inmeadiately without having to reload the page.

Cache problems are more like: you RELOAD the page and you see the same data and almost all the time affects input fields and static resources. The # of items in the cart shouldn't be affected, specially if it adds a new row to a table.

Also, Cache and Compression are necessary for a satisfactory user experience and for SEO compliance.


Eduardo Chongkan - Likan Development
http://likandevelopment.com
The following user(s) said Thank You: Mitrax

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

  • Posts: 76
  • Thank you received: 5
11 years 9 months ago #87215

Thanks Likandev .

I'm not seeing any evidence that the page is attempting to reload so am not convinced of caching theory.

Anyway I've turned off every bit of caching I can find while we troubleshoot . I really hope I can turn caching back on at the end of the investigation for the reasons you have stated in your post.


MItrax Trading
www.mitrax.com.au

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

  • Posts: 69
  • Thank you received: 11
11 years 9 months ago #87216

If you use the Inspect tool of Chrome or Firefox, in the console tab, do you see any JS error?

In the Network tab, in the XHR sub tab, do you see the post and response?

If it is not reloading it should be doing AJAX and it must be failing..


Eduardo Chongkan - Likan Development
http://likandevelopment.com

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 9 months ago #87350

I can see the AJAX request being done when you click on the add to cart button. It also receives the answer from the server with the new cart module content but for some reason the cart module content is not changed as it should.

I'm not clear why, but a simple solution is the deactivate the "Use AJAX when possible for add to cart buttons" option. That will force a full reload of the page with the new cart module content.

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

  • Posts: 76
  • Thank you received: 5
11 years 9 months ago #90292

Thanks for the reply Nicolas.

Deactivating Use Ajax where possible works around my issue but it does require conservative caching not progressive caching in Joomla.

I'd really like to get Ajax working though .. any hints ?

Hikashop is now version 2.1.0.

Joomla is now version 2.5.9

Template is still JSN Epic pro 4.5.2

I have tried with all caching on / off and it has no influence over behaviour.

Rob


MItrax Trading
www.mitrax.com.au

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

  • Posts: 76
  • Thank you received: 5
11 years 9 months ago #90293

Also it doesnt appear to matter which browser I use Chrome/firefox/safari/ie behaviour doesnt change.


MItrax Trading
www.mitrax.com.au

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 9 months ago #90617

Hi,

I couldn't find why the Ajax doesn't work.

Could you try with another template, like the default one of Joomla ? If that still doesn't work, could you make sure that all the cache is deactivated and try again ? I'm guessing that it's either coming from the template or the cache or a mix of both.

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

  • Posts: 69
  • Thank you received: 11
11 years 9 months ago #90729

nicolas wrote: I can see the AJAX request being done when you click on the add to cart button. It also receives the answer from the server with the new cart module content but for some reason the cart module content is not changed as it should.

I'm not clear why, but a simple solution is the deactivate the "Use AJAX when possible for add to cart buttons" option. That will force a full reload of the page with the new cart module content.


This usually means the JS code is not finding the correct element and in fact, it seems there are 2 IDs called "hikashop_cart_module".


This one:



And this one:



This seems to be either an incorrect module configuration or a template related problem.

Posible solutions:


1- Make sure you do not publish more than 1 Cart Module per Page and that the ID of this module is not duplicated on the same page as well.

or for Nicolas,

2- In the file: administrator/components/com_hikashop/helpers/cart.php, on line 272, improve the logic of the selector to match and update more than on cart if present. Example:

Instead of selecting by ID, wich selects the first ID it finds because they are supposed to be unique in a single page, select by Class, and make a loop to update all cart modules in the same page.

I can get to the correct ID if I modify the selector but, it would be ideal you use classes instead of IDs if you want more than one cart per page.


Eduardo Chongkan - Likan Development
http://likandevelopment.com
Last edit: 11 years 9 months ago by likandev.
The following user(s) said Thank You: Mitrax

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

  • Posts: 76
  • Thank you received: 5
11 years 9 months ago #90743

Thanks Eduardo, problem solved.

I had a second cart configured at the top for use on my mobile template. Everything works fine now I have unpublished it.

Will revisit my mobile layout tonight.


MItrax Trading
www.mitrax.com.au
The following user(s) said Thank You: likandev

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

  • Posts: 17
  • Thank you received: 0
10 years 11 months ago #136106

Hello,

This was very helpful for me as I was experiencing the same issue. I have 2 cart modules - 1 for desktop and 1 for tablet/phone. The RocketTheme template will not publish the Sidebar A module position on tablet/mobile so i have created a Cart for a different module position. The Sidebar A module has been disabled for tablet/phones. The cart is functioning well on phones/tablets but not loading for desktop. It is conflicting with the other cart module for tablet/phone.

I need both modules working to accommodate browsing on the different devices. What is the code that needs to be replaced/updated in order to avoid this conflict. Or is there a patch/update i can install to correct this issue.

Thanks,
Jason

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

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

Hi,

What is your HikaShop version ?
We recently released the 2.2.3, so thanks to update to this version and see if it's solving the problem.

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

  • Posts: 17
  • Thank you received: 0
10 years 11 months ago #136287

Hi Xavier,

I downloaded "com_hikashop_starter_2.2.3_2013-12-09.tar.gz".

An additional issue i noticed is that the when a product is added to the cart the "pop-up' window appears even though it is set to "Always stay on the same page".

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

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

Hi,

Yes, another user has reported it, I have corrected it on our end.
It will be available in the next package.

The following user(s) said Thank You: wireball

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

Time to create page: 0.128 seconds
Powered by Kunena Forum