Hello Everyone,
Could someone please explain how the 'cPath' works?
I'm doing my homework, reading and studying all that jazz, but finally decided to verbalize it and post the question (no matter how trivial...)
I'm not sure how is this all related, but after reading the thread: 'Switching templates at run time,' it got me going...
Here is my scenario:
Product examples (where '*' represent subcategories and '**' product):
[categories] - [*subcategories...] - [**product]:
[properties(description)]
Papers - *Decorative Papers - *Thai Papers -
**Unryu Paper: Model (unique SKU nos.): Color (beige, black, green...): Size (20x30)
Papers - *Printmaking Papers -
**Somerset Velvet Paper: Model (unique SKU nos.): Color (black, antique...): Size (20x30, 30x40...)
Papers - *Printmaking Papers -
**Rives Papers: Model (unique SKU nos.): Color (cream, grey...); Style (BFK, Light, Heavy...): Size (20x30, 30x40...)
These products have common name (respectivelly, Unryu Paper, Somerset Paper, Rives Paper), description, image, and some other properties, but differ from each other by color, size, price, etc.
Using the standard process, the product listing will look like this:
Papers - *Printmaking Papers - *Somerset Paper:
** M001: Somerset Paper, beige, 20x30
** M002: Somerset Paper, beige 30x40
** M003: Somerset Paper, black 20x30 etc.
However, this can be presented in the following way, by using the category description and image, (watch for the *, **):
Papers - *Decorative Papers - *Thai Papers - *Unryu Paper -
**Model (unique SKU nos.): Color (beige, black, green...): Size (20x30)
Papers - *Printmaking Papers - *Sommerset Velvet Paper -
**Model (unique SKU nos.): Color (black, antique...): Size (20x30, 30x40...)
Papers - *Printmaking Papers - *Rives Papers -
**Model (unique SKU nos.): Color (cream, grey...); Style (BFK, Light, Heavy...): Size (20x30, 30x40...)
In other words, if I'm correct, the last category level will be in fact a combination of category and product page, containing the description, image (etc.) of product, and, in tabular format, products listings.
The image is better than 1000 words so here are visuals:
Paper Category level
Subcategories > Products
Decorative Papers > Unryu Paper
Printmaking Papers > Sommerset Velvet Paper
But wait, here is more
(I guess, this is where I'm getting confused): When adding a 'sub-category' in admin>catalog (etc.), am I in fact creating a 'category' that has a 'parent_id' linking it to the parent category. So that will explain the numbers after cPath:
- first number = category (index.php?main_page=index&cPath=4)
- second number = sub-category (index.php?main_page=index&cPath=4_9)
- third number = sub-sub-category (index.php?main_page=index&cPath=4_9_3) etc.
But how then create different looks for different levels... including the last one (which in fact is some sort of category-product hybrid)?
And, no, I guess, this is not about css changes...
That leads me to another question: if in fact there is an override possible -
I'm having a little 'steaming' when it comes to scope the whole modular design: I think, I understand that the page we see in a browser, in fact is composed not with one standard template, but with tiny segments that are grouped into 'larger components,' that finally give the five major parts (header, footer, left side box, right side box, body)... I read couple of times the "Zen Cart Program Flow", but I will very much appreciate if someone could please visually verbalize it for me (and others)...
Thanks for reading - hope this will trigger some brainstorming - best,





