Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Currently selected category


rkinch

Recommended Posts

Can someone please tell me an easy way to get the currently selected category. I want to assign it to a variable on the index.php page so I can display it in a different location. I was going to write my own query using the cPath in the URL, but it got too complicated for me.

 

I just want to print the currently selected category on the page somewhere other than the category box.

 

Thanks

Link to comment
Share on other sites

the id for the current category is stored in $current_category_id

the name will be in $categories['categories_name']

 

you can test if these are set & display accordingly.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...