View Single Post
  #1  
Old 02-03-2021, 05:20 AM
 
bionuts bionuts is offline
 

Advanced Member
  
Join Date: Oct 2008
Location: At my desk, probably scratching my head over an X Cart problem....
Posts: 80
 

Default Showing only certain categories in the sidebar / adding a second categories box

Hi all,

We're in the process of upgrading our last website to 5.4.

On this site, we use two types of category: one to sort by product type and one to sort by product application. I therefore want to add a second categories sidebar to the site so that I can separate them.

Adding the custom module, etc, to display a second box in the sidebar is something that I've done on a previous site (although not to display a category list), so I think I can cover that bit. The bit I am struggling with is how I formulate the code to select which categories to display in which box.

When I did this on a previous version of X-Cart, I was able to do it by using an IF statement and looking at the $category_id (as shown here https://forum.x-cart.com/showpost.php?p=280361&postcount=13) but I'm struggling with it on X-Cart 5.

Does anyone know how I can code an IF statement to select (for instance) only categories with an ID of less than 50? Or have any suggestions of a better way to achieve what I'm trying to do?

Thanks in advance.
__________________
Currently transitioning to X-Cart 5.4.x.x. Oh the joy
Reply With Quote