Jump to content

Error in custom code, product not found when adding to shopping cart

Recommended Posts

Hi all,

As I'm setting up a new website, I was having some issues with adding products to the cart.

When I want to add the product to the cart through the button on the product detail page, it gives me the error

''Cannot add item''

''The product wasn't found''

This problem only seems to occurs with products that have different variants. The ones without a variant get added to the cart fine.

I contacted SQSP Support and they told me that the problem lies in the custom code I'm using for the website., because after they turned off scripting the issue seemed to be fixed. This means that the only way I can get it to work is by fixing the code.

Is there anyone here that could look at the code and perhaps find the issue?

Screenshot 2024-05-08 at 16.07.16.png

Link to comment
  • Replies 1
  • Views 161
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

2 hours ago, jelsan said:

This means that the only way I can get it to work is by fixing the code.

Can you share your website URL and all of the custom code you have installed?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.