Home › Forums › WoodMart support forum › Choose Related products
Choose Related products
- This topic has 25 replies, 2 voices, and was last updated 6 years, 10 months ago by Artem Temos.
-
AuthorPosts
-
January 17, 2018 at 1:57 pm #33822
leds-prosParticipantHello,
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-ProsJanuary 17, 2018 at 3:00 pm #33835
Artem TemosKeymasterHi,
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
January 17, 2018 at 4:36 pm #33859
leds-prosParticipantExactly what I need.
Thanks a lot.January 17, 2018 at 5:21 pm #33863
Artem TemosKeymasterSorry, 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.
January 17, 2018 at 6:29 pm #33881
leds-prosParticipantI 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 ?
January 17, 2018 at 8:37 pm #33900
Artem TemosKeymasterWe will release it next week for sure. Otherwise, we will provide a fix directly for you.
January 17, 2018 at 9:09 pm #33907
leds-prosParticipantThanks a lot. No matter. I can wait one week 😉
January 18, 2018 at 8:21 am #33939
Artem TemosKeymasterMaybe 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' ); } }
January 18, 2018 at 3:30 pm #34068
leds-prosParticipantThanks 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.
January 18, 2018 at 3:44 pm #34080
Artem TemosKeymasterBut we don’t see the code added http://prntscr.com/i28kgs
Could you please check it?January 18, 2018 at 6:01 pm #34100
leds-prosParticipantEffectively. 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.January 18, 2018 at 6:26 pm #34111
Artem TemosKeymasterAre you able to provide us your FTP access so we can try to add this code properly for you?
January 18, 2018 at 7:17 pm #34127
leds-prosParticipantOf course.
January 19, 2018 at 9:11 am #34186
Artem TemosKeymasterOK, we have added the code for you. Please, check how it works now.
January 19, 2018 at 9:25 am #34190
leds-prosParticipantVery 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.January 19, 2018 at 10:01 am #34194
Artem TemosKeymasterYes, 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.
January 19, 2018 at 10:07 am #34201
leds-prosParticipantThanks for your answer.
So I have to make a choice… because autoplay force to see products…January 19, 2018 at 10:18 am #34207
Artem TemosKeymasterYes, it is. Sorry, but there is no other solution for this problem.
January 19, 2018 at 10:40 am #34211
leds-prosParticipantI 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.January 19, 2018 at 12:22 pm #34220
Artem TemosKeymasterThank you for understanding. So how do you want to show your arrows there?
January 19, 2018 at 12:27 pm #34223
leds-prosParticipantI 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 ?January 19, 2018 at 12:52 pm #34236
Artem TemosKeymasterTry 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; }
January 19, 2018 at 1:18 pm #34249
leds-prosParticipantCSS or function.php ?
January 19, 2018 at 1:28 pm #34250
Artem TemosKeymasterTo the custom CSS section.
January 19, 2018 at 1:42 pm #34251
leds-prosParticipantYes ! 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…
January 19, 2018 at 2:33 pm #34258
Artem TemosKeymasterGreat, you are welcome!
-
AuthorPosts
- You must be logged in to create new topics. Login / Register