Jump to content

Previous next on Product Page


Recommended Posts

Brian,

You had previously given me some code to add a previous / next on a product page to go to or back to the next product in that category based on the category_product_ids.  The code I have is based on CC 6.1.13 and I was wondering if you thought it was still good. I can send you what I have.  I'd rather make changes to the core code and not use code snippets.

Thanks in advance,

Claudia

Link to comment
Share on other sites

I'm not sure what I mean.  My product codes mostly start with an abbreviation of the category then a dash and certain numbers (no spaces) so items are sorted in a certain order on the category page. I don't delete soldout products now.  When I used this previous / next before I did not keep the soldout items and the previous / next stopped mid go because the the cat_ids not being used ( on soldout deleted items).  I just don't want this to happen again.  So whatever way you think best.

Link to comment
Share on other sites

  • 2 weeks later...

I spoke too soon.  I works great if you use the previous next in the product pages, but if you go from the homepage/latest products it starts showing the previous next for the last items I looked at.  For example:  I click on milk bottles and go thru all of them with the previous next.  Then I go to the homepage and click on one of the latest products.  I takes me to that product but when I click on the previous next I get taken to the milk bottles that I just scrolled thru.

Link to comment
Share on other sites

From a few weeks ago, I started really digging into the PrevNext plugin, looking for where it no longer was behaving properly.

I got side-tracked.

I'm back on it now.

 

Link to comment
Share on other sites

Please let me know if the PrevNext functionality is installed as a plugin extension, or as a series of code snippets.

If as a plugin, make these changes:

Rename the PrevNext extension's file:
From:
/hooks/class.seo.construct.php
To:
/hooks/controller.index.php

Edit the extension's file config.xml:
From:
<hook trigger="class.seo.construct" enabled="1"><![CDATA[Clears the remembered list under certain circumstances.]]></hook>
To:
<hook trigger="controller.index" enabled="1"><![CDATA[Clears the remembered list under certain circumstances.]]></hook>

In admin, ADVANCED section, Manage Hooks, click the link for PrevNext. Make sure that 'controller.index' is listed, and 'class.seo.contruct' is not listed.

Click the Clear Cache button.

Test by visiting a category with more than one item. Click on one of those items to view its details page. Verify that 'Prev/Next' appears and behaves as expected.

Link to comment
Share on other sites

That removed the previous /next from homepage latest products and the product pages work as they should.

But I'm confused about something.  I have a folder in the modules/plugin folder (found in cPanel) and have this enabled in admin / manage extensions / available extensions.  In admin / advanced / manage hooks I also have hooks - installed extensions - available only PrevNext. Is this right.

Link to comment
Share on other sites

Posted (edited)

"Is this right?"

Yes.

Normally, the admin's Manage Extensions is all you should ever need to know about.

The Manage Hooks (in the navigation Advanced section, and the entire Advanced section for that matter) is for those times when technicians can assist solving a tricky problem and must really know what they are doing, because otherwise things can go sideways real fast.

 

Edited by bsmither
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...