Jump to content

[MODULE] Next and previous links on the product page


Recommended Posts

Go to the hook "product footer" then, move the position of the module on that hook. For instance, if the module is in the last position, move it to the top. I am not talking about transplanting the module to another hook, that's another stuff

Wow, thanks. I was confused by what you were saying and trying to edit the 'product links' module and hook it into something else again following your instructions, but that'd still be doing it wrong.

 

Somehow I got to Modules>Positions (I see it now in the backoffice menu, so I'll be spending a lot of time there from now on) and figured it out! I also was able to arrange my page even more. I moved around other modules to make it cleaner and more organized.

 

I've seen the light!

I'm still a newbie, but at least I can arrange my page how I want it, not the default way the module or prestashop wants it (without any mind boggling code!) :rolleyes:

Edited by closeupman (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites
  • 1 month later...

I can not download... link is not correctly or this is problem with my browser.

 

Please check this previous post:

 

Its still available here

 

And this is the page

 

Gonna test it now on my local prestashop v1.5.3.1 and will tell you is it workin...

 

Edit: Its working ye, just with one problem, breadcrumbs appear doubling the category name, as gsv1982 said a few posts back, but in my case, If you disable the module, the double category names are gone too, so you can keep using the store the old way... Gonna try to figure it out why this is happening, will post again if have something.

 

Edit 2: its something here:

$smarty->assign('path', Tools::getFullPath($homepage ? $category->id : ($category->id == 1 ? $product->id_category_default : $category->id), $product->name));

in productlinksnc.php file, but dont know how to change the code :/

 

Edit 3: I manage to do it :)

 

In file classes/Tools.php on line 947 replace:

 

return Tools::getPath($id_category, $category->name, true, $type_cat).'<span class="navigation-pipe">'.$pipe.'</span> <span class="navigation_product">'.htmlentities($end, ENT_NOQUOTES, 'UTF-8').'</span>';

 

with:

 

return Tools::getPath($homepage ? $category->id : ($category->id == 1 ? $product->id_category_default : $category->id), $product->name, true, $type_cat).'<span class="navigation-pipe">'.$pipe.'</span> <span class="navigation_product">'.htmlentities($end, ENT_NOQUOTES, 'UTF-8').'</span>';

 

This is not affecting the website at all, with or without the module activated, BUT, test it in localhost before apply the changes online!

 

Also, I have uploaded it to prestashop account:

pre_next_v1.5.zip

  • Like 3

Share this post


Link to post
Share on other sites

Hi everybody

 

When presing next or previous and product is in few categories module unexpectedly change category on breadcrumb.

Presta 1.5.4.1

After change productFooter to new hook on top of product page bug occured

Homepage navigation is set defaut category.

Can anybody help ?

 

links.png

Edited by Radi (see edit history)

Share this post


Link to post
Share on other sites
  • 3 weeks later...
  • 2 weeks later...
  • 3 weeks later...

I see the file in post #104.  Is that current? 

 

I would love to see some module images indicating where the prev/next page indicators appear on the page.

 

Anyone know who owns/run this module now? Is it still overseen by @Rocky?

 

Thanks,

 

Brian

Share this post


Link to post
Share on other sites
  • 2 months later...

Hi,

 

Great module, thanks!

 

I've got only one problem : when I change the sort order in admin panel (for exemple order by product reference) I lost this order when I navigate with the next / Previous button...

 

Does anyone have an idea to fix this problem ??

 

Thanks

 

Thomas

Share this post


Link to post
Share on other sites
  • 5 weeks later...

Hi there !

 

Just installed it on 1.5.5 but it works partially ^^

Effectively as mentionned above the breadcrumb is rewritten by home > myproduct instead of home > shop > mycat > myproduct.

I've overrided Tools.php but doesn't seem to solve this problem...

My products are well "categorified" but issue still here ^^

If someone has an idea would be great !

 

Thanks in advance.

 

Best regards

 

Edit : seems like it's working fine O_o Maybe smarty cache or gandi ;-)

 

Thanks for this great module !!

Edited by yomas (see edit history)

Share this post


Link to post
Share on other sites
  • 3 weeks later...

I had to unintall it after switching to 1.5.2 because it added 2-3 seconds to the product page loading time. Is it just my shop or is it the module? Could anybody post a link here with this module running on PS1.5+?

Edited by outlet.ee (see edit history)

Share this post


Link to post
Share on other sites
  • 1 month later...

Please check this previous post:

 

 

 

Also, I have uploaded it to prestashop account:

 

Hi

Following class/Tools.php modification I have 3 errors on the product page :

 

Notice: Undefined variable: homepage in D:\wamp\127.0.0.1\shop-norberthiblot\public_html\classes\Tools.php on line 1042

Notice: Undefined variable: product in D:\wamp\127.0.0.1\shop-norberthiblot\public_html\classes\Tools.php on line 1042

Notice: Trying to get property of non-object in D:\wamp\127.0.0.1\shop-norberthiblot\public_html\classes\Tools.php on line 1042

 

PrestaShop™ 1.5.6.1

 

If you have an idea to fix this bug, welcome !

 

Thanks for your help

 

Thomas

Share this post


Link to post
Share on other sites
Bonjour, j'ai votre module "nextprev_links" sur Prestashop 1.5 (Super module ! Merci.)

J'ai un problème : quand je configure le module avec "Featured products" (ou même avec "Default category"), la liste des produits défilant est celle de la catégorie et non celle des produits sélectionnés avec la navigation à facettes (Exemple : http://www.agence-communication-france.fr/elementvegetal/index.php?id_category=9&controller=category#/categories-vegetaux_stabilises). Pourriez-vous m'aider s'il vous plait, merci beaucoup par avance de votre suivi. Cordialement Alexis Cretin.

 

In english : 

Hello, I have your module "nextprev_links" on Prestashop 1.5 (Great module! Thank you.)

I have a problem: when I configure the module with "Featured products" (or "Default category"), the list of products scrolling is the list of category and not the list of products selected with blocklayered (Example products selected with blocklayered : http://www.agence-communication-france.fr/elementvegetal/index.php?id_category=9&controller=category#/categories-vegetaux_stabilises). Could you help me please, thank's a lot. Sincerely Alexis Cretin.

Share this post


Link to post
Share on other sites
  • 1 month later...

Hi!

We have this module running on our store, with some modifications.

 

One of them is arrow keys triggering, so you can navigate trough products with left and right keys on keyboard.

 

You just need to add this at the end of product.js on your template's js directory:

//Product arrow keys navigation
jQuery(function( $ ) {
    var keymap = {};
    // LEFT
    keymap[ 37 ] = "#prev_link";
    // RIGHT
    keymap[ 39 ] = "#next_link";
    $( document ).on( "keyup", function(event) {
        var href,
            selector = keymap[ event.which ];
        // if the key pressed was in our map, check for the href
        if ( selector ) {
            href = $( selector ).attr( "href" );
            if ( href ) {
                // navigate where the link points
                window.location = href;
            }
        }
    });
});

You can see it running on:

Our french store: COLOR YOUR WALK

Our spanish store: Sabatillelx

Hope you like it!

  • Like 2

Share this post


Link to post
Share on other sites
  • 4 weeks later...
  • 2 weeks later...
  • 4 months later...
  • 3 weeks later...
  • 2 weeks later...
  • 2 weeks later...
  • 2 months later...
  • 1 month later...
  • 3 months later...

Its still available here

 

And this is the page

 

Gonna test it now on my local prestashop v1.5.3.1 and will tell you is it workin...

 

Edit: Its working ye, just with one problem, breadcrumbs appear doubling the category name, as gsv1982 said a few posts back, but in my case, If you disable the module, the double category names are gone too, so you can keep using the store the old way... Gonna try to figure it out why this is happening, will post again if have something.

 

Edit 2: its something here:

$smarty->assign('path', Tools::getFullPath($homepage ? $category->id : ($category->id == 1 ? $product->id_category_default : $category->id), $product->name));
in productlinksnc.php file, but dont know how to change the code :/

 

Edit 3: I manage to do it smile.png

 

In file classes/Tools.php on line 947 replace:

 

return Tools::getPath($id_category, $category->name, true, $type_cat).'<span class="navigation-pipe">'.$pipe.'</span> <span class="navigation_product">'.htmlentities($end, ENT_NOQUOTES, 'UTF-8').'</span>';
with:

 

return Tools::getPath($homepage ? $category->id : ($category->id == 1 ? $product->id_category_default : $category->id), $product->name, true, $type_cat).'<span class="navigation-pipe">'.$pipe.'</span> <span class="navigation_product">'.htmlentities($end, ENT_NOQUOTES, 'UTF-8').'</span>';
This is not affecting the website at all, with or without the module activated, BUT, test it in localhost before apply the changes online!

 

 

Hi - I have just upgraded Prestashop from v1.6.0.11 to v1.6.1.0 and this no longer works. I get these errors on my website:

 

 

Notice: Undefined variable: homepage in /home/lgg/testnewversion/override/classes/Tools.php on line 1317

 

Notice: Undefined variable: product in /home/lgg/testnewversion/override/classes/Tools.php on line 1317

 

Notice: Trying to get property of non-object in /home/lgg/testnewversion/override/classes/Tools.php on line 1317

 

Where line 1317 is the code above. Any ideas?

 

 

Edit: 3rd September 2015

 

I have upgraded to v1.6.1.1 and the problem appears to have corrected itself

Edited by skinnybloke (see edit history)

Share this post


Link to post
Share on other sites
  • 1 year later...
  • 3 weeks later...
  • 4 years later...

Hi,
 i have a question can you please clarify it for me Rocky.

Lets suppose as a visitor, I am at a Collection page at  https://maryumnmaria.com/collections/bridals  and previously, i was checking a product form another collection lets suppose, this product https://maryumnmaria.com/products/star-ferry-mme-03. The website is using this module to add next and previous visited page/products. will it be able to show me products from other collection as previous visited page and will it keep on changing as the visitor keep visiting different pages. plus I want to know about the "Next Product" will it always be from the same category i am currently visiting or will it be any random product?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More