3

I'm adding Store to a site with a channel of existing products. Store installed correctly and works. I was getting this error when trying to add a product to my cart:

The form you submitted contained the following errors
Store: Can't find product (entry ID: 8238, modifiers [])

I figured out that if I add price to a product and save it in the Control Panel, it will allow me to add to cart. Since there are over 1000 products, I ran a sql to insert a row for each product entry_id into exp_store_products with a price of 0 and the other columns default, as this is the data that appeared to change when I added a price and saved the first product.

I also added [store] to the custom Store field for the products channel, as that is what I saw in the products I had saved already.

I still get the same error with all products, though in the Control Panel edit page for the entries the price shows up. Unless I save each product, its not working. I looked for some array stored somewhere, a cache file, etc. of all the entries that Store considers products, but don't see one.

What else can I do in bulk to get all these products to add to the cart? I don't want to click save on 1000 products in the Control Panel.

3
  • @adrian-macneil are you able to help on this one? Mar 25, 2015 at 18:00
  • Do you products have modifiers set? I had a similar error occur when trying to add products to a cart without specifying a modifier. Your best bet anyway is probably to write a SQL query to INSERT rows into exp_store_products and the other store tables in bulk for all the entries you have in exp_channel_titles. Mar 25, 2015 at 22:20
  • Just wanted to note this issue can also arise on checkout if you use {exp:store:product} tags inside of {exp:store:checkout} tags. Presumably because of nested forms. Apr 8, 2016 at 21:21

1 Answer 1

2

You also have to update exp_store_stock with some basic info.

1
  • Thanks Manuel. I swear I checked every table for data. Not sure how I missed that. Added the rows for each product there and we're good! Mar 26, 2015 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.