• Resolved MsPrince

    (@msprince)


    Greetings, I am so pleased that marketpress finally has a decent product image gallery.However the one issue that makes it rather difficult to us is the fact that it doesn’t seem to use the product featured image as its main image. What happens on the product page is a featured image and then in the content area below another large image with the gallery beneath.
    Is there a way to have the featured image set as the the main image and then place it in the area above the content?
    Cheers

    https://www.ads-software.com/plugins/marketpress-product-gallery/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter MsPrince

    (@msprince)

    I replaced the featured image in the product template with your plugin, looks good now, although the featured image is still separately displayed elsewhere but not a problem for me.

    Hi thanks for the great plugin. I managed to hack this so it will include the featured image on the gallery.

    here’s the code:https://pastebin.com/UU9CkxRm

    I hope this will be included in future release.

    Also another issue is the zoom view is small any idea how to make it bigger?

    Hi @msprince,

    Awesome, great to see you got that resolved.

    Please advise if you have more questions.

    Have a great day!

    Cheers,
    WPMU DEV

    Hi @johnthewebguy,

    I hope you are well today and thank you for your question.

    I managed to hack this so it will include the featured image on the gallery.

    here’s the code:https://pastebin.com/UU9CkxRm

    I hope this will be included in future release.

    I have added this over to the features & feedback section. This way it can be considered for future development.

    Also another issue is the zoom view is small any idea how to make it bigger?

    You can make the Zoom View larger by adding the following CSS code in the style.css file of your child theme or add it in your site using the following plugin.

    https://www.ads-software.com/plugins/simple-custom-css

    .magnifyarea{
    	height: 400px !important;
    	width: 500px !important;
    }

    Best Regards,
    WPMU DEV

    Thread Starter MsPrince

    (@msprince)

    Very nice with adding the featured image. I just had a question about what was put in paste bin and where to add it. So in the file mp_image_gallery.php do you replace the bit on line 231-242 with what is in paste bin? when I do that it does put the featured image in but it does not include the other images in the gallery? Is this correct, since it seems to get rid of multiple images and only displays the one featured image. I feel I must not be adding it correctly. If you have any insight as to how to make this work I would be grateful.
    Thanks for sharing.

    Hi @msprince,

    To add Product featured image in the Product Image Gallery you can just edit the following MarketPress Product Image Gallery plugin file on line number 26 after foreach loop.

    MarketPress Product Image Gallery plugin file:
    marketpress-product-gallery\includes\gallery.php

    Before Editing:

    }

    After Editing:

    }
    $html .= '<li>';
    	$featured_img_id = get_post_thumbnail_id( $id );
    	$thumb = wp_get_attachment_image_src($featured_img_id, 'mp-thumb');
    	$large = wp_get_attachment_image_src($featured_img_id, 'mp-large-view');
    	$html .= '<img src="'. $thumb[0] .'">';
    	$html .= '<input type="hidden" value="'.$large[0].'">';
    	$html .= '<div class="mp_hide">Featured Image</div>';
    $html .= '</li>';

    Note: You are making changes in the plugin file and these changes will be overwritten and lost when you update the plugin and you will have to make these again after plugin updation.

    Best Regards,
    WPMU DEV

    Thread Starter MsPrince

    (@msprince)

    Thank you so much for the help, it worked very nicely.
    Also in order for the featured image to be the product page image and the first displayed on the page I also replaced this bit in the same file

    $large = wp_get_attachment_image_src($mp_prod_img_id[0], ‘mp-large-view’);
    $html .= ‘<img class=”mp_zoom” src=”‘. $large[0] .'”>’;

    with this bit, It seems to be working although I’m no expert.

    $featured_img_id = get_post_thumbnail_id( $id );
    $large = wp_get_attachment_image_src($featured_img_id, ‘mp-large-view’);
    $html .= ‘<img class=”mp_zoom” src=”‘. $large[0] .'”>’;

    Also, something I just noticed is that after you add an image to the gallery you cannot delete the very first one, it can be replaced, but even if you delete the path it will keep the image.
    Just thought I’d mention it since someone might want to clear out all images except the featured image.

    Cheers and thanks again!

    Hi @msprince,

    Thanks for sharing more information about it.

    I hope this may help others.

    You are most welcome, if we can be of any further assistance please don’t hesitate to ask ??

    Cheers,
    WPMU DEV

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Intergration with featured image and placement’ is closed to new replies.