Tagged: 

Viewing 27 posts - 1 through 27 (of 27 total)
  • Author
    Posts
  • #927987

    Hi
    I put together a page using the Catalog element. I told my client that the images will expand into a a lightbox carousel. (the page is meant to be a viewing page only. The only links should be to the lightbox- not the single product page.)
    The page is called “Menu at a Glance”

    also, while you are there, can you help me get rid of the gray strip under the main menu?

    #928808

    Hey KK,

    I loaded that page, it is a product grid, I do not see any carousel at all I am afraid.
    Are you sure you have setuped it right?

    Best regards,
    Basilis

    #928811

    No, I’m not.
    Right now am restoring back up because the site had issues after I updated my theme….

    #929580

    Hi,

    Please do let us know when the site is backed up and we will be happy to take a look at the issue and help you resolve it :)

    Best regards,
    Vinay

    #931670

    the site is back! the page is “Menu (at a glance)
    thanks

    #932150

    Hi,

    Web site is temporary offline
    Could you please check?

    Best regards,
    Basilis

    #932180

    The site is not live yet. I have the wordpress admin login above in the private area.
    The site is up, sorry I forgot to add http://www.shopcakemonkey.com/wp-admin/

    #932799

    Hi,

    There are only two options for the Product List’s “Item Links” settings. First is a link to the actual product page and other will add the product directly to the cart. Unfortunately, you can’t set it to open inside a lightbox. If that’s what you’re after, please use the “Catalogue” element instead. Set “Item Link?” to the second option.

    Best regards,
    Ismael

    #933129

    I see.
    Because there are so many products the catalog element is not so efficient.
    My client would be double entering the products on this page.
    It would not be populating from the “Products”

    I just got the layout for that page perfected. Is there a work-around?

    #933408

    Hey!

    There’s a workaround but you have to add this script in the functions.php file.

    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
       function a() {
    	   $('.av-catalogue-list li a').each(function() {
    		   var image = $(this).find('img').attr('src');
    		   $(this).attr('href', image)
    	   })
       }
    
       a();
    })(jQuery);
    </script>
    <?php
    }
    

    Don’t forget to resave the theme options, purge the plugin and browser cache or do a hard refresh before checking the page.

    Best regards,
    Ismael

    #933774

    Thanks–
    I get this error message for the “ava_custom_script” line:
    ———————–

    Your PHP code changes were rolled back due to an error on line 165 of file wp-content/themes/enfold-child/functions.php. Please fix and try saving again.

    syntax error, unexpected ‘function’ (T_FUNCTION)

    ———————–
    advice?

    #934086

    Hi kbarranco,

    I added the code and it saved just fine.
    Please check.

    Best regards,
    Victoria

    #941092

    Thanks for your help but my lightbox is showing the product at 100%. The purpose of the lightbox is to get a closer look. How can this be about 300% bigger? I tried a few things but couldn’t nail it.
    https://ibb.co/dxuS6n

    #941531

    Hi kbarranco,

    Catalog is using small thumbs and this is the image that is shown in the lightbox, you could stretch it by css but it will lose quality. This element is not meant for such modifications. You might want to consider using another element.

    Best regards,
    Victoria

    #941603

    It’s too late to recreate this.
    so when I asked for help with the lightbox, which I appreciate, the end result was the same size image poping up? I may have forgetten to say it needs to be enlarged on pop up?

    • This reply was modified 6 years, 7 months ago by kbarranco.
    #942068

    Can anyone make a suggestion besides hiring a developer? I would rather take the lightbox option off than spend more money at this point. You guys are so helpful. ;)

    #942290

    Hi,

    Unfortunately doesn’t seem there is an other solution – were you can disable the option if you do not like it yes.

    Best regards,
    Basilis

    #942346

    I think I mis-communicated. the page is a woo-product page and I am using the Product list.

    #942901

    Hi,

    I get this error message for the “ava_custom_script” line:

    Did you copy the code from your email? Please copy it directly from this forum. Or provide the WP/FTP login details in the private field so that we can add it.

    Best regards,
    Ismael

    #943011

    Oh -that would be great if you can take a look.

    the problem with the catalog is it does not pull the woo commerce products in. My client would have to enter twice which could cause confusion for them with so many items’

    • This reply was modified 6 years, 7 months ago by kbarranco.
    #943972

    Hi,

    We’ve added the script in the functions.php file. It should apply the image url as the value of the catalogue items’ href attribute. Expect the catalogue items to open an image inside a lighbox. Please purge the cache prior to checking the page.

    Best regards,
    Ismael

    #943976

    Thanks-!! I didn’t see the change but I will restart my browser.
    Did you go to : http://www.shopcakemonkey.com/menu-2
    and is the lightbox image larger?
    https://ibb.co/mkEa6n

    here is what I see. when I click a product the lightbox shows an image that is smaller than the original. The only thing that needs to happen is a larger lightbox image. everything else is perfect

    • This reply was modified 6 years, 7 months ago by kbarranco.
    #944999

    Hi,

    Thank you for the update. Note that we applied the same image url to the catalogue item so it will open the same image inside a lightbox. Use larger images in the catalogue items’ “Thumbnail Image” option.

    Best regards,
    Ismael

    #945001

    So it is just isolating the image in a slide show? It’s not letting the user see it closer/bigger.
    I have the thumbnails at 550- and that didn’t help. I’m at a loss.
    and my images are blurry.
    Don’t want to bug you guys anymore with this. I’ll figure something out

    #945008

    Hey!

    We used this filter in the functions.php file to change the thumbnail size from ‘square (180x180px)’ to ‘shop_single (550x550px). ( see private field )

    add_filter('woocommerce_loop_add_to_cart_link', 'avf_woocommerce_loop_add_to_cart_link_mod', 10, 1);
    function avf_woocommerce_loop_add_to_cart_link_mod($product) {
    	global $product;
    
    	$product_id = method_exists( $product , 'get_id' ) ? $product->get_id() : $product->id;
    					
    	$link 	= 	$product->add_to_cart_url();
    	$ajax_class = 'add_to_cart_button product_type_simple';
    	$text	= "";
    	$title 	= 	get_the_title($product_id);
    	$content = 	get_the_excerpt($product_id);
    	$price = 	$product->get_price_html();
    	$rel   = "";
    
    	if(empty($link_behavior))
    	{
    		$cart_url = get_the_permalink($product_id);
    		$ajax_class = "";
    	}
    	else
    	{
    		$cart_url = $product->add_to_cart_url();
    		$ajax_class = $product->is_purchasable() ? "add_to_cart_button ajax_add_to_cart" : "";
    		$rel = $product->is_purchasable() ? "rel='nofollow'" : "";
    	}
    
    	$product_type = method_exists( $product , 'get_type' ) ? $product->get_type() : $product->product_type;
    
    	$image = get_the_post_thumbnail( $product_id, 'shop_single', array('class'=>"av-catalogue-image av-cart-update-image av-catalogue-image-{$show_images}"));
    
    	$text .= $image;
    	$text .= "<div class='av-catalogue-item-inner'>";
    	$text .= "<div class='av-catalogue-title-container'><div class='av-catalogue-title av-cart-update-title'>{$title}</div><div class='av-catalogue-price av-cart-update-price'>{$price}</div></div>";
    	$text .= "<div class='av-catalogue-content'>{$content}</div>";
    	$text .= "</div>";
    
    	echo "<li>";
    
    	//coppied from templates/loop/add-to-cart.php - class and rel attr changed, as well as text
    
    	return sprintf( '<a %s href="%s" data-product_id="%s" data-product_sku="%s" class="av-catalogue-item %s product_type_%s">%s</a>',
    		$rel,
    		esc_url( $cart_url ),
    		esc_attr( $product_id ),
    		esc_attr( $product->get_sku() ),
    		$ajax_class,
    		esc_attr( $product_type ),
    		$text
    	);
    }
    

    Regards,
    Ismael

    #945018

    omg omg omg!
    perfect! The images look great!
    You have outdone yourself!!!

    #945702

    Hi,

    Awesome! Glad we could help!
    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Ismael

Viewing 27 posts - 1 through 27 (of 27 total)
  • The topic ‘Catalog images link to Lightbox Carousel’ is closed to new replies.