Jump to content

Overview Listing with Headlines


Recommended Posts

Hi Guys,

 

I have  1 Categories (CatMain) with two Subcategories (Sub1, Sub2) with each 6 Products.

If I klick on the navigation bar on CatMain it will list all Products from Sub1 and Sub2.

Which is good.

BUT: there is no separator in the listing, that indicates, which products belong to sub1 and which to sub2. So - where should I dig in to add category-headlines?

So that the listing schould appear like that

 

SUB1

DVD1

DVD2

DVD3

DVD4

DVD5

DVD6

 

SUB2

DVD1

DVD2

DVD3

DVD4

DVD5

DVD6

 

Any help is appreciated :-)

 

Love,

Dirk.

Link to comment
Share on other sites

Hi,

 

You will have to modify the result of the getProducts function from the Category Class. You can do it by a module using productListAssign hook. Something, which will check if the current category have childs, if yes, fo each product of the main category if one of the categoies of this product matches with a child of the main category, it will add it to a corresponding category array. The problem is that you wil have to modifiy the category.tpl to enable the fact that you will have several products arrays to display when it is made to deal with one array

Link to comment
Share on other sites

OMG, that sounds difficult. Modifying a bit of php or css is easy for me, but that sounds very difficult, because I wouldn't know how to start that.
Could you or anyone else elaborate on that a little bit more? Maybe with more detailed informations ;-)
That would be really kind...
Like:
There should be a tpl, that will print out the array. Isn't it possible to insert a small snippet in the last possible position before printing it, that will check the links of the individual products and if the link will point to another folder will at least add a <hr>
 

 
The part before /test-xx.html differs, so the php would know, that the category has changed and would add <hr>

Edited by dirkliesenfeld (see edit history)
Link to comment
Share on other sites

Hi Dirk,

Let's collect some info to see what is possible...

 

 

- What PS version do you use? Default theme?

- Is your product in only 1 subcategory, or can it be in both Sub1 and Sub2?

- is the 'default category' of each product the same as the sub category it's in? or is the default category sometimes the parent category or so? 

- do you have more levels of sub-sub-(sub etc) categories? or only 2 deep (one parent->sub level)?

 

pascal

Link to comment
Share on other sites

Hi Pascal,

 

thanks for taking your time :-)

- 1.6.0.9 with default theme, albeit heavily modified ;-)

- My products are only in one category each

- The default cat is always the same as the sub cat

- I have only two levels (start - Maincat - Sub1 and Sub2) Later I plan on having multiple Maincats with more than two sublevels. But never deeper than two. Like that:

 

start - Main1- Sub a1, Sub a2, Sub a3...

      | - Main2- Sub b1, Sub b2, Sub b3...

      | - Main3- Sub c1, Sub c2, Sub c3...

      | - ...

 

Btw., this is the store in testmode atm:

www.tantradvd.de

Edited by dirkliesenfeld (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...