Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Products details alongside with product listing (of one category)

Products details alongside with product listing (of one category)

Locked
This thread is locked. New replies are disabled.
2 Sep 2007, 2:29 PM
#1
maticomp avatar

maticomp

New Zenner

Join Date:
Sep 2007
Posts:
7
Plugin Contributions:
0

Post #1 by maticomp

Hi there!

I'm customizing standard ZenCart (1.3.7) template to accomplish my customer goals. He's selling calendars of many dimensions, and each of calendar type is available with many different pictures on them. I managed to build a category tree:

  • Calendars
    • Wall calendars
      • A3
        ...

In the deepest category representing the calendar dimension I'd like to put products representing different pictures on the calendar, so each picture version is a different product. Now I want to do something I can't really find out easily.

When I click on "A3" to display the category listing I see all products on one page, each of them with "add to cart". I can also view details of each of calendars when I click on them. I'd like to finish with list of all available calendars in the category with details of one particular selected at the time on the same page (with big picture of selected one in particular).

The scheme similar to many photo galleries - all photos visible (thumbnails), and the selected one with big picture preview.

I came across to ways of achieving this:

  1. Treat "A3" (dimension) as a product, not a category, and then add a lot of attributes representing available image patterns. That should work, but is not as comfortable to manage for end-user in the company. Adding attributes is not as intuitive as adding products.
  2. Modify category product listing display to show big picture of one selected calendar, also showing "add to cart" button for only one selected calendar, instead of moving to product detail page. With some JS it would even be possible to avoid reloading.

Which way should I go? Maybe there is a more obvious and easy way to follow?

Thanks in advance!
Best wishes,
Mateusz

2 Sep 2007, 9:20 PM
#2
kobra avatar

kobra

Black Belt

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

Post #2 by kobra

Guess I woul teach them how to copy an attribute array to another product

Zen-Venom Get Bitten

2 Sep 2007, 9:26 PM
#3
maticomp avatar

maticomp

New Zenner

Join Date:
Sep 2007
Posts:
7
Plugin Contributions:
0

Post #3 by maticomp

I guess the array would not be the same for each product. Let's assume we've got ten types of calendars sized A3, and each of calendar is available in ten different images (cats, dogs, horses, whatever). Of course, the horse on "calendar type 1" is different than "calendar type 2". They would end with creating 10 products, and then for each of them - another ten attributes, when in fact they should create 100 products (giving e.g. three shots of a horse calendar type 1, straight, from angle, and the back).

I'm trying to force a simple redesign to plain product listing and product detail in separate pages. The design given has many usability flaws I'm asking designer to eliminate, so he could perhaps change the planned behaviour to be more straightforward.

Thanks for the reply :)

2 Sep 2007, 9:59 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Post #4 by gjh42

Each calendar really should be a separate product, because you would want to show additional images for the exact calendar. You might want to have subcategories below A3 for cats, dogs, horses, etc. unless there are only a dozen or so calendars per size.

You could modify the function & text of the add to cart/more info button so the selected item, instead of going to the info page, does the large display of three images for that calendar at the top of the listing page, with now a real add + qty button. The only info that should need to be retrieved about the individual product is the additional images, and it should be possible to display those without needing to query the database, thanks to the naming conventions (the base image name is already available to the listing page).

Also, for those not using javascript, it should be possible to gracefully degrade by changing the js image view function to a <noscript> "more info" function that goes to the regular info page.

2 Sep 2007, 10:09 PM
#5
maticomp avatar

maticomp

New Zenner

Join Date:
Sep 2007
Posts:
7
Plugin Contributions:
0

Post #5 by maticomp

gjh42:

You could modify the function & text of the add to cart/more info button so the selected item, instead of going to the info page, does the large display of three images for that calendar at the top of the listing page, with now a real add + qty button.

In fact, that's exactly what I wanted in the first place. Now I'm trying to force traditional listing + detail page split, however I don't succeed, I will fall back to the idea.

The problem is with "with now a real add button" - I can't think of possibility to trigger add button to selected product without using JS. I would love to avoid dependance on JS. Fallbacking to traditional "more info" button is a possibility, thus I will look for the solution if the designer won't be willing to redesign the strategy.

Thanks! You helped me a lot with the idea of displaying big image using name already known. I was looking for integration of product details into product listing, that would need querying the db. I don't really "feel" Zen Cart yet in terms of extending functionality by myself.

Best wishes,
M.

3 Sep 2007, 11:00 AM
#6
maticomp avatar

maticomp

New Zenner

Join Date:
Sep 2007
Posts:
7
Plugin Contributions:
0

Post #6 by maticomp

Designer denied my request for readapting product presentation. I got into Zen Cart logic and studied it for a while, and I managed to implement my own solution. A simple module to display other products from same category on the product detail page - that suits me well and solves stated problem. When I finish the project I'll try to separate my implementation into standalone module and publish it on ZenCart site - maybe some other people would be happy to use it. Thanks for all your help!

15 Sep 2007, 8:22 PM
#7
instantok avatar

instantok

New Zenner

Join Date:
Sep 2007
Posts:
6
Plugin Contributions:
0

Post #7 by instantok

I could really use a module like this. Do you have time to post some info about what you did maticomp? I'm trying to figure it out but hitting some errors.

thanks!

17 Sep 2007, 10:05 AM
#8
maticomp avatar

maticomp

New Zenner

Join Date:
Sep 2007
Posts:
7
Plugin Contributions:
0

Post #8 by maticomp

Hi! In fact I still haven't put it into separate module, but here's what I've done:

I have used "previous & next" module to achieve my goal. Without any modifications to /includes/modules/product_prev_next.php I noticed that array of products from the category is available to use in the appropriate template, which is tpl_products_next_previous.php. What I've done is just displaying more products than previous and next. Here's the code for 15 products:

<?php for ($i=0;(($i<sizeof($id_array))&&($i<15));$i++) { $product = $id_array[$i]; echo '<div id="produkt"><a href="' . zen_href_link(zen_get_info_page($produkt), "cPath=$cPath&products_id=$produkt") . '">' . zen_get_products_image($produkt, PREVIOUS_NEXT_IMAGE_WIDTH, PREVIOUS_NEXT_IMAGE_HEIGHT) . '</a></div>'; } ?>

If you remove the additional condition from loop ($i<15) it will display all products. Hope it helps.

Cheers,

17 Sep 2007, 12:58 PM
#9
instantok avatar

instantok

New Zenner

Join Date:
Sep 2007
Posts:
6
Plugin Contributions:
0

Post #9 by instantok

hi maticomp. thanks for the reply. that worked like a charm (had to change "produkt" to "product" in a few places but not hard to figure out). it would be nice if there was a way to insert the actual product listing template to make it more feature rich and avoid some double maintenance but this should do the trick until then.

thanks!

17 Sep 2007, 1:18 PM
#10
maticomp avatar

maticomp

New Zenner

Join Date:
Sep 2007
Posts:
7
Plugin Contributions:
0

Post #10 by maticomp

Ops, sorry :) I changed one produkt to product (making the whole thing more englishy) but forgot to do the rest :) I guess that inserting product listing template would be some_way possible, but haven't figured it out - my simple modification did what I wanted.