Claudia M Posted May 20, 2021 Share Posted May 20, 2021 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 More sharing options...
bsmither Posted May 20, 2021 Share Posted May 20, 2021 I will check if the Snippets still work with CC642. From there, we can explore modifying core code. Link to comment Share on other sites More sharing options...
Claudia M Posted May 20, 2021 Author Share Posted May 20, 2021 Is there anyway to sort this by the product code instead of the ID? Link to comment Share on other sites More sharing options...
bsmither Posted May 20, 2021 Share Posted May 20, 2021 Previous and Next according to a sequence such as: FooBan FooBar FooBaz FooBed FooBet regardless of any other consideration or detail? Link to comment Share on other sites More sharing options...
Claudia M Posted May 20, 2021 Author Share Posted May 20, 2021 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 More sharing options...
Claudia M Posted May 21, 2021 Author Share Posted May 21, 2021 Hey Brian, Did you get a chance to look at the code? I appreciate all you do Claudia Link to comment Share on other sites More sharing options...
bsmither Posted May 21, 2021 Share Posted May 21, 2021 Sorry, no, not yet. Link to comment Share on other sites More sharing options...
Claudia M Posted June 1, 2021 Author Share Posted June 1, 2021 Brian, I'm cleaning up my computer files and noticed that you had created a plugin for this along with some file changes. I'm going to see if it still works Link to comment Share on other sites More sharing options...
Claudia M Posted June 1, 2021 Author Share Posted June 1, 2021 The plugin seems to be working just fine Link to comment Share on other sites More sharing options...
Claudia M Posted June 1, 2021 Author Share Posted June 1, 2021 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 More sharing options...
bsmither Posted June 1, 2021 Share Posted June 1, 2021 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 More sharing options...
Claudia M Posted June 1, 2021 Author Share Posted June 1, 2021 Thanks Brian. It works except in instance stated above - unless I'm missing something. I tried some code changes you had given me but they don't line up with CC643. Link to comment Share on other sites More sharing options...
bsmither Posted June 2, 2021 Share Posted June 2, 2021 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 More sharing options...
Claudia M Posted June 2, 2021 Author Share Posted June 2, 2021 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 More sharing options...
bsmither Posted June 2, 2021 Share Posted June 2, 2021 "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. Link to comment Share on other sites More sharing options...
Claudia M Posted June 2, 2021 Author Share Posted June 2, 2021 Thank you so much, again, Brian. Everything working as should! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.