• Resolved SFS252

    (@sfs252)


    This is exactly what I am looking for! I only want thumbnail images to show up for one color and change images when the user selects a different color from the dropdown.

    My question is…. I have thousands of products to upload and I am using WP All Import to do this. Will this plugin work with WP All Import with the excel file? Has anyone tried this plugin with mass upload with success?

Viewing 1 replies (of 1 total)
  • Plugin Author David Rosendo

    (@drosendo)

    Hello,

    For WP All Import clients have made their custom script.

    The pairing is done via a update_post_meta, example:

    update_post_meta($id_of_image, ‘woosvi_slug’, ‘variation_slug’);

    $id_of_image: id of the image itself
    variation_slug: the slug of the variation, example, variation called “Extreme Black” the slug would be “extreme-black”

    You will have to figure out a way to make that work with “All import”.

    On a last case scenario, use a custom code:

    
                $arr = array(
                    0 => array(
                        'ID' => 12001, //ID of the image
                        'woosvi-slug' => 'conhac' //Slug of the variation
                    ),
                    1 => array(
                        'ID' => 12002, //ID of the image
                        'woosvi-slug' => 'conhac' //Slug of the variation
                    ),
                    2 => array(
                        'ID' => 12003, //ID of the image
                        'woosvi-slug' => 'conhac' //Slug of the variation
                    ),
                    3 => array(
                        'ID' => 12004, //ID of the image
                        'woosvi-slug' => 'castanho' //Slug of the variation
                    ),
                    4 => array(
                        'ID' => 12005, //ID of the image
                        'woosvi-slug' => 'castanho' //Slug of the variation
                    ),
                    5 => array(
                        'ID' => 12006, //ID of the image
                        'woosvi-slug' => 'castanho' //Slug of the variation
                    ),
                    6 => array(
                        'ID' => 12007, //ID of the image
                        'woosvi-slug' => 'preto' //Slug of the variation
                    ),
                    7 => array(
                        'ID' => 12008, //ID of the image
                        'woosvi-slug' => 'preto' //Slug of the variation
                    ),
                    8 => array(
                        'ID' => 12009, //ID of the image
                        'woosvi-slug' => 'preto' //Slug of the variation
                    )
                );
    
                foreach ($arr as $key => $value) {
                    $result = update_post_meta($value['ID'], 'woosvi_slug', $value['woosvi-slug']);
                    echo "ID: " . $value['ID'] . " Resultado " . $value['woosvi-slug'] . ": " . var_dump($result);
                }
Viewing 1 replies (of 1 total)
  • The topic ‘Pre-Install question’ is closed to new replies.