Various (add to) cart issues

  • Spock11
  • Topic Author
7 years 3 months ago #287636

-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.5
-- PHP version -- : 7.0.27
-- Browser(s) name and version -- : Chrome 64.0.3282.140
-- Error-message(debug-mod must be tuned on) -- : n.a.

Good afternoon,

Since the upgrade to 3.2.2 , I cannot get the cart to work as shown in the demo.
The URL provided in this ticket, links to a sandbox environment in which I only have two products. One product with and one without variants (in my case bottle sizes)

issue 1: product not added to cart

When I add the right hand product, the product without variants, (the glass) to the cart,I do get a popup but the item is not added to the cart. That is also the message in the popup, "Product not added to cart".

So, the positive side is that I do get a popup. The legacy setting is set as described (except for the bootstrap one as it messes up the display). The product has sufficient stock.

Strangely, if I try the other product, the bottles, the cart is updated in the background however no popup is displayed.
Also, the update does not take into account the variants, in this case 50cl and 70cl bottles. Whatever I select, 50cl or 70cl, the 70cl is added or updated.

Issue 2: Display of cart

< this issue can be ignored, see my reply below>

I added a cart module in the side bar, but whatever setting I use in the back-end, I only get a tiny shopping cart icon which only displays its contents when I hover over it. Which does not reflect the backend setting.

Please advise. Of course I am happy to share credentials for the sandbox backend

Thanks in advance
Ron

Last edit: 7 years 3 months ago by Spock11. Reason: additional information , in this case an additional unwanted behaviour and one issue resolved

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

  • Spock11
  • Topic Author
7 years 3 months ago #287641

Update : please ignore issue 2 . By updating the template and especially the underlying Warp framework, the cart now shows.
It needs some tweaking but I will manage.

So, if you know the solution for issue 1 , that would be greatly appreciated.

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

  • Posts: 83778
  • Thank you received: 13564
  • MODERATOR
7 years 3 months ago #287639

Hi,

The add to cart works on the product page itself but not on the listing. So it's not a restriction issue.
This means that it comes from the way the add to cart request is sent to the server.
Looking at the AJAX request sent to the server when you click on the add to cart button, you can see that the request asks to add a quantity of 0 for that product:
monosnap.com/file/sDxT8vuIQXRKRCcRclM9Sz98zkLtgC
That's why you get that behavior.
And if I check the HTML of the add to cart button, the quantity field has a value of nothing instead of 1:
monosnap.com/file/uXao53kDKrIrW646TQRtb7xdJjPB2D
So this looks like there is a problem in one of the view file overrides you have.
Probably the view file product/quantity.php or product/show_quantity.php
So please check if you have them in templates/YOUR_TEMPLATE/html/com_hikashop/product/
If you do, try renaming them and see if that helps.

Last edit: 7 years 3 months ago by nicolas.

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

  • Spock11
  • Topic Author
7 years 3 months ago #287700

Hi Nicolas

Getting there...
Indeed, by removing the customisation in the show_quantity.php file, I get the popup for both test products.

Now the other issue I mentioned remains:

in the left hand product, the bottle, I have two bottle sizes. What happens, is:

- whatever size I choose, 50cl or 70cl, the 70cl bottle is always added to the cart. (it is not the default variant)
- the cart is not updated on the fly, only if I refresh the page I see the quantity is updated.

Kindly advise

Thanks
Ron

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

  • Posts: 26232
  • Thank you received: 4035
  • MODERATOR
7 years 3 months ago #287707

Hello,

Please take a look at your product page source code and you will see that your "sidebar" have a really strange "title" which include some JavaScript.

Since your page is broken and you have some DOM errors (plus JS errors), the "add to cart" behavior can't work properly and it send more data that it should (because the DOM is broken).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum