If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Custom page to have the layout of products catalog

Custom page to have the layout of products catalog

Locked

Started by zeppelin on 26 Dec 2010, 5:33 PM · Views: 2,063

Results 21 to 33 of 33
This thread is locked. New replies are disabled.
29 Dec 2010, 12:04 AM
#21
zeppelin avatar

zeppelin

New Zenner

Join Date:
Dec 2010
Posts:
14
Plugin Contributions:
0

Custom page to have the layout of products catalog

dbltoe, I cannot declare myCustomField as a category for two reasons thus I have to reinvent the cycle a bit.. :/

this customField is a special field that I get from another online database that provides me automatically with the products I need to list. those are maybe 5000 different values, thus I keep them separated in another column in the table products.

I use cPath for another reason (I have only 5 big categories). All is great, and I cannot refactor the code for the database and customField (I have to maintain it and make it work). I only need to look in zencart where the SELECT * FROM products where category_id = cPath and make sure I don't always do that. Any ideas where to look as the links you gave me don't speak to the developer but to the user. Thanks

29 Dec 2010, 12:18 AM
#22
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Custom page to have the layout of products catalog

Okay, a pseudo-category page, listing an otherwise unrelated set of products which share a special field value. Do I understand correctly that you wanted each product to look like the category it belongs to would look? Are at least some of those category "looks" different from each other?

The cPath is passed to the new page as $_GET['path'] and is always accessible as that if it exists at all. One of the files that retrieves that info to tell the code what category to look in is /includes/clases/category_tree.php; you might adapt that to a new version for making your pseudo-categories.

29 Dec 2010, 12:21 AM
#23
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Custom page to have the layout of products catalog

I agree with dbltoe, knowing the fundamental reason why you want these new selection/display criteria, and how the assignments are made, might suggest a much easier way of going about it.

Oops, missed your reply under dbltoe's.

29 Dec 2010, 12:27 AM
#24
zeppelin avatar

zeppelin

New Zenner

Join Date:
Dec 2010
Posts:
14
Plugin Contributions:
0

Re: Custom page to have the layout of products catalog

gjh42:

Okay, a pseudo-category page, listing an otherwise unrelated set of products which share a special field value. Do I understand correctly that you wanted each product to look like the category it belongs to would look?

Exactly. All my products are books. I have 5 categories [cPath] (travel, literature, etc..) but a those books come from a central database where the books have a special id system which is different (it's more detailed). I cannot show to the user 5000 categories, and it's why I use the 5 cPaths and I'm happy with it (how it works and how it looks).

Now I only wish I can sometimes ask product listing to give me: "books that are spanish literature of 1800" (let's say this is specialFieldValue 19. I want to ask zencart to do the listing and show the exact same output as to the one for example of Literature, but the products should be fewer (the filter is of specialFieldValue not cPath).

is there any central place that explains where (which files) and in what sequence zencart is executing/including first and second php files etc when I ask zencart to cPath=12345?

29 Dec 2010, 12:33 AM
#25
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Custom page to have the layout of products catalog

This may be a big simplifying factor. Do all books with one specialFieldValue belong to one major category? It would seem like they should. If so, all you need is to apply that filter to the category display.

You will have to show the users those 5000 filter criteria somehow, somewhere.

29 Dec 2010, 12:39 AM
#26
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Custom page to have the layout of products catalog

Have you investigated the "Product Book by Moku" mod? I have heard that it has not been updated to work correctly with v1.3.9, but that might be easier than recreating the listing selection, and give you a host of useful book-type search criteria as well as your special fields.

29 Dec 2010, 12:53 AM
#27
zeppelin avatar

zeppelin

New Zenner

Join Date:
Dec 2010
Posts:
14
Plugin Contributions:
0

Re: Custom page to have the layout of products catalog

the structure of the books database which I use is max 4 levels deep..

  100 Philosophy
     110 Metaphysics
       111 Onltology
         111.85 Aesthetics (Philosopy)

in this case my specialCol value is 111.85. A book in 111.85 has cPath "Philosophy" (123). so I need to ask zencart to list the books having 111.85 and the result should be exactly the same (with paging and all) of if I asked cPath=123 (of course with 111.85 the books won't be as many). Does moku gives this functionality builtin? Else I just have to build it (and I dont' mind but I have to find out which files includes which and where is the damn SELECT query and to find this I have first to find which is the first page that handles index.php?main_page=index&cPath=123

Thanks for the patience

29 Dec 2010, 1:23 AM
#28
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Custom page to have the layout of products catalog

The wiki under Developers should give the page construction flow somewhere; I believe there is a mod in Free Addons that consists of a diagram for this as well.

I don't know what all Product Book does or how. Look at its discussion thread.

29 Dec 2010, 4:10 AM
#29
zeppelin avatar

zeppelin

New Zenner

Join Date:
Dec 2010
Posts:
14
Plugin Contributions:
0

Re: Custom page to have the layout of products catalog

somewhere -> where exactly? haven't found it.

do you remember the name or somehow the name of the mod?

29 Dec 2010, 4:37 AM
#30
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Custom page to have the layout of products catalog

wiki is in the top right nav menu

Zen-Venom Get Bitten

29 Dec 2010, 5:04 AM
#31
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Custom page to have the layout of products catalog

Zen Cart Program Flow Documentation in Tutorials; also look at the wiki > Developers API Tutorials, which may be of use for creating a new class if needed.

29 Dec 2010, 5:43 PM
#32
zeppelin avatar

zeppelin

New Zenner

Join Date:
Dec 2010
Posts:
14
Plugin Contributions:
0

Re: Custom page to have the layout of products catalog

looking allover the place, can I implement this using custom filter and if yes how? (any link on the procedure and explaination of the custom filtering?)