Elite Gallery in Page – adding buttons?

Support Area Forums Elite Elite Gallery in Page – adding buttons?

Viewing 2 posts - 1 through 2 (of 2 total)
URL to the page in question: http://
  • Author
    Posts
  • #34160
    glen hearnden
    Participant

    Hi Bill,

    Hope you’re well?

    Have a client website that has been started using Elite and Woocommerce, they sell artwork. I had set up each artwork piece as a ‘product’ in WooC, so they show in the Shop (which is actually called a Gallery (to show art).

    Client now wants the ‘standard in page gallery’ effect , showing the images, then when clicked showing in lightbox format —- but then within the lightbox image showing, can they have a ‘BUY NOW’ link/button to click through to the product itself…

    In short, can you add buttons inside the lightbox window, to allow click through to a specific product page?

    Hope this makes some sense even if not a lot…?

    Paul

    #34162
    Bill Robbins
    Moderator

    Hi Paul,

    Interesting question. I did a quick search to see if I could find a WooCommerce extension that does that and I didn’t turn one up.

    I suspect you could do this on your own though. One way to do that would be to create a directory in a child theme called woocommerce. Inside that directory, create another one called single-product. Lastly in that folder, copy the product-thumbnails.php file from inside the WooCommerce plugin’s template folder to that new spot in your child theme.

    This is the line that you’ll want to change:

    
    echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<a href="%s" class="%s" title="%s" data-rel="prettyPhoto[product-gallery]">%s</a>', $image_link, $image_class, $image_title, $image ), $attachment_id, $post->ID, $image_class );
    

    The caption is generated by this part I believe:

    
    title="%s"
    

    so you’ll want to add your buy now button there. Hopefully that’ll get you pointed in the right direction. It’s not something I’ve ever tried, but that’s how I would get started.

    Have a great week,
    Bill

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Elite Gallery in Page – adding buttons?’ is closed to new replies.