Product not added to shopping cart

Phoca Cart - complex e-commerce extension
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 129
Joined: 15 Sep 2023, 10:51

Product not added to shopping cart

Post by landed »

I am only now realising that loss of sales due to an error. Yes my job to check more often.
I get this error when trying to add product to cart.

https://bestantigua.com/shop/transfers/ ... a-transfer

Product not added to shopping cart
Product not selected

No obvious console errors- this looks like backend to me as it raises a proper error.

Tags:
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 129
Joined: 15 Sep 2023, 10:51

Re: Product not added to shopping cart

Post by landed »

Anyone knows some debug I can do?
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 421
Joined: 07 Nov 2018, 14:55

Re: Product not added to shopping cart

Post by Nidzo »

Which version of Joomla and Phoca Cart?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48513
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Product not added to shopping cart

Post by Jan »

Hi, on your site, you are using AJAX add to cart and when you add the product to cart, you get error in console:

"<span class=\"ph-result-txt ph-error-txt\">The most recent request was denied because it had an invalid security token. Please refresh the page and try again.</span>"

So the problem is with tokens, do you use some specific cache extension on your site? When you disable AJAX add to cart, do you get the same problem?

Jan
If you find Phoca extensions useful, please support the project
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 129
Joined: 15 Sep 2023, 10:51

Re: Product not added to shopping cart

Post by landed »

Thanks Jan, you have found the issue. I don't use a special cache plugin just the regular. I am using Joomla 5 and latest release of Phoca Cart.
The issue which I highlighted right at the start of using this component is the UX issue that when you add to cart you get an ugly message but then no way to get to the checkout.

Can you highlight any insight into finding what conflicting plugin may be. If I go to manage plugins if I disable one by one will it work or do I need to do it at the plugin level?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48513
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Product not added to shopping cart

Post by Jan »

Hi, sending tokens inside forms is completely Joomla feature, so it is hard to say what can be wrong on your Joomla site that it does not accept the tokens. Really hard to say. If not specific cache, is on your site some specific feature (e.g. some security, etc.)?

Jan
If you find Phoca extensions useful, please support the project
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 129
Joined: 15 Sep 2023, 10:51

Re: Product not added to shopping cart

Post by landed »

Can I add a button which is showing a clear path to checkout then? This would be a workaround. That's the only reason I am using the Ajax before. I'd be keen to build my own override if you can help me find the relevant code.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48513
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Product not added to shopping cart

Post by Jan »

Hi, what do you mean with "clear path to checkout then"?
If you find Phoca extensions useful, please support the project
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 129
Joined: 15 Sep 2023, 10:51

Re: Product not added to shopping cart

Post by landed »

As I said on this form previously when I first started with Phoca Cart which is amazing by the way. The UX flow is broken.
When you add a product to the cart then you would expect to be able to checkout with a button or some redirect to the cart. There is no easy way to provide this apart from a menu item which then the user has to hunt for.
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9562
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Product not added to shopping cart

Post by Benno »

Hi,
When you add a product to the cart then you would expect to be able to checkout with a button or some redirect to the cart. There is no easy way to provide this apart from a menu item which then the user has to hunt for.
Mmmmm, see Demo and images:

Image

Image

Image

Kind regards,
Benno
Post Reply