cancel
Showing results for 
Search instead for 
Did you mean: 

Add to cart not working for some products

Add to cart not working for some products

On this page https://staging.die-edelhelfer.de/ortlieb-back-roller-classic-ql2-1-fahrradtasche-paar-aphalt-black.... when I click on add to cart the product is not added. Instead the page is reloaded and I see the error message: Unique constraint violation found

When I look in the browser inspector in the response there is nothing.

Normally there should be [] for Json response I think.

Could someone please help me with this problem?

 

add_to_cart_edelhelfer.png

2 REPLIES 2

Re: Add to cart not working for some products

Hello @Nevaf Ay,

Greetings!

It can be possible due to your DB is not being properly imported. There is some broken reference in that.

So kindly check that again.

 

I hope this will help you to resolve your issue.

If not, feel free to contact us.

If worked? Click KUDOS and accept as a solution.

 

Thank you!

Re: Add to cart not working for some products

Thank you @namitapare2a78 for the answer.

I tried this https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-db-status.ht...

The return is "All modules are up to date."

 

After that I tried this https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-db-upgr.html

The return is "Nothing to import."

 

After that I can add one Simple Product to cart.

Like this one: https://staging.die-edelhelfer.de/ortlieb-back-roller-classic-ql2-1-fahrradtasche-paar-aphalt-black....

But it works only one time.

When I try it ones more with another simple product the error is the same: Unique constraint violation found

 

What else can I do?