Print Page | Close Window

How to Get current Category?

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=5332
Printed Date: 06-July-2025 at 2:44pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to Get current Category?
Posted By: hasnut
Subject: How to Get current Category?
Date Posted: 27-October-2012 at 5:09am
Hi,
Here is the issue, I am doing design integration, and I need to know current category from header.php as left nevigation code are called inside header.php

Also I need for the left category menu which category is selected so I can highlight the selected category.

or is there any wiki where I can know those thing or more advance techniques working with php file directly.



Thanks in advance.



Replies:
Posted By: Hamish
Date Posted: 27-October-2012 at 10:34am
php? You mean asp! Our wiki page on integrating your design with ProductCart is here :- http://wiki.earlyimpact.com/productcart/storefront-integrate" rel="nofollow - http://wiki.earlyimpact.com/productcart/storefront-integrate   From the admin pages there are quite a few options for generating and styling the menu. 

-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: hasnut
Date Posted: 27-October-2012 at 11:13am
Ops Yes, ASP.
I want to highlight, which category is being displayed in Browse by Category.

In other words, I want to echo current category name before Browse by Category.

I am not familiar with ProductCart, is there something that I can get the required things by API call.

Say from example in another shopping cart I can get this by just calling
 
$currentCategory = Mage::registry('current_category');
is something out there that I can get the current Category in product Cart?
Thanks



Posted By: hasnut
Date Posted: 27-October-2012 at 11:14am
I  just cant use your generation tools, as my design includes lots of other elements or blocks that normally productcart dont offer. 


Posted By: Hamish
Date Posted: 27-October-2012 at 1:03pm
Hi Hasnut, ProductCart does not work that way - at all! You need to set aside the whole API mindset for creating web pages otherwise your set for a world of confusion and dead ends. It's actually (in my opinion anyway) a lot simpler than that. If you look at the ASP code you will see the asp code for a page creates the html for that page, often "including" other asp files for elements of the page.
I found when I first worked with ProductCart that a useful analogy was a sandwich - The header & footer files which are included in each page via an "Include" and these in turn handle the menus. The filling of the sandwich is the code specific to that page and to control the look of that, to start with, look at the settings in the admin panels, for example, selecting page layouts and then work on the CSS files. After that you are into custom coding of the ASP files. If you do that please (A) keep backups of the unmodified files. (B) keep notes of what you have changed/where & why. 

-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net