Single product page navigation buttons - by Floppy78

This topic has 13 replies, 5 voices, and was last updated 8 years, 6 months ago ago by Eva Kemp

  • Avatar: Floppy78
    Floppy78
    Participant
    May 8, 2015 at 19:26

    Hi!
    I’ve a little question about navigation arrows in single product page. As I can see actually the next and previous buttons let navigate products by date published but I need it to navigate by the same order of the thumbnails on the main shop page. Is it possible to accomplish this aim?
    Basically if I am on the shop page and click on a product, and go to the single page, I’d like to have next/previous links that navigate in the order they were on the shop page.
    Thanks a lot!

    Flora

    12 Answers
    Avatar: Royalty
    Royalty
    Participant
    May 9, 2015 at 08:38

    Exactely the same question here! Any help would be really appreciated!

    Avatar: Eva
    Eva Kemp
    Support staff
    May 11, 2015 at 09:25

    Hello,

    Sorry, but there is no such option to change products order on single product page.

    Regards,
    Eva Kemp.

    Avatar: Royalty
    Royalty
    Participant
    May 11, 2015 at 12:56

    But could you make this possible in further updates? I will now disable the buttons because the problem is not only that this is very confusing for the customers – it is even counterproductive: Imagine a customer is using the arrows to switch between the products. Then, he reaches the point when he can not go further and he thinks that he has reached the last product and leaves the shop. But in realty, this was not the last product but for example the 10th and there are 50 more to come. The arrows just wont show them, because the products are ordered in custom order. Do you know what I mean?

    Avatar: Royalty
    Royalty
    Participant
    May 11, 2015 at 13:17

    Just checked, you have this problem even on your demosite:
    https://www.8theme.com/demo/royal/?product_cat=accessories
    If you go to the single product page of the fist listed item (the blue pendant) and then use the navigation buttons, the order is as followes:
    – the gold ring (right)
    – the necklage (right)
    – the silver ring (right)
    But then the navigation stops and you think that that you have reached the last item. But there are still the earrings, the bags and so on and you will never detect them if you will not visit the main shop page. I think that this is really a big problem and any help how to fix this would be really appreciated.

    Avatar: Eva
    Eva Kemp
    Support staff
    May 12, 2015 at 11:25

    Hello @Royalty,

    Products order is taken from database. So how products where added so they are shown. Unfortunately it can’t be fixed.

    Please take our apologies.

    Regards,
    Eva Kemp.

    Avatar: Floppy78
    Floppy78
    Participant
    May 28, 2015 at 17:55

    Hi!
    I think I’ve found a solution for this issue.
    I don’t know if is proper to post here my own solution. If not, please, delete this post!
    I have thought it may be useful to someone..:)

    In woopress > woocommerce > content-single-product.php I replaced this piece of code

    <div class="col-lg-6 col-md-6 col-sm-12 product-information <?php if(etheme_get_option('ajax_addtocart')): ?>ajax-enabled<?php endif; ?>">
                    <div class="product-navigation clearfix">
    						<h4 class="meta-title"><span><?php _e('Product description', ETHEME_DOMAIN); ?></span></h4>
                           <div class="product-arrows pull-right">
                                		<?php next_post_link('%link', '<div class="prev-product"></div>', FALSE); ?> <?php previous_post_link('%link', '<div class="next-product"></div>', FALSE); ?>
    								</div>
    					</div>

    with

    <div class="col-lg-6 col-md-6 col-sm-12 product-information <?php if(etheme_get_option('ajax_addtocart')): ?>ajax-enabled<?php endif; ?>">
                    <div class="product-navigation clearfix">
    						<h4 class="meta-title"><span><?php _e('Scegli altri prodotti', ETHEME_DOMAIN); ?></span></h4>
                           <div class="product-arrows pull-right">
                                   <?php next_post_link('%link', '<div class="prev-product"></div>', FALSE); ?> <?php previous_post_link('%link', '<div class="next-product"></div>', FALSE); ?>
                                		
    								</div>
    					</div>

    Basically I used “previous_post_link” and “next_post_link” template tag instead of the theme ones.
    At the moment I did not tried to complete this all with the beautiful rollover which worked on the original function. Maybe is too much for me, maybe I’ll try later..:)

    I don’t know if this is completely correct but is working for me.

    Thanks!

    Flora

    Avatar: Immograf
    Immograf
    Participant
    June 26, 2015 at 09:59

    Hello Floppy!

    I have the same problem!! I want to apply your solution but, I can’t see the difference in code replaced, I only see the change of language translation of Product description
    Can you help me?

    Please, a staff member can tell me if this problem will be solved in future updates?

    Thanks

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 26, 2015 at 14:23

    Hello @Immograf,

    Unfortunately for now this issue can’t be fixed.
    Please take our apologies for the inconveniences.

    Best regards,
    Jack Richardson.

    Avatar: Immograf
    Immograf
    Participant
    June 30, 2015 at 11:54

    Hello Jack,

    It is scheduled to be resolved in future updates?

    Thanks for all!

    Avatar: Eva
    Eva Kemp
    Support staff
    June 30, 2015 at 12:32

    Hello @Immograf,

    We’ve forwarded this query to our developers and they should discuss it due to updates that need to be made to fix it.
    Unfortunately we can’t guarantee it’ll be resolved in the next theme update. Sorry.

    Regards,
    Eva Kemp.

    Avatar: Floppy78
    Floppy78
    Participant
    October 7, 2015 at 16:26

    I’ve just realized that I’ve pasted the same code in my previous reply. Even just in case if may be useful to someone else I’m fixing this error.
    Original code:

    <div class="product-navigation clearfix">
            						<h4 class="meta-title"><span><?php _e('Scegli altri prodotti', ETHEME_DOMAIN); ?></span></h4>
            						<div class="product-arrows pull-right">
            						     		<?php previous_post_link_product(); ?>
            						     		<?php next_post_link_product(); ?>
            						</div>
            					</div>
    

    Modified code for navigating products in the same order of product page:

    <div class="product-navigation clearfix">
            						<h4 class="meta-title"><span><?php _e('Scegli altri prodotti', ETHEME_DOMAIN); ?></span></h4>
            						<div class="product-arrows pull-right">
            						     		<?php next_post_link('%link', '<div class="prev-product"></div>', FALSE); ?> <?php previous_post_link('%link', '<div class="next-product"></div>', FALSE); ?>
            						</div>
            					</div>
    Avatar: Eva
    Eva Kemp
    Support staff
    October 7, 2015 at 16:45

    Hello @Floppy78,

    Thank you for sharing the solution.

    Regards,
    Eva Kemp.

  • Viewing 13 results - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.