If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Using one single listing template

Using one single listing template

Started by yellow1912 on 31 Dec 2007, 11:21 PM · Views: 90,908

Results 161 to 180 of 327
13 Oct 2009, 2:50 AM
#161
vh_freak avatar

vh_freak

New Zenner

Join Date:
Jun 2009
Posts:
15
Plugin Contributions:
0

Using one single listing template

Hello,

I've read through this entire post and I know you are able to change products_all to look like specials, etc. and vice versa but I need to have all of my pages (products_all, products_new, etc.) http://chocolatebydesignonline.com/store/index.php?main_page=products_all to look like shopping_cart http://chocolatebydesignonline.com/store/index.php?main_page=shopping_cart. Is this the same concept? I have a feeling it may be different and wanted to ask before go ahead and monkey with the module. Thanks in advance for your help.

10 Nov 2009, 12:54 PM
#163
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Using one single listing template

Wilbo:

OK, for anyone who gets the same error, you've just missed one $products_new_query_raw that needs to be changed to $listing_sq

Underneath the line:

$listing_sql = $db->bindVars($listing_sql, ':languageID', $_SESSION['languages_id'], 'integer');

> 
> is another line that needs to be changed to:
> 
> ```
$products_new_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_NEW);

That worked for me:smile:

In which file did you make this change? Thanks!

11 Nov 2009, 8:04 PM
#164
bizcatalyst avatar

bizcatalyst

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: Using one single listing template

yellow1912:

This package here IS for NEW 1.3.8a sites only, as it will overwrite several files. Anyhow, I hope it help someone who is setting up a new site, if you want to use this on your current site, you can check the file content and merge with your files.

Also, I do not intend to provide much support here, and I expect you to know your way around ZC when you make use of this, so I recommend you NOT to use this package if you are not familiar with php and zencart.

Several features:

  1. for index listing (new, special, features):
    you can choose to use 3 options (each of the above listing can use any of these 3 options)
    a. use the individual template (this is zen default)
    b. use a shared template for the index listing
    c. use the category product listing template

you will find these options in admin->configuration->index listing
2. for the specials, featured, products_all listing pages, they will all share the same template (the category product listing template). When I have time, I will consider adding switches in the admin to let you set the option just like the index listing above.

** Please find the package in my signature.**

PS: if you read the features and have no idea what I'm talking about, please do not consider using this package. This will save you (and me) all the headache.

I don't see any package in your signature - was it removed? Can you post a link? Someone mentioned they got this mod from Rubik Integration but I couldn't find it there either. I'm using 1.3.8 and I would really like to avoid putting all the pieces together if it's already done and available. Thanks, Robert.

11 Nov 2009, 8:07 PM
#165
bizcatalyst avatar

bizcatalyst

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: Using one single listing template

Sorry about the extra post, I couldn't figure out how to subscribe to a post (I missed it before) without making a reply. Now I'll get emails. :smile:

18 Nov 2009, 3:29 AM
#167
lzwdavid avatar

lzwdavid

New Zenner

Join Date:
May 2009
Posts:
7
Plugin Contributions:
0

Re: Using one single listing template

Hi all,
I just download the module and install it, but when I patch the sql patck,
SQL Query Executor said:

Error Failed: 1
Error ERROR: Cannot insert configuration_key "" because it already exists
Warning Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.

And I open my site, all display is changed to the column layout, that's great!
But the only thing is the there is nothing in my Mainpage index area, which should be my "Monthly special for xxx."

Does someone know what's happened here?

18 Nov 2009, 10:57 AM
#168
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Using one single listing template

Thanks for this contribution, I've downloaded and installed it and it worked perfectly first time!
I have one tweak I'd like to do but am not sure of the best place.

I'd like to show a category heading at the top of the all, new and specials listings.
So, when viewing the All Products listing for example, it will display 'All Products' just below the breadcrumb.

I managed to get it to work by adding the text I want above the first require in:

includes\templates\YOUR_TEMPLATE\templates\tpl_products_all_default.php

Is there an easier or better way than this?

28 Dec 2009, 8:03 AM
#169
cslakans avatar

cslakans

New Zenner

Join Date:
Mar 2009
Posts:
64
Plugin Contributions:
0

Re: Using one single listing template

I would love to install this mod but have a couple of questions first.

  1. It says you should already have the grid mod layout installed. My products are outlined 3 per row, however my template was integrated by someone else and I don't know if that specific module was installed. I'm guessing not because I read the readme file to it and it says something about after installing go to Admin -> Configuration -> Product Listing > Layout Style/Columns Per Row and change something, however I don't see those options. Is there a sure way to see if this was already installed?

  2. Excuse my ignorance since I'm not much of a coder and am just learning my zen cart & trying to fix what that previous developer didn't after taking my money. But, if I install this module, I'm guessing I will lose any custom look I already have that is different from the basic zen cart product listing layout, right? Then would have to start over but at least only have to change one basic template file and the css ones instead of a bunch?!?

  3. Will both of these modules easily support a "Customer Link" option to go back and forth from grid and listing? (similar to Walmart's site if you need an example). I read we could use grid, but with one column (set up in the admin). Could that be coded easily to change on the fly by a customer link and not in the admin?

I know this thread is a bit old, so we will see if I get a response. Thanks in advance!

28 Dec 2009, 2:00 PM
#170
gjh42 avatar

gjh42

Black Belt

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

Re: Using one single listing template

Is there a sure way to see if this was already installed?

Look at /includes/modules/your_template/product_listing.php. If it is the Column Grid version, you will see comments to that effect near the top of the file.

29 Dec 2009, 1:20 PM
#171
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Using one single listing template

Hi,

post install, the table that contains the product listings shows the define names instead of the defined text:
TABLE_HEADING_IMAGE and TABLE_HEADING_PRICE

This can be "cured" by creating these defines in english.php as described previously:
http://www.zen-cart.com/forum/showpost.php?p=539432&postcount=30

First question, why are these defines or this info not included in the module?

There are identical defines already used in the language files
index.php, advanced_search.php and advanced_search_results.php.
Although "obviously" these are nothing to do with the product listing I am unclear/curious to know as to how defines work insofar as why there are three versions necessary (now four including this mod), perhaps someone could elucidate...

thanks
Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

29 Dec 2009, 4:56 PM
#172
cslakans avatar

cslakans

New Zenner

Join Date:
Mar 2009
Posts:
64
Plugin Contributions:
0

Re: Using one single listing template

Thx Glenn! Yep, doesn't look like it's installed even though I have 3 in one row.

Does anyone else know the answers to my other questions.....:wacko:

  1. Excuse my ignorance since I'm not much of a coder and am just learning my zen cart & trying to fix what that previous developer didn't after taking my money. But, if I install this module, I'm guessing I will lose any custom look I already have that is different from the basic zen cart product listing layout, right? Then would have to start over but at least only have to change one basic template file and the css ones instead of a bunch?!?

  2. Will both of these modules easily support a "Customer Link" option to go back and forth from grid and listing? (similar to Walmart's site if you need an example). I read we could use grid, but with one column (set up in the admin). Could that be coded easily to change on the fly by a customer link and not in the admin?

Thanks!

30 Dec 2009, 11:05 PM
#173
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Using one single listing template

Hi,

there is a small mistake in
tpl_modules_product_listing.php line 33.

The first class should be an id:

change

<div class="productsListingTopNumber" class="navSplitPagesResult back"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div>

to

<div id="productsListingTopNumber" class="navSplitPagesResult back"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></div>

regards
Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

30 Dec 2009, 11:39 PM
#174
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Using one single listing template

and also in tpl_modules_product_listing.php, line 35

<div class="productsListingListingTopLinks navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div>

should be

<div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div>

regards
Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

5 Feb 2010, 1:16 AM
#175
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Using one single listing template

Hey guys,

Call me stupid, but I just couldn't for the life of me find that download in all these posts.

Anyhow, I just did the mods manually and worked it into a downloadable contribution.

I submitted it to the add-ons section under "Matching Listings" but, til it appears there you can take it from right here :clap:

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

5 Feb 2010, 7:16 AM
#176
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Using one single listing template

Hi,
the download is available here:
blog.rubikintegration.com/2009/08/08/speed-up-your-zencart-development-by-using-single-listing-template/

You can call ME stupid as I found all the template possibilities very confusing, I found not get clear what was coming from where so..

  1. I have been writing a new readme for the mod including a description how default templates work so I can refer to it
  2. I fixed an error with missing fields when using Specials with the product listing template.
  3. I added the missing defines for the table headings
    4)) I have added a debug line in the files which shows which template code is being used.

(when I have fixed whatever I have just broken elsewhere in the templates I will finish and upload it....)

regards
Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

6 Feb 2010, 10:14 AM
#177
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,022
Plugin Contributions:
2

Re: Using one single listing template

torvista:

and also in tpl_modules_product_listing.php, line 35

<div class="productsListingListingTopLinks navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div> ``` > > should be > > ```php <div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div> ``` > > regards > Steve

Steve Thanks for the headsup.

Similar fixes to posts #174 & #175 to be applied to the same files for bottom links, about 20 Lines down, ie look for productsListingListingBottomLinks

6 Feb 2010, 6:00 PM
#178
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Using one single listing template

Thanks for that,
I don't spot anything wrong unless Firefox+HTML validator tells me about it!

Coincidentally I have finally fixed everything I found wrong with the mod and uploaded a version 1.6.
Apart from the fixes detailed below, I have included a description of how the default templates work to help me and people like me who have found it difficult to identify what goes on and how it relates to the admin settings.

regards
Steve

Changes/Bugfixes for v1.6
6/2/2010

  1. tpl_modules_product_listing.php line 33
    productsListingTopNumber and productsListingBottomNumber were classes instead of ids, class was missing too.
  2. extra defines required for product listing table headings
  3. Specials listing was missing manufacturer, model, quantity and weight when these optional fields were selected for display in Admin-Configuration-Product Listing. Code added to sql query in
    \includes\modules\pages\specials\header_php.php
  4. When Product Listing was chosen as columns instead of rows, the Manufacturer and Model were butted together due to missing div and class definitions. Added div and classes to quantity and weight items, and weight unit define to weight.

\includes\modules\TEMPLATE\new_products.php
\includes\modules\TEMPLATE\featured_products.php
\includes\modules\TEMPLATE\specials_index.php
All were missing code to produce product listing table heading when original listing option 1 selected for index page ($title was not defined)

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

7 Feb 2010, 10:57 AM
#179
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,022
Plugin Contributions:
2

Re: Using one single listing template

What is the actual title of the mod?

I did a search through Addons and Contributed Modules but could not find any reference to single listing template.

7 Feb 2010, 2:29 PM
#180
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Using one single listing template

I have only just uploaded it, it can take a few days before it gets available for download, I'll post here when it is available,

Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...