variant image

Hi Guys,

I am new to Marketpress and think its great. I just have one questions, is there anyway I can have an image associated to a product variant?

Many thanks, Ben

  • ben.barton
    • WPMU DEV Initiate

    Hi Espen,

    It would be great to have an image as part of the product description that changes to the image associated to the variant on selection. Also would you be able to explain how to add the field to the product var as this could be useful for other challenges I have to.

    Thanks,

    Ben

  • aecnu
    • WP Unicorn

    Greetings Ben,

    Welcome to WPMU DEV!

    Thanks for bringing this up, it certainly sounds like a useful customization to the plugin.

    Unfortunately, it is not currently available – but we would love to put it into consideration for future development

    I have moved this ticket to the applicable feature requests area and I have alerted the lead developer to the request.

    It might take a bit longer than useful but alternatively, you could see if there’s a developer available at wpmu jobs who could get onto it right this minute

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

  • espsjurs
    • The Incredible Code Injector

    Hi Ben,

    If the main reason is to do this is to be able to show var images on selection, the biggest challenge is to make the picture change on select.. This might be possible using ajax, but I have no knowlege of how to do this.

    To set up the var images it might be the best way not to create custom fields, but insert the images to the post gallery tagged or named in a way to logical connect to vars. Then using the product page template to pull the correct image from the gallery.

    If you insist to create custom fields I would suggest not change the admin page for product edit, but add the field to metatag for use within the product template only. Then i would change my own extended product importer to insert the metadata on import.

    But, again – my suggestion is to use the post gallery to set up the images for variant and create your own product.php to do the logic to set the var images in product view.

    Espen

  • espsjurs
    • The Incredible Code Injector

    Hi again,

    I did a small test to see how hard it was to add a custom field for variant image.. I did the changes in the MP plugin file 'marketpress.php', no changes made, just added some lines here and there :slight_smile:

    Espen

  • ben.barton
    • WPMU DEV Initiate

    Hi Espen,

    Thank you for your help. I will have a look at the marketpress.php file tomorrow. Really useful to see the screen grabs. Would you be able to do a screen grab of the code so I know were to edit in the PHP file?

    Many thanks,

    Ben

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.