Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add Text Between Products on Sub-Category Pages?

Add Text Between Products on Sub-Category Pages?

Views: 2,394

Results 1 to 16 of 16
16 Nov 2011, 12:52 AM
#1
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Add Text Between Products on Sub-Category Pages?

So - I'm toying with an idea and I don't even know if this is possible. I'm trying to think of a way, but I'm stumped. In short, if you have a sub-category page with all the products listed on it, I think it would be a GREAT feature to allow adding some text (header and subtext) between products to help clarify the lineup. I don't mean simply displaying the subcategory text at the top of the page. I'm talking about headers and text between a range of products, perhaps with placement of the text tied to a product ID or model number (see pics).

Does anyone think this is possible or am I just dreaming?

I photo-shopped an existing page to give a better visual of the idea.

16 Nov 2011, 1:08 AM
#2
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Add Text Between Products on Sub-Category Pages?

No idea if it can be done, but kudos for producing a graphic that makes your question very clear. Too many times the hardest thing about answering a question is figuring out what the question is.

16 Nov 2011, 5:40 AM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Add Text Between Products on Sub-Category Pages?

Sounds like you're after the Listing Subheading mod I have mostly completed. It allows subheadings to be inserted above any given product or subcategory in a product listing or category listing page. I wrote the core of it for subcats 3 or 4 years ago in a forum thread, but never got it expanded and finalized. It is now ready for beta testing, with the added ability to specify output in columns, with one or more heading groups vertically in each column.
I can attach a copy here if anyone wants to try it.

16 Nov 2011, 5:13 PM
#4
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Add Text Between Products on Sub-Category Pages?

Oh yeah! That would be AWESOME! I would love to try that! I have to believe there are others who could benefit form such a mod. For this project, the ability to "break down" the products with a little more text and headings would be incredible! Thanks for the shout back!

16 Nov 2011, 5:31 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Add Text Between Products on Sub-Category Pages?

The code is currently somewhat of a jumble, with parts that will be separate files all in one for development ease. I just started the file segregation a few days ago. But it should be functional... I'll look at it and pack it up with a few notes of explanation. The readme is just started and doesn't have much useful yet. It will be a day or so before I get to it.

16 Nov 2011, 6:38 PM
#6
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Add Text Between Products on Sub-Category Pages?

I have my helmet on and I'm willing to be a test pilot when you're ready!

Thanks for the effort and the contribution.

5 Dec 2011, 10:07 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Add Text Between Products on Sub-Category Pages?

I have the files separated out, and the necessary Flexible Product Listing files brought into the package. The readmes for both mods have been fleshed out a bit. I still need to test-install it on my development site to make sure I haven't forgotten something... should be soon.

17 Dec 2011, 3:38 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: Add Text Between Products on Sub-Category Pages?

The debugging was more involved than I anticipated, but I now have everything working and a few improvements over the previous intended features.
I will attach the beta zip here while it is being tested. The readme is still incomplete, so if there is any info you want in it, post here to let me know.

28 Dec 2011, 4:29 PM
#9
gjh42 avatar

gjh42

Black Belt

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

Re: Add Text Between Products on Sub-Category Pages?

If anyone who has used this has any comments, please make them soon so I can account for them in the final package. Thanks!

17 May 2012, 7:26 PM
#10
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Add Text Between Products on Sub-Category Pages?

To follow up on this project, I've uploaded the files and ran the SQL updates. However, there's a few problems that I suspect are easy to fix but beyond my knowledge. I'm not seeing the subheads appearing which is a result me not doing it right or lacking a proper file merge.

For the purpose of seeing my pages with Cat ID's and product numbers, we'll use a random product page on my site. To avoid search engine discovery, I've obfuscated the domain name…

http://www.DOMAIN.com/index.php?main_page=index&cPath=290
(change domain to R U G G E D R A D I O S)

Since my use for this mod is for the product listing page only, I only edited line 10 in the "defines" file which is what I think I'm supposed to be doing, right? Since this is new territory for me and other Zen Cart users, this also begs the next question. Once the files, code, and upload are all accurate, does this mod automatically move product down to fall under the subheads? See image for better explanation:
Attachment 10493

Here's the defines I'm using for that:

<?php
//Category or Product Listing Subheadings (t=100211)
//=================================
//includes/languages/english/extra_definitions/your_template/listing_subheads_defines.php
// Listing Subheadings by Glenn Herbert (gjh42) v0.9 test 2011-12-16

// comment out any defines not to be used
define('CAT_SUBHEADS', serialize(array(9=>'Subheading for Cat 9',23=>'Subheading for Cat 23',45=>'Subheading for Cat 45'))); //replace 9, 23 & 45 with cat ids; duplicate items as needed  - escape apostrophes \'

define('PROD_SUBHEADS', serialize(array('290_660'=>'Sample text above 1st item with Prod ID of 660','290_661'=>'Sample text above 2nd item with Prod ID of 661'))); //replace 2_20_23 & 22_16 with cPath+_+prod ids; duplicate items as needed  - escape apostrophes \'

define('CAT_COLUMN_DIVS', serialize(array(9,23)));//cats to start new cols - must be subheads

define('PROD_COLUMN_DIVS', serialize(array('7_57','22_16')));//prods to start new cols
//EOF

In a private message, you referenced that you weren't sure if I had a proper merged file and that maybe your live version is different than the beta file I tested. I wouldn't know, but maybe the link above will allow you to see something obvious.

Thank you for this!

18 May 2012, 5:04 AM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: Add Text Between Products on Sub-Category Pages?

The zip version may be slightly different than my working copy, but it should properly handle defines like you have. The defines file is identical aside from your customization. If you are only using the 'PROD_SUBHEADS' define, you should comment out the others with // to reduce processing time. If there is no define for a listing application, it skips all the lookups and comparisons while creating the output.

The mod does automatically start each subhead on a new line, so you should be seeing the flagpole on the top and the rest below, with subheads above each set. I would probably need to look at your files to see what is going wrong for you.

18 May 2012, 5:08 AM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: Add Text Between Products on Sub-Category Pages?

What is your Zen Cart version? It should work the same for v1.3.9 and v1.5.0, but I have only tested it on v1.5.0 (actually RC2 or RC3, as the final was not released when I posted the zip).

18 May 2012, 5:49 PM
#13
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Add Text Between Products on Sub-Category Pages?

  1. I'm using 1.3.9h

  2. Awesome that it re-flows the products!

  3. Here's a link to a .zip folder of my includes files. In retrospect, I only uploaded what you sent and haven't modified anything other than 'defines', so I'm not sure what this would reveal, but I'm sure you know what you're looking for. Just to explore any other underlying issues, I've "zipped" the complete includes folder (less the config file).

http://www.r u g g e d r a d i o s m e d i a.com/includes.zip
(remove spaces)

  1. I want to help make this easy so I'm not one of those annoying forum posters. Let me know if I can provide any additional info or files to help. Once this is figured out, I'll share my side of installation and operation with everyone.

Thanks for your help on this!

13 Jun 2012, 1:30 AM
#14
gjh42 avatar

gjh42

Black Belt

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

Re: Add Text Between Products on Sub-Category Pages?

I see one definite difference: your /includes/templates/rugged/common/tpl_columnar_display.php is the stock version, not the LS version. (Or it might be a version for some other mod, I haven't examined the code for that possibility.) Check the mod package for a version with the comment

  • Modified for Listing Subheadings by Glenn Herbert (gjh42) v0.9 test 2011-12-16
25 Sep 2012, 6:50 PM
#15
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Add Text Between Products on Sub-Category Pages?

Glenn,

I hate to re-visit this, but I'm overwhelmed with this project and this feature is soooo important for our company. There's just too much product confusion and I desperately want to figure this out for our customers. I decided to try this again and it seems I've got everything uploaded correctly. I added the CSS lines from Listing Subheadings to my stylesheet. I'm obviously missing something; either in practice or in concept.

The moment I upload the tpl_columnar_display.php file, the website sort of breaks. All the products disappear from the page and my right sideboxes and footer disappear. I could be wrong, but in an effort to help, it seems the problem for me starts when I upload that file. I'm not sure what else might be contributing to this because I can't get any further.

Since I can't get past that point, there's no way for me to do anything else, check it, work with it, etc.. I'm stuck at the starting line.

I could really use your help on this one and we'll gladly buy you a HUUUGE CUP OF COFFEE! *** hint hint ***

Thank you!

25 Sep 2012, 11:17 PM
#16
gjh42 avatar

gjh42

Black Belt

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

Re: Add Text Between Products on Sub-Category Pages?

I'll be happy to help. I want to get back to finishing the development of Listing Subheads and Flexible Product Listing (which are going to be separate mods). LS will depend on FPL if you want to use it in product listings, but both mods will be able to be used by themselves for their respective areas (categories and products).

I will be reviewing the code and installing them in my new v1.5.1 test site. I think there will be no conflicts when used in v1.3.9h; I will check to be sure.