• Resolved Aleks

    (@akaracing)


    Hi,

    This is a great plugin.

    Was wondering if there is a way to associate a colour for example as the slug to the image, in a custom field. So take the colour field and use that as the slug for the variation.

    The reason why i ask, we have approx 3700+ products, a lot of the product have variations, normal the colour, and each variation has about 3-6 images.

    We current use WP all Import by Soflyy which has the ability to use custom field on import of stock files. So would it be possible to do this.

    Kind regards

    Aleks
    Hangar47

    https://wordpress.org/plugins/smart-variations-images/

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

    (@drosendo)

    Hi,

    Well in my previous versions I was looking for the variation slug in the image name.

    Example: image_colour.jpg

    If there would be a match it would filter…

    but it showed to be very hard to manage.

    Is this what you mean?

    Thread Starter Aleks

    (@akaracing)

    Hi,

    Some thing like that

    our product consist of the following for example:

    Description, Price, Colour, Size & images, the variation is based on the Size & Colour.

    When we import our stock we import all the images associated to each variation.

    So maybe it would be better to upload all the images to all the variations and then filter based on filename or alt or title

    Plugin Author David Rosendo

    (@drosendo)

    Well,

    In the initial version I was storing the data in the caption field.

    Example: in the caption field I would store the variation “black”

    later for the migration process I added the tweek to merge the old method with the new.

    Add the codes after line 309 after woo_svi_field function:

    $caption = get_post($post->ID);
    if ($caption->post_excerpt != '') {
        add_post_meta($post->ID, 'woosvi_slug', $caption->post_excerpt,true);
    }

    This will loop (when you open the images in products and scroll down) all images and read the Caption and store it on the right place. Just be sure to have the slugs created and matching.

    This may help you transition smoothly.

    I hope I have explained myself.

    Thnaks,
    David

    Thread Starter Aleks

    (@akaracing)

    Hi,

    Thanks, will give it a go and see what happens

    cheers

    Aleks

    Plugin Author David Rosendo

    (@drosendo)

    No problem.

    If you like the plugin please rate it 🙂

    PS: after its done, remove the code. 🙂

    Thanks

    Plugin Author David Rosendo

    (@drosendo)

    Closed Ticket

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom Field’ is closed to new replies.