• Resolved w3rider

    (@w3rider)


    We are developing new website for my client using your plugin. In ATUM plugin i need to create a purchase order based on the supplier. what if i had only one supplier for all my products. In many of my product i have more than 20 variations, its hectic to add the supplier name in each and every variations. Is there any way i can just add one supplier name to all my products in general or to deactivate the supplier option alone.

    please let me know the earliest possible.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stock Management Labs

    (@stockmanagementlabs)

    Hi w3rider,

    Thank you very much for your post.

    I have some good news for you. My colleague will reply here soon with a SQL query that will help you update supplier in bulk.

    We will release a bulk edit add-on for most features, but this is due to come later this year.

    Hope this helps.

    Pavel

    Plugin Author Salva Machi

    (@salvamb)

    Hi w3rider,

    To add the same supplier to all your products at once, you can run these queries directly to your mySQL database (using phpMyAdmin for example):

    INSERT INTO wp_postmeta (post_id, meta_key, meta_value)
    SELECT ID AS post_id, '_supplier' AS meta_key, 'XXX' AS meta_value FROM wp_posts
    	WHERE post_type IN ('product', 'product_variation')
    	AND ID NOT IN (
    		SELECT post_id FROM wp_postmeta WHERE meta_key = '_supplier'
    	);
    UPDATE wp_postmeta SET meta_value = 'XXX' 
    WHERE meta_key = '_supplier' AND (meta_value IS NULL OR meta_value = '0' OR meta_value = '');

    Please note that in the above queries, you should replace the XXX by your current supplier ID and if you have a distinct table prefix, you should adapt the wp_posts and wp_postmeta tables too.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘If i had only one supplier for all my products’ is closed to new replies.