This topic has 7 replies, 2 voices, and was last updated 3 years, 6 months ago ago by Olga Barlow
The previous – next navigation on the single product page does’t work correctly for my Sales categories. Please see the video bellow. It should show the next or previous product in the category, but sometimes it jumps out of the current category and into the main category of that product.
Prev/Next products displays from the total products list in the order it was added to your site. Our developers are looking if it’s possible to show the products only from the category but we need more time to find out if it’s possible to implement. I’ll inform you once get the answer from our developers.
Thanks. The prev/next navigation is a great feature and it would only make sense if the order of the items follows the order in which they are displayed in the category (at least the main category).
We use the default WordPress functions to get pre/next products from the category https://developer.wordpress.org/reference/functions/get_adjacent_post/
And it displays the products from the main category https://gyazo.com/419544a5a2659e5f0c2e564291f08cf4 not from the subcategory. So, unfortunately, navigation will display products from main category.
OK, i understand. My solution would be to change the main category of the products to SALE. But, on my website, i have added a custom function that sorts the products by SKU. From your explanation i understand that default prev/next order is the order in which the products have been added. So i need to change the prev/next order to also be by SKU. Can you help me with this? Or, at least, point me to the theme file and code lines that implement the order of the prev/next , so i can customize it myself?
Copy et_visible_pruduct function (xstore/framework/theme-functions.php) to child theme functions.php and edit it according to your needs. Or submit customization request here to get help with this from the customization team.
You must be logged in to reply to this topic.Log in/Sign up