Zen Follower
- Join Date:
- Jun 2006
- Posts:
- 110
- Plugin Contributions:
- 0
Product Listing layout config.
i will make this as simple as possible,
my product listing layout currently looks like this...

i want it to look like this....

how would i do that?
Views: 13,250
Zen Follower
i will make this as simple as possible,
my product listing layout currently looks like this...

i want it to look like this....

how would i do that?
Totally Zenned
You would create a copy of the product_listing.php file in modules/YOUR_TEMPLATE_NAME directory and edit the layout to that which you want. It's not that difficult, but would require some basic php and CSS skills.
Zen Follower
ok, i have some basic knowledge with both, i have some web development tools that may even make it easier... idk yet :D
any other replies are still helpful
Zen Follower
what parts of it would i change? would it have to be a complete remake? or does anybody already have a code that looks like how i want it?
Totally Zenned
It's not a complete remake. More of a tweak in the relevant places. You would probably just leave the MySQL code that extracts info from the database alone and much of the rest of the file would remain as is, so you only really need to concentrate on amending the code that outputs each products details, cutting it down to the info you want and displaying it in a column format. You will find similar code in modules/feature_products.php which already does this.
Oba-san
You might peek in the Downloads and find the:
Column Layout Grid for Product Listing
I believe this is in the Other Modules ...
Totally Zenned
If using the Column Layout Grid mod and your images are different heights, they may mess up the layout. I just reverted a design to a single column because of this issue. The solution is to make you images the same height and width but when there are lots of them it is easier said than done.
Hope this tip helps you avoid a headache
JJ
Oba-san
You can also just have the images align at the top ... or the text align at the bottom to allow for height differences ...
Totally Zenned
I've been using the Column Listing mod in a 1.3.0.1 just fine.
Now I'm updating to 1.3.0.2 and observe significant enough changes to /includes/modules/product_listing.php
that I'm having a wee bit of trouble integrating mod code into new file version.
Version of product_listing.php I'm using with 1.3.0.1:
New product_listing.php in v.1.3.0.2
Anyone know if the Column Listing mod has been updated for 1.3.0.2?
Sensei
Totally Zenned
DrByte:
Upgrade Posted:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=77
Woo Hoo! That was quick! Many Thanks!
Totally Zenned
DrByte-
Comparing the stock core v.1301 and v.1302 product_listing.php files, I observe the following code fragment early in the file was removed from product_listing.php in v.1302:
// needs a better check v1.3.1
if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0) {
// bof: multiple products
// $chk_attributes = $db->Execute($listing_sql);
$chk_attributes = $db->Execute($listing_split->sql_query);
while (!$chk_attributes->EOF) {
if ($chk_attributes->fields['product_is_call'] == 0) {
if (zen_get_products_allow_add_to_cart($chk_attributes->fields['products_id']) !='N') {
if ((SHOW_PRODUCTS_SOLD_OUT_IMAGE == 1 and $chk_attributes->fields['products_quantity'] > 0) or SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) {
if (zen_has_product_attributes($chk_attributes->fields['products_id']) < 1 and $chk_attributes->fields['products_type'] != 3) {
$how_many++;
}
}
}
}
$chk_attributes->MoveNext();
}
if ($how_many >= 1) {
echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product'), 'post', 'enctype="multipart/form-data"');
}
}
However in the product_listing.php included in the updated "Column Layout Grid for Product Listing for 1.3.0.2" that code fragment remains. Can you confirm if needed for the Column Layout Grid mod? Thanks.
Woody
Sensei
Um ... that would make things interesting, wouldn't it .....
It should be removed.
Contribution updated
Zen Follower
ZEN_CART_HOME_DIR/includes/modules/YOUR_TEMPLATE/product_listing.php
Hmmmmmm......... But i dont have any template_Folder in /includes/modules/ :no: :no: How to do then??????? However i have a product_listing.php in /includes/modules/
Zen Follower
When write 3 in Product Listing - Columns Per Row i got 2 rows. Write 4 and i get 3 rows ???
It seems that one row is always emty ??
Zen Follower
If i write 4 in Product Listing - Columns Per Row i will somtimes get 1 product per row and somtimes mixed 1 per row, 3 per row, 2 per row, 1 per row, 2 per row, :ohmy:
Zen Follower
AND..:bored: It also shrunk the center area. :down: See: http://siamonnet.se/babystore/index.php?main_page=index&cPath=1
Totally Zenned
PeterBKK:
ZEN_CART_HOME_DIR/includes/modules/YOUR_TEMPLATE/product_listing.php
Hmmmmmm......... But i dont have any template_Folder in /includes/modules/ :no: :no: How to do then??????? However i have a product_listing.php in /includes/modules/
Create the folder ;-)
Most Zen Cart documentation states that if you observe a "custom" folder already present in a directory, then that indicates overrides are suppose to work. So in the same directory create a new folder with the name of your template, and place your modified file(s) there.
Note I have had mixed success overriding modules. I don't know why, most my module overrides work, but some times they do not. In these cases I overwrite the core module files (after backing up of course).
In this particular case overriding the core product_listing.php with the version DrByte provided in the Column product listing mod update works well in v.1302.
Woody
Zen Follower
I did not even had a classic folder in /modules/ so i replaced the product_listing.php in /modules/ Cold i do that or should i undo it as i had so many problems???
Zen Follower
ops... I did had one classic folder :lookaroun :lookaroun
Tell staff why this post should be reviewed.