How to show brand logo as swap image - by mc9625

This topic has 6 replies, 2 voices, and was last updated 9 years, 9 months ago ago by Eva Kemp

  • Avatar: mc9625
    mc9625
    Participant
    January 22, 2015 at 15:02

    I would like to show the brand logo image as product swap image. Could you help me please?

    Thanks

    Massimo

    5 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    January 22, 2015 at 15:14

    Hello,

    You can upload an image for hover effect in products editor. Go to Products > select a product to edit and in “Additional Product Options [8theme]” find the field “Upload image for hover effect” and upload your brand logo.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: mc9625
    mc9625
    Participant
    January 28, 2015 at 13:42

    Hi Eva, thanks for the reply.

    Is there a way to do that with a bit of PHP? I have hundreds of products and do that for each single item could take a lot of time.

    Something in \woocommerce\content-product.php ?

    Avatar: Eva
    Eva Kemp
    Support staff
    January 28, 2015 at 14:43

    Hello,

    Do you want to use one hover image for all products?
    In this case you may edit the file legenda/woocommerce/content-product.php (line 77), find the code <img src="<?php echo $hoverImg['url']; ?>" and replace <?php echo $hoverImg['url']; ?> with image link.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: mc9625
    mc9625
    Participant
    January 29, 2015 at 16:53

    Almost.

    since I have hundreds of products and more than 20 producers (brands), actually instead of a fixed image link, I need to have a piece of code that retrieves the brand logo image. (I think something like the code you’ve used to retrieve the brand logo in the single product page sidebar). This way each product should have it’s own brand logo image as swap image.

    Avatar: Eva
    Eva Kemp
    Support staff
    January 29, 2015 at 17:23

    Hello,

    Try to use this code <?php et_product_brand_image(); ?> for img src in the file legenda/woocommerce/content-product.php.

    Thank you.
    Regards,
    Eva Kemp.

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.