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 281 to 300 of 327
20 Feb 2011, 5:19 AM
#281
dw08gm avatar

dw08gm

Totally Zenned

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

Using one single listing template

I am using Single Listing Template and have products generally arranged 3 per row, but to reduce page length, want the new, specials, and featured categories to be shown on the index page, all on the same row and with only one product max shown in each of the new, specials, and featured categories.

Where I have no products to show in any of these categories, I still want to show the category but with a blank "Not available" product.

When visiting any of these categories, I want the products to show in the normal three per row arrangement.

To achieve this layout, which file should I edit in SLT or should I de-activate SLT.

Thanks in advance

28 Apr 2011, 7:56 PM
#282
damiantaylor avatar

damiantaylor

Zen Follower

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

Re: Using one single listing template

Hi,
I've been using this mod for over a year now and have just noticed a bug.
If you have a category without any products (because they have sold out) you just see an empty page. The 'No products for your criteria! Please try again.' message does not appear.

This is beacuse of the following if clause on line 13 in tpl_modules_product_listing.php....

 if((!isset($is_index_listing) || $is_index_listing) && $listing_split->number_of_rows > 0) {

If I change this line to....

 if((!isset($is_index_listing) || $is_index_listing)) {

....it fixes the problem but is it safe to do so?
Will I get other errors I don't yet know about if I remove the number_of_rows check?

20 May 2011, 2:08 AM
#283
njka avatar

njka

New Zenner

Join Date:
Oct 2010
Posts:
18
Plugin Contributions:
0

Re: Using one single listing template

Hi there

I've installed this mod and gone to the Index Listing and changed my Special Listing Template to the value 3 (use product listing template) and have double checked that my Product Listing - Layout Style is set to rows however my Specials still appear in a gird layout. Is something overriding the mod for my specials page?

http://www.kodomo.com.au/index.php?main_page=specials

Thank you

23 Jun 2011, 9:51 PM
#284
necroside avatar

necroside

New Zenner

Join Date:
Jun 2011
Posts:
8
Plugin Contributions:
0

Re: Using one single listing template

Hi All
This is the issue, I need to split the page result for featured products on
index page of my site, it uses the ExecuteRandomMulti() function, I tried replacing it with split_page_results and using the same query and changes to the code with no luck so far. I'm modifying includes/modules/featured_products.php

Is there a way to acomplish this?

29 Jun 2011, 5:22 PM
#285
weljkodj avatar

weljkodj

New Zenner

Join Date:
Oct 2010
Posts:
34
Plugin Contributions:
0

Re: Using one single listing template

osmizk:

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!

Hi, I have the same problem, have you solved it yet?

11 Aug 2011, 1:23 PM
#286
benmckechnie avatar

benmckechnie

New Zenner

Join Date:
Nov 2007
Location:
North East United Kingdom
Posts:
25
Plugin Contributions:
0

Re: Using one single listing template

Hi,
I've just installed the single listing template mod on my 1.3.9h site (with lots of mods added) and it is displaying correctly but when i add something to the cart it redirects to the homepage rather than simply refreshing the new/ all/ specials page.

My site is here: http://www.thejollygourmand.co.uk/index.php?main_page=products_new

Using Firebug i can see that the add to cart button link seems to miss out the 'main_page=products_new' section of the url, but i don't know how to correct this. I am using Ceon URI mapping but turning this off doesn't seem to correct the issue.

The files for the SLT are all in place and unmodified other than adding a <br /> between the product title and price, and i have installed the SLT SQL file. I already had the Column Grid Layout mod for my category pages so didn't need to install the CGL SQl patch - and i had upgraded to the latest version of the Grid layout mod when i upgraded from 1.3.8a to 1.3.9h just a few weeks ago.

I've only been aware of this since installing the SLT mod (but i guess it is possible that i didn't notice it before).

Many thanks

Ben

11 Aug 2011, 3:39 PM
#287
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

If Ceon URI mapping isn't affecting it then I'm not sure that the URL is your problem. Have you tried uninstalling SLT and see if the problem persists?

If the problem goes away, then try comparing the template files of SLT to the default template files from Zen Cart. There is likely some kind of function missing in the header. That's guesswork though, I haven't personally checked out the files in detail. Let us know how it goes!

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

12 Aug 2011, 9:48 AM
#288
benmckechnie avatar

benmckechnie

New Zenner

Join Date:
Nov 2007
Location:
North East United Kingdom
Posts:
25
Plugin Contributions:
0

Re: Using one single listing template

Hi jackie.
Thanks for the reply, i've removed the SLT on my test site (http://www.e-picker.co.uk/testjolly/index.php?main_page=products_all&disp_order=3) and this removes the problem so have checked the header.php files and they are very different, although they are as downloaded with the module - i haven't changed them. I did notice that i hadn't upgraded the Column Grid layout as i thought but then these files are replaced/upgraded with the SLT module anyway and the SQL patch for column grid layout is the same so this can't be the issue?

I presume others are using this fine with 1.3.9h so it must be some other module i have installed. If you think its the header file then i'll look and see which modules change these files and hopefully that will identify the problem. I'll let you know if i find anything but if you (or anyone) has any other ideas they'd be greatly appreciated as i'm not much of a coder!
Thanks
Ben

12 Aug 2011, 10:44 AM
#289
benmckechnie avatar

benmckechnie

New Zenner

Join Date:
Nov 2007
Location:
North East United Kingdom
Posts:
25
Plugin Contributions:
0

Re: Using one single listing template

Update: Having compared the header_php.php files, mine are identical to the SLT module files so don't have any changes introduced by other modules.
Does anyone know what other files might affect the add to cart button redirection?
On another note i've tried changing the config to disable the 'add multiple products to cart' button, and the individual product 'add to cart' buttons then redirect to the individual product pages. However, i'd like customers to stay on the category / new products listing pages rather than having to click 'back' to add more more products. Is this a topic for another thread or is this related to the SLT template?
Many thanks
ben

12 Aug 2011, 3:54 PM
#290
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

I ran a test on one of my own sites, and the page redirection works fine on category pages, however it does not work on all/new/featured pages. So there appears to be a bug in SLT on those particular pages.

You can compare the "category" template files to the "all/new/featured" files and see what they're missing. Turn on Debugging in Admin>Configuration>Index Listing. That will give you a list of files to look at.

If you're unfamiliar with code, it will make this task difficult and you may want to contact the developer and ask for assistance. It seems to me this is a bug that needs to be fixed.

If I have time, I might look into fixing it soon but I can't guarantee.

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

12 Aug 2011, 5:08 PM
#291
benmckechnie avatar

benmckechnie

New Zenner

Join Date:
Nov 2007
Location:
North East United Kingdom
Posts:
25
Plugin Contributions:
0

Re: Using one single listing template

Hi jackie
Many thanks for the reply (again). I've managed to work around the problem by disabling the 'add multiple items to cart' button so i have an 'add to cart' button next to each item's quantity box and then using Ajeh's fix (here: http://www.zen-cart.com/forum/showthread.php?t=174212) to stop the redirection to the product info page when a customer adds something to their cart. This is working with the Single Listing Template as well as the main category pages (although i still need to give it a good test).
It's taken a little time to get things working and positioning as i needed but i think i've learnt a lot and now have things right. Fingers crossed a full test will not find any issues!
Thanks again,
ben

16 Sep 2011, 6:06 AM
#292
tranced avatar

tranced

New Zenner

Join Date:
Aug 2011
Posts:
6
Plugin Contributions:
0

Re: Using one single listing template

Hi guys. And girls.

I'm having a problem. :frusty:

I have SLT mod installed.
I need product listings to randomize their order on each page load. Currently, specials, featured, new, and regular old product listings do not randomize the orders per load.

I've tried changing (includes/modules/template/product_listing.php)

if ($is_slt_listing) $listing = $listing_split->records

to

if ($is_slt_listing) $listing = ExecuteRandomMulti($listing_split->records)

but this caused the products not to display.

I know that this is the default behavior of ZenCart product listings without Column Display or SLT mod. It could quite possibly be the default behavior of the mod as well!

I'm not sure, but at the moment it is not possible for me to revert to a non-SLT design.

Please help, if possible.

17 Sep 2011, 8:57 PM
#293
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Using one single listing template

Hi,

I've installed SLT on a site and have everything displaying fairly close to what I want, but...

How do I get a sub-category listing to display in columns just like a product listing or the other listings? By sub-category listing, I mean a page which lists sub-categories, not products. (I guess it's a list of categories, whether they're sub- or not.)

Have a look here to see a page with a New Products listing at the bottom, in 3-columns as desired, and a sub-category listing at the top. That sub-cat listing is what I'm trying to get into 3-columns.

Thanks,

Rob

Breakfast: the most important donut of the day.

18 Sep 2011, 1:40 AM
#294
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Using one single listing template

I should also mention that admin/Configuration/Maximum Values --> Categories To List Per Row as well as Maximum Display Columns Products to Multiple Categories Manager are both set to 3. There must be something in the template that is overruling those settings.

Rob

Breakfast: the most important donut of the day.

18 Sep 2011, 2:26 PM
#295
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Using one single listing template

More info...

(If I talk to myself long enough I may solve this. But a hint or two would be welcome. :frusty: )

I've found that if I place the file tpl_columnar_display.php in the common folder in my template, I get 3-column tables for all the lists, including New, Specials, and the cats/sub-cats lists. If I remove it, I get DIVs, and my single listing styles then apply to the DIVs as required. But I instantly lose the 3-column display in the cats/sub-cats lists, while the New, etc. all remain 3-columns.

My main template, I conclude, is the one supplying the DIVs, though how it does that I don't know. It's a mixture of Twist of Nature and SexyPink. It was minimally mixed to try to keep the DIVs. SP by itself gives the correct 3-column layout for the cats (as does the Classic Green, of course), but it's difficult to style table cells the way I want. TofN + Single Listing gives the styling I want but won't give me the 3-column cats lists.

Any ideas are welcome at this point.

Rob

Breakfast: the most important donut of the day.

8 Oct 2011, 4:13 PM
#296
mikeislearning avatar

mikeislearning

New Zenner

Join Date:
Sep 2011
Posts:
23
Plugin Contributions:
0

Re: Using one single listing template

Hey guys,
Ok so I did the initial things yellow did on page 1-2 (didn't use the mod). and I got all products in the tabular display.

My problem is that the headers (product image / product name / manufacturer name / price) are not clickable for ascending/descending sorting.

Anyone else have that problem and have a cure?

Thanks ahead of time.

8 Oct 2011, 7:49 PM
#297
mikeislearning avatar

mikeislearning

New Zenner

Join Date:
Sep 2011
Posts:
23
Plugin Contributions:
0

Re: Using one single listing template

Disregard the last question. I figured out how to add things(manufacturer) to the Sort By: Dropdown Menu.

19 Dec 2011, 6:43 PM
#298
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Using one single listing template

Question: am I mistaken or if you you the product_listing template for specials ( for instance ) it seems that the main products query runs twice.

in header_php $listing_sql is set. This is going to be used in product_listing.php.

but in main_template_vars there is another query which is called $specials_query_raw which is also run.

So on a specials page that uses the product listing the main product query is run twice, which seems a bit strange and not terribly efficient.

Basically this line

  $specials_split = new splitPageResults($specials_query_raw, MAX_DISPLAY_SPECIAL_PRODUCTS);

is run in main_template_vars but is completely redundant if you choose to use product_listing.

Actually looking again I am somewhat confused about what $specials_query_raw actually does. If anyone can enlighten me please let me know.

Nick
iszent.com

4 Apr 2012, 10:15 AM
#299
ironman avatar

ironman

New Zenner

Join Date:
Nov 2011
Posts:
12
Plugin Contributions:
0

Re: Using one single listing template

lzwdavid:

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?

I got the same error message when patching the sql in admin->tool. but cannot find the answer here. Is there anything wrong? pls help.

25 Apr 2012, 12:34 PM
#300
hmartens avatar

hmartens

New Zenner

Join Date:
Sep 2011
Posts:
5
Plugin Contributions:
0

Re: Using one single listing template

I'm running zencart 1.3.9h and installed the SLT v1.8. I did everything as per readme but a couple of things went haywire and nothing went better! For starters, my frontpage that displayed all the latest products added, now shows random products and changes everytime you hit refresh. New Products still displays 1 per line as it always did. And under "All Products" there are NO products displayed!

Please help! I followed every step and don't know why it's not working (and it's a LIVE site!)