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 261 to 280 of 327
1 Oct 2010, 8:19 AM
#261
dgallo avatar

dgallo

New Zenner

Join Date:
Sep 2010
Posts:
1
Plugin Contributions:
0

Using one single listing template

I have installed the Single Mod on ZC 1.3.9 and it is working. Nice to have everything looking the same.

I am having a couple of small issues with a drop down box, styling and spacing. I have posted pics as the site is not live at the moment. Where do I look so I modify things to get everything looking the same?

Thanks for the help,
Daren

1 Oct 2010, 8:59 AM
#262
blessisaacola avatar

blessisaacola

Totally Zenned

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

Re: Using one single listing template

ideasco:

OK good point, Mine is v1.3.7.1
Upgrading seems like a mammoth task though, since there are so many customizations and overrides. I cannot imagine how long it would take.
I only upgraded the functions_categories.php from v 1.3.9e and it seems to be working fine now. hopefully, that will do it.

If for no other reason you should consider upgrading for security reasons.

19 Oct 2010, 3:12 PM
#263
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

includes\modules\product_listing.php for SLT1.8 and 139f upgrade are so different that I am reluctant to edit for fear of virtual suicide.

Could someone confident of the changes post the upgraded SLT1.8 file.

Thanks in advance.

16 Nov 2010, 3:07 AM
#264
gqq0404 avatar

gqq0404

New Zenner

Join Date:
Jul 2009
Posts:
9
Plugin Contributions:
0

Re: Using one single listing template

I installed SLT on 1.3.8 and I am not planing to upgrade at this moment.

I got all the same template besides

  1. listing page has "TABLE_HEADING_MODEL TABLE_HEADING_PRICE". If I added single_listing_template.php in language folder, it will show proper words. But shopping cart gets error
    Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/includes/languages/english/extra_definitions/mytemplate/single_listing_template.php:1) in /home/site/public_html/includes/functions/functions_general.php on line 44
    So I simply removed the file for now. (because running site.)

  2. Home page had new listing but its gone. I don't know what happened but after I installed the mod.

Is this fixable?

16 Nov 2010, 9:41 AM
#265
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

includes\modules\product_listing.php for SLT1.8 and 139f upgrade are so different that I am reluctant to edit for fear of virtual suicide.
The change to 139f version of product_listing.php is minor, you can continue to use the SLT1.8 version. I intended to post an update at some point but don't hold your breath!

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

16 Nov 2010, 9:43 AM
#266
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

Warning: Cannot modify header information - headers already sent by
a common issue, see this:
https://www.zen-cart.com/tutorials/index.php?article=87

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

16 Nov 2010, 2:52 PM
#267
gqq0404 avatar

gqq0404

New Zenner

Join Date:
Jul 2009
Posts:
9
Plugin Contributions:
0

Re: Using one single listing template

torvista:

a common issue, see this:
https://www.zen-cart.com/tutorials/index.php?article=87

I checked space many times but there are no space. Also I uploaded blank file as single_linstings_template.php didn't work either. (The same error message.)

16 Nov 2010, 3:31 PM
#268
gqq0404 avatar

gqq0404

New Zenner

Join Date:
Jul 2009
Posts:
9
Plugin Contributions:
0

Re: Using one single listing template

gqq0404:

I checked space many times but there are no space. Also I uploaded blank file as single_linstings_template.php didn't work either. (The same error message.)

Never mind. I started over and could fix it. I don't know what was problem.

16 Nov 2010, 3:38 PM
#269
gqq0404 avatar

gqq0404

New Zenner

Join Date:
Jul 2009
Posts:
9
Plugin Contributions:
0

Re: Using one single listing template

Torvista, thanks for advise.
I still need help for

  1. Home page had new listing but its gone. I don't know what happened but after I installed the mod.
30 Nov 2010, 2:50 AM
#270
ms_x avatar

ms_x

Zen Follower

Join Date:
Mar 2010
Posts:
196
Plugin Contributions:
0

Re: Using one single listing template

Thanks for such a wonderful post:-) I got one little problem: sort by drop down menu on new products page is displayed twice...Any idea why is it so?I copied and pasted same code from the 1 page of this thread to all files (all products, specials and new...) but only here I have got this little problem.

thanks for replies:-)

30 Nov 2010, 2:56 AM
#271
ms_x avatar

ms_x

Zen Follower

Join Date:
Mar 2010
Posts:
196
Plugin Contributions:
0

Re: Using one single listing template

And I just found a bigger problem. On my product category page things are displayed twice. First the list of things and then dropdown menu "sort by" and again same list underneath it...how can I fix this?
Please help:-)

20 Dec 2010, 5:21 AM
#272
524cw avatar

524cw

New Zenner

Join Date:
Sep 2008
Posts:
53
Plugin Contributions:
0

Re: Using one single listing template

I love this mod. It makes a lot of sense!

I set up my products in a grid with the main image, product name, and price. Looks just how I want. I would like to add the manufacturers name above the product name but I'm having some trouble identifying the right bit of php code to include.

I want to put the mfr name right where the pink arrow is.

I'm editing the $lc_text part of modules/my_template/product_listing.php file.

    for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
      $lc_align = '';
      switch ($column_list[$col]) {
        case 'PRODUCT_LIST_MODEL':
        $lc_align = '';
        $lc_text = '<div class="itemModel">'. $listing->fields['products_model'] . '</div>';
        break;
		case 'PRODUCT_LIST_NAME'://STEVE for boilerplate text Product Name as a link plus optional truncated description
        $lc_align = '';
        if (isset($_GET['manufacturers_id'])) {//true if its a manufacturer listing page STEVE bof Boilerplate text
			if (!$is_slt_listing) {//normal product listing
			$lc_text = '<div class="mfr">' . what goes here . '</div><div class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></div>';
			} else {//Single Listing Template
			$lc_text = '<div class="mfr">' . what goes here . '</div><div class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($listing->fields['master_categories_id']) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></div>';
			}
		} else {//not a manufacturer product listing, but the code loaded into $lc_text is the same in either case!! 
		if (!$is_slt_listing) {//normal product listing
			$lc_text = '<div class="mfr">' . what goes here . '</div><div class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></div>';
			} else {//Single Listing Template
			$lc_text = '<div class="mfr">' . what goes here . '</div><div class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($listing->fields['master_categories_id']) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></div>';
			}
			}

I fiddled around with stuff like ```php
zen_get_products_manufacturers_name($listing->fields['manufacturers_name'])


but I can't seem to hit on the right thing. Any ideas?
20 Dec 2010, 4:32 PM
#273
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

Try having a look in the /includes/templates/classic/templates/tpl_product_info_display.php page, which displays manufacturers - I'm almost certain you could copy the code from there and it will work.

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

23 Dec 2010, 4:25 AM
#274
524cw avatar

524cw

New Zenner

Join Date:
Sep 2008
Posts:
53
Plugin Contributions:
0

Re: Using one single listing template

jackie.taferner:

Try having a look in the /includes/templates/classic/templates/tpl_product_info_display.php page, which displays manufacturers - I'm almost certain you could copy the code from there and it will work.

Thanks for the suggestion. The code there is (at least in part)

<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>

I gave it a shot and the manufacturers name didn't show up. I've been playing around a lot with this and I just can't get the darn name to show. I can make the link to the mfr page appear in the code but not the actual name. I wonder if it's something in my admin or something to do with the mod.

I might try asking in the general template area. Maybe I'm missing something obvious :lamo:

24 Dec 2010, 12:43 PM
#275
thannaree avatar

thannaree

Zen Follower

Join Date:
Dec 2010
Location:
Thailand
Posts:
304
Plugin Contributions:
1

Re: Using one single listing template

Hello,

I have installed that module and it now seems to be working fine ... Well, there’s actually an empty space below the title on the categories pages that should not be there, and which does not appear on the new products pages or all products pages. So I set the debug in the admin on true and each page shows me different codes?! See screen-shots pics attached. Do you have any clue as to what I did wrong?

Thanks much!

PS: if relevant, I’m using the latest version on ZC and installed the column layout grid before installing this single listing template.

4 Jan 2011, 8:02 AM
#276
thannaree avatar

thannaree

Zen Follower

Join Date:
Dec 2010
Location:
Thailand
Posts:
304
Plugin Contributions:
1

Re: Using one single listing template

So I set the debug in the admin on true and each page shows me different codes?!

The spaces under titles and debug codes discrepancies had to do with categories/products listed before and categories/products listed after installing the module. I uninstalled all categories/products (fortunately only a few) and reinstalled them. It now works like a charm.

21 Jan 2011, 9:36 PM
#277
osmizk avatar

osmizk

New Zenner

Join Date:
May 2005
Posts:
6
Plugin Contributions:
0

Re: Using one single listing template

Hi, I got an error on New Listing Page that says
1109 Unknown table 'p' in field list
in:
[select count(p.products_id) as total ]

Does anyone know how to fix this?

Thank you!

5 Feb 2011, 3:34 PM
#278
causeone avatar

causeone

New Zenner

Join Date:
Jul 2008
Posts:
15
Plugin Contributions:
0

Re: Using one single listing template

(I posted this in another thread as well, but it may be more relevant here, apologies)

  1. tell me if I'm in the right thread (there seems to be two that are dealing with similar issues).

  2. I'm using the grid layout and would i like to customize the appearance of the individual product listings in the grid using CSS.

I'm fairly competent at CSS, but I'm having a little trouble finding the correct elements to edit the appearance of.

Here is what I would like to accomplish:

  • Add padding/ margin between the individual products listed in the grid (really either will suit my purpose, just need some spacing between each listing so they don't run together as much).

  • Declare a consistent size for the grid listed products, and add a background image to them.

  • Put the price and "Buy" image on the same line instead of having them vertically stacked.

Any help/ pointers/ directions would be awesome.

k

5 Feb 2011, 6:46 PM
#279
gjh42 avatar

gjh42

Black Belt

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

Re: Using one single listing template

You want to be posting in the styling product listing pages with column layout grid thread. The Flexible Product Listing mod attached to post 50 of that thread will let you make the individual product layout changes you want. The overall changes can be done with the basic column grid mod and the stylesheet.

12 Feb 2011, 5:09 PM
#280
causeone avatar

causeone

New Zenner

Join Date:
Jul 2008
Posts:
15
Plugin Contributions:
0

Re: Using one single listing template

gjh42:

You want to be posting in the styling product listing pages with column layout grid thread. The Flexible Product Listing mod attached to post 50 of that thread will let you make the individual product layout changes you want. The overall changes can be done with the basic column grid mod and the stylesheet.

Now I'm getting confused - should I not have installed the Single Listing Template that also includes the grid layout?

Should I have used Flexible Product Listing instead? Is it 1.3.9 compatible? (The post you reference only lists 1.3.8a).

Do I now need to remove the Single Listing Template and install Flexible Product Listing mod to have more control of the way items display (using CSS)?