Jump to content

SQL Query to copy EAN13 value into combinations EAN13 field


Recommended Posts

Hi there,

I use combinations for my products, and can't get my products on Google Shopping since they got refused because EAN13 field is not filled. Truth is that I have filled this field but, I've just discovered, for each combination of the product, there is an EAN13 field (so, another EAN13 field to fullfill) so my question is: I would like to run an SQL query that copy the EAN13 field of the product into the EAN13 field in the Combination EAN13 field, any suggestion? I just need the Combination EAN13 field name into the database, I cannot find it, just with that I can write my SQL query. Thanks in advance

Link to comment
Share on other sites

Just to clarify the situation, it is not another field to fill out, if you have a product with combinations then you do not put EAN on the product, only on the combinations, these will be interpreted as products in GS

Link to comment
Share on other sites

Ok, thanks for the reply. I have almost 16.000 products, all with the ean13 filed fullfilled, but with the missing ean13 for the combination, so: is there a way to copy that value for each combination avoiding to do this manually for each product?

Link to comment
Share on other sites

Thanks for the advice. I've tried to install Store Commander (thanks for the download Link) but in the installation process, when I'm asked to put infos to start the free trial, it game me tihs error:

"StoreCommander.com cannot be reached: can you check if the fsockopen operation is allowed on your server or if your use a firewall which could block the connection to the storecommander.com server?"

Any idea? 

Link to comment
Share on other sites

Oook, I've solved ^^

The filed I wanted to fullfill was ean13 inside the ps_product_attribute table, so I got some help from ChatGPT in order to put down the exact SQL code, at the end I've used this:

UPDATE
    ps_product_attribute
JOIN ps_product ON
    ps_product_attribute.id_product = ps_product.id_product
SET
    ps_product_attribute.ean13 = ps_product.ean13

and it worked fine, now I hope Google Shopping will like more my products ^_^

Thanks again for your help

Link to comment
Share on other sites

Create an account or sign in to comment

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

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...