Forums / General Questions / [PHP]Getting product category id

[PHP]Getting product category id

Views: 922

Results 1 to 3 of 3
22 Jul 2012, 8:56 AM
#1
markosiroki avatar

markosiroki

New Zenner

Join Date:
Jun 2012
Location:
LJubljana
Posts:
14
Plugin Contributions:
0

[PHP]Getting product category id

Dear Sirs and Madams!

On my intro page in zen cart webshop, I have category browser in left sidebox (all default positions, etc, ...). Now, let's say user clicks on some category. How do I get Id of clicked category using php?

Sincerely,
Marko

22 Jul 2012, 9:51 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: [PHP]Getting product category id

MarkoSiroki:

Dear Sirs and Madams!

On my intro page in zen cart webshop, I have category browser in left sidebox (all default positions, etc, ...). Now, let's say user clicks on some category. How do I get Id of clicked category using php?

Sincerely,
Marko

PHP is a serverside process which has no 'awareness' of what the client is doing.

The best you can do is check the cPath variable that is posted back to the server when the link has been clicked.

Exactly what are you hoping/planning to do?

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

22 Jul 2012, 1:21 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [PHP]Getting product category id

See if the variable:
$current_category_id

helps you ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!