Home Forums WoodMart support forum Choose Related products

Choose Related products

Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #33822

    leds-pros
    Participant

    Hello,
    It seems that Related products are chooseen by “categories” ?
    But is it possible to choose or force some products ?
    Thanks for your answer.
    Best Regards,
    Leds-Pros

    #33835

    Artem Temos
    Keymaster

    Hi,

    If you want to select which products to show on the product page then you would better use upsells products for this purpose. Read this article for more information https://docs.woocommerce.com/document/related-products-up-sells-and-cross-sells/

    Regareds

    #33859

    leds-pros
    Participant

    Exactly what I need.
    Thanks a lot.

    #33863

    Artem Temos
    Keymaster

    Sorry, but we didn’t develop this in the last update. We will do this in our next version. Or we can provide you with a custom solution here on the forum.

    #33881

    leds-pros
    Participant

    I believe that this website will be open in 2 or 3 weeks. It depend of you. Do you have an idea of the date for the next update ?

    #33900

    Artem Temos
    Keymaster

    We will release it next week for sure. Otherwise, we will provide a fix directly for you.

    #33907

    leds-pros
    Participant

    Thanks a lot. No matter. I can wait one week 😉

    #33939

    Artem Temos
    Keymaster

    Maybe it would be better if you can add the following code snippet to the functions.php file in the child theme and check is it OK for your first

    	function woodmart_owl_carousel_init( $atts = array() ) {
    		extract( shortcode_atts( woodmart_get_owl_atts(), $atts ) );
    
    		$func_name = 'carousel_' . $carousel_id;
    		$func_name = function() use( $carousel_id, $slides_per_view, $autoplay, $autoheight, $speed, $hide_pagination_control, $hide_prev_next_buttons, $scroll_per_page, $wrap, $dragEndSpeed  ) {
    			
    			$items = woodmart_get_owl_items_numbers( $slides_per_view );
    			ob_start();
    			?>
    
    				jQuery( document ).ready(function( $ ) {
    
    	                var owl = $("#<?php echo esc_js( $carousel_id ); ?> .owl-carousel");
    
    					$( window ).bind( "vc_js", function() {
    						owl.trigger('refresh.owl.carousel');
    					} );
    					
    
    					var options = {
    	            		rtl: $('body').hasClass('rtl'),
    			            items: <?php echo esc_js( $items['desktop'] ); ?>, 
    			            responsive: {
    			            	979: {
    			            		items: <?php echo esc_js( $items['desktop'] ); ?>
    			            	},
    			            	768: {
    			            		items: <?php echo esc_js( $items['desktop_small'] ); ?>
    			            	},
    			            	479: {
    			            		items: <?php echo esc_js( $items['tablet'] ); ?>
    			            	},
    			            	0: {
    			            		items: <?php echo esc_js( $items['mobile'] ); ?>
    			            	}
    			            },
    			            autoplay: <?php echo ($autoplay == 'yes') ? 'true' : 'false'; ?>,
    						autoplayHoverPause: <?php echo apply_filters( 'woodmart_autoplay_hover_pause', 'true' ); ?>,	
    			            autoplayTimeout: <?php echo esc_js( $speed ); ?>,
    			            dots: <?php echo ($hide_pagination_control == 'yes') ? 'false' : 'true'; ?>,
    			            nav: <?php echo ($hide_prev_next_buttons == 'yes') ? 'false' : 'true'; ?>,
    			            autoheight: <?php echo ($autoheight == 'yes') ? 'false' : 'true'; ?>,
    			            slideBy:  <?php echo ($scroll_per_page == 'yes') ? '\'page\'' : 1; ?>,
    			            navText:false,
    			            loop: <?php echo ($wrap == 'yes') ? 'true' : 'false'; ?>,
    						dragEndSpeed: <?php echo esc_js( $dragEndSpeed ); ?>,
    			            onRefreshed: function() {
    			            	$(window).resize();
    			            }
    					};
    
    	                owl.owlCarousel(options);
    					
    				});
    			<?php
    			return ob_get_clean();
    		};
    
    		if( $carousel_js_inline == 'yes' ) {
    			echo '<script type="text/javascript">' . $func_name() . '</script>';
    		} else {
        		wp_add_inline_script( 'woodmart-theme', $func_name(), 'after' );
    		}
    	}
    #34068

    leds-pros
    Participant

    Thanks a lot. Sorry for the late. But I try the code and even if I stay the mouse on picture, the carroussel are still moving… If you want, you can try on home page.

    #34080

    Artem Temos
    Keymaster

    But we don’t see the code added http://prntscr.com/i28kgs
    Could you please check it?

    #34100

    leds-pros
    Participant

    Effectively. You are wright.
    It was written but not at the good place ( in Custom CSS… no coment ).
    So now it is in function.php but… impossible to save due to an error,
    that I capture in the attachment.

    Attachments:
    You must be logged in to view attached files.
    #34111

    Artem Temos
    Keymaster

    Are you able to provide us your FTP access so we can try to add this code properly for you?

    #34127

    leds-pros
    Participant

    Of course.

    #34186

    Artem Temos
    Keymaster

    OK, we have added the code for you. Please, check how it works now.

    #34190

    leds-pros
    Participant

    Very nice. Thanks.
    It is working but when the mouse go out of the picture, the carousel don’t start again.
    I have try to change some functions ( see attachment ) but nothing. After, the carousel is always stop. Is it normal ?

    Attachments:
    You must be logged in to view attached files.
    #34194

    Artem Temos
    Keymaster

    Yes, it stops when you hover but don’t start when you leave this area with your mouse. Sorry, but we can’t change it since it is how this library works.

    #34201

    leds-pros
    Participant

    Thanks for your answer.
    So I have to make a choice… because autoplay force to see products…

    #34207

    Artem Temos
    Keymaster

    Yes, it is. Sorry, but there is no other solution for this problem.

    #34211

    leds-pros
    Participant

    I am sorry too. But this is the life, we cannot have everything 😉
    I will wait…But may be you could help me with another problem. In product page when I have more than 4 pictures some arrows appears to change to next picture. But, as the arrows appears on the middle of the first and last pictures, we have some trouble to display this picture. I put you a link and an attachment because it is not very easy to me to explain you in english…

    Attachments:
    You must be logged in to view attached files.
    #34220

    Artem Temos
    Keymaster

    Thank you for understanding. So how do you want to show your arrows there?

    #34223

    leds-pros
    Participant

    I don’t know but may be not at the middle of images because we can’t display the images.
    May be just move a litlle the arrow would be enough to clic on the first and last image ?

    #34236

    Artem Temos
    Keymaster

    Try to use this code snippet to make them look cleaner

    .thumbnails .owl-nav > div {
        width:25px;
        height:25px;
        margin-top: -12px;
    }
    
    .thumbnails .owl-nav>div:after {
       font-size: 18px;
       line-height: 18px;
    }
    #34249

    leds-pros
    Participant

    CSS or function.php ?

    #34250

    Artem Temos
    Keymaster

    To the custom CSS section.

    #34251

    leds-pros
    Participant

    Yes ! Thanks. The arrows are more little but the result is here. Now It is possible to display first and last image. Thanks for your help and I hope it It will be also useful for you or other customers…

    #34258

    Artem Temos
    Keymaster

    Great, you are welcome!

Viewing 26 posts - 1 through 26 (of 26 total)