HELP! Cannot add Variant to cart

  • Posts: 231
  • Thank you received: 4
  • Hikaserial Standard
3 years 5 months ago #332990

-- url of the page with the problem -- : www.eileensemporium.com/brands/product/pc90
-- HikaShop version -- : 4.4.2 Business Edition
-- Joomla version -- : 3.9.26

Hello,
I have a product on the URL mentioned. It has a number of variants published.

However, I'm unable to add two of the variants to the cart. Please try selelcting:

Kit Pack Size: Single Pack

Wheelset: Either EM (Gibson) or P4 (Gibson)

Neither of these add to the cart when you click the Add to cart button. Selecting a different Kit Pack Size and then one of these Wheelsets and you can add to the cart. The Console returns this error:

cart_id was not returned in addToCart AJAX call

Can you please advise?

Thanks
Lee

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 5 months ago #332992

Hi,

When I click on the add to cart button for these variants, the AJAX request sent to the server returns with a 500 HTTP status and the content of the response has the message "104":
i.imgur.com/LbkIoOS.png
The data sent with the AJAX request is correct so it doesn't look like a customization issue of the product page layout, as is often the case.
This rather seems to indicate that there is a fatal error on the server side for some reason. It could be a bug, a plugin or some other extension doing something specific to these variants.
The first thing I would recommend is to delete these variants and recreate them to see if you still have the problem.
Then, what you can also do is to delete the whole product and recreate it.
That way, if the issue is linked to these variants / product, it should hopefully avoid the problem.
If that still doesn't help, then we would need to understand why this is happening. The first step is to get more information about the issue. It can be done by several means:
- checking the PHP error log for any fatal error message
- checking the apache error log for any useful information about the AJAX request
- trying to recreate the problem after activating the "error reporting" and "debug mode" settings of the Joomla configuration. It should hopefully display more information in the preview of the AJAX request that you can see under the "network" tab of the developer tools of your browser.
- lastly, you could spend an hour disabling / enabling each plugin of the groups "system" and "hikashop" via the Joomla plugins manager, each time checking if it helps of not. That way, you might be able to identify which plugin creates the issue, supposing it comes from a plugin.

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

  • Posts: 231
  • Thank you received: 4
  • Hikaserial Standard
3 years 5 months ago #333055

Nicolas,
Indeed, deleting these variants and recreating them has solved the issue, seems odd that solves the issue!

Thanks

Lee

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 5 months ago #333058

Hi,

It's probably because some of the data in the database was inconsistent for these variants. Not sure why though. It's could be an issue with a CSV import, or a mass action. Hard to say wihtout spending hours debugging the code.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum