Tagged: x
-
AuthorPosts
-
June 14, 2016 at 7:48 am #1041301
Laurent FerrerParticipantHi,
This the report of the WP installation :
WP : 4.5.2
WooCommerce : 2.5.5
X-Theme : 4.5.2
Cornerstone : 1.2.4Customize > WooCommerce > upsells (on – four columns)
Sample product set with three ‘upsells’ product with the same category.In the product page only one product is displayed instead of three and the product is displayed in a random way ?! To verify, you can go to : http://pid-5ei32utf-kkl.ovh/k-shop/t-shirts-hommes/chillizain-chillida-zamalzain . You just need to refresh a few times !
Thank you.
Laurent.
June 14, 2016 at 10:42 am #1041570
ChristianModeratorHey Laurent,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
June 14, 2016 at 10:50 am #1041591
Laurent FerrerParticipantThis reply has been marked as private.June 14, 2016 at 3:33 pm #1042059
DarshanaModeratorHi there,
Thanks for writing in! Could you please try adding the following code into your child theme’s functions.php file.
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_upsells', 15 ); if ( ! function_exists( 'woocommerce_output_upsells' ) ) { function woocommerce_output_upsells() { woocommerce_upsell_display( 4,4 ); } }Hope that helps.
June 14, 2016 at 9:29 pm #1042565
Laurent FerrerParticipantHi,
Thank you for the help Darshana.
If you check the generated code (http://pid-5ei32utf-kkl.ovh/k-shop/t-shirts-hommes/chillizain-chillida-zamalzain/), we have now two ‘<div class=”upsells products cols-4″>‘. The first one is OK with the three upsell products but the second one still displaying one random product based on the three upsells products ?
Thank you.
Laurent.
June 15, 2016 at 6:41 am #1043050
LelyModeratorHi There,
I tried to login to your server via FTP but the credentials is not working. See attached screenshot for the issue I am having. You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time. If the issue still exist after this, please try switching from your child theme to main X theme. This is just to make sure that this is not a result of any custom codes. Then check again. Do let us know how this goes.
June 15, 2016 at 8:19 am #1043177
Laurent FerrerParticipantThis reply has been marked as private.June 15, 2016 at 3:05 pm #1043877
RadModeratorHi there,
Upsells are generated by Woocommerce and we don’t have control over it. It’s just embedded to X theme template but it’s alone a feature of Woocommerce. And it’s actually random because it is upsells’ default option.
If you just wish to change its order, then please remove the above code, and just add this code to your child theme’s functions.php
add_filter ('woocommerce_upsells_orderby', 'change_upsells_order') function change_upsells_order ($order) { //can be title, date, rand, not sure with other options return 'rand'; }Woocommerce source code is also available here https://docs.woothemes.com/wc-apidocs/source-function-woocommerce_upsell_display.html#1277-1292
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1041301 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
