• Hi,
    I am currently using your plugin which works great. I am using CSV upload for my products and with the plugin I am using I cannot set the Sample area meaning I would have to go into each product and do this manually. As this will take ages I wondered if I could do this via the database? I have located my products in my wp_posts table but cannot see where the field for the sample is so I can write an SQL query.

    Thanks,
    Becks

    https://www.ads-software.com/plugins/woocommerce-sample/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi, I am in the same situation.
    Please if you find out a way, could you let me know?

    Thread Starter DesFab

    (@desfab)

    Hi,
    I have found a solution although I have not created the sql query yet but I have found the correct area/fields of the database.

    Go to your database area and you are looking for a table called wp_postsmeta and you can see the fields you need by running query;

    SELECT * FROM wp_postmeta WHERE meta_key LIKE ‘%Sample%’

    Once all my products are added to the site I am going to create a new SQL query to update all to;

    sample_enamble = 1
    sample_price_mode = custom
    sample_price = 0.99
    sample_shipping_mode = FREE

    Sorry I have not written query yet and won’t be for a bit but hopefully this will help you.

    Thanks, i will take a look to it.

    Thread Starter DesFab

    (@desfab)

    How did you get on with this – trying to write my sql code now and its more complex than I imagined!

    Actually, you will need to create entries for enable the product.
    then update the rows on wp_postmeta.
    Finally my client is doing it manually, because also want to do some changes on the products.

    Thread Starter DesFab

    (@desfab)

    Has anyone got any ideas about this as I am stuck!

    If you use all in one import, you can update custom fields, where appears all fields you need. check it and write me back if you have any question.

    lifestylefloorsdirect

    (@lifestylefloorsdirect)

    Did you find a solution to this?

    I change the way setting up as variable products. with Real product and Sample products as variations

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Update all via database’ is closed to new replies.