Hover effect swap does not work - by nik_kef

This topic has 8 replies, 3 voices, and was last updated 6 years, 6 months ago ago by Rose Tyler

  • Avatar: nik_kef
    nik_kef
    Participant
    May 21, 2018 at 15:11

    Hello,

    Could you please check my site why the swap effect does not work?
    Please visit the link below:

    http://gypenzzo.wpengine.com/category/just-arrived/

    Best regards

    7 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 22, 2018 at 05:39

    Hello,

    Can you please provide me temporary Dashboard access to your site to check the settings and find the reason of the problem?

    Regards

    Avatar: nik_kef
    nik_kef
    Participant
    May 22, 2018 at 10:22

    Hello,

    Yes off course.

    See the details below.

    Best Regards

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 22, 2018 at 10:53

    Hello,

    You need to upload images for hover effect http://prntscr.com/jl1y4f
    Your images load in media library – http://prntscr.com/jl1ynz as unsecured but your site use https, this creates a Mixed Content error. You need to contact your admin or hosting provider to fix the https problem, then you will be able to upload images for hover swap effect.

    Regards

    Avatar: nik_kef
    nik_kef
    Participant
    May 22, 2018 at 11:59

    Hello,

    I have fixed that through general settings by changing the url. Is there a more efficient way than editing one by one the products in order to have a hover image?
    Would that be possible through wp all import to manage that?
    Is there any field that this setting produces while exporting so I can go there and set it to take the first image of the product galley images?

    Best Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 22, 2018 at 12:26

    Hello,

    By default, you need to upload all images for hover effect manually.
    It is possible to take the first image of the product gallery via additional customization:
    – copy content-product.php and content-product-slide.php files from legenda/woocommerce folder into woocommerce folder in your child theme;
    – change this code https://prnt.sc/jl35fi (content-product.php) and this one https://prnt.sc/jl35zg (content-product-slide.php) to https://prnt.sc/jl35ot

    if ( $hover == 'swap' ) {
    
    	$attachment_ids = $product->get_gallery_image_ids();
    
    	if ( count($attachment_ids) > 0 ) {
    		$hoverUrl = wp_get_attachment_image_src( $attachment_ids[0] );
    		$hoverImg = wp_get_attachment_image( $attachment_ids[0], $image_size);
    	}
    
    }

    Regards

    Avatar: nik_kef
    nik_kef
    Participant
    May 22, 2018 at 12:51

    Hello,

    Thank you very much. It worked indeed.
    I wish I was at your level to write that code.

    Thank you

    Best regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 22, 2018 at 13:08

    Hello,

    You’re welcome!
    We’d appreciate if you could take a moment to give us 5-stars on ThemeForest 🙂 https://themeforest.net/downloads

    Regards

  • Viewing 8 results - 1 through 8 (of 8 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.