Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How do I add a text area on the catagory pages?

How do I add a text area on the catagory pages?

Views: 3,708

Results 1 to 20 of 33
31 Jul 2009, 12:42 AM
#1
drunkguy avatar

drunkguy

New Zenner

Join Date:
May 2009
Location:
Longmont, CO
Posts:
91
Plugin Contributions:
0

How do I add a text area on the catagory pages?

Hi Everybody!

How do I add a text area on the catagory pages similar to the area on top of the main_page. I need one at the top of the center box and one below, just above the footer on each catagory page. Each will have different text.
Is this possible?

v1.38 and cherry-zen template.

Thanks

1 Aug 2009, 7:32 PM
#2
drunkguy avatar

drunkguy

New Zenner

Join Date:
May 2009
Location:
Longmont, CO
Posts:
91
Plugin Contributions:
0

Re: How do I add a text area on the catagory pages?

Bump. I really need some help with this.

thanks

1 Aug 2009, 8:21 PM
#3
confused_aswell avatar

confused_aswell

Zen Follower

Join Date:
Apr 2008
Location:
UK
Posts:
315
Plugin Contributions:
1

Re: How do I add a text area on the catagory pages?

Hi

Can you provide a link to your site so we can see what is on your main_page.

Thanks

Phil

1 Aug 2009, 10:20 PM
#4
niccol avatar

niccol

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

I think what you are asking is for two blocks of text to be entered from the admin area and appear on the product_listing page ( the one with all the products in one category). T he text will be different on the top and bottom blocks and also different in each category.

Is that about right?

So my first question is this. Isn't the top block of text just the category description? You can put whatever you like in there.

OK. To answer the question. Yes, it is possible. You are going to need to do some serious of tpl_product_index_list, create new define pages for the top and bottom of each category, etc. etc.

If the categories description works for the top block of text then I think I might have a work around that might work. So, let me know about whether the description does work for you for the top text element.`

2 Aug 2009, 12:53 AM
#5
drunkguy avatar

drunkguy

New Zenner

Join Date:
May 2009
Location:
Longmont, CO
Posts:
91
Plugin Contributions:
0

Re: How do I add a text area on the catagory pages?

Hi. Thanks for the replies.

Here is the link to the site http://www.angiejolee.com/store/ (main page)

What I need is a areas to add text (for SEO) on my catagory pages.
Example url http://angiejolee.com/store/index.php?main_page=index&cPath=154

There would be a text area for each sub catagory along side the sub cat image describing the content of the sub catagory's

It would be better to display the sub catgories in rows rather than columns.

Here is a link to someone else's site that shows what I want my catagory pages to look. Not zen cart probably.

http://www.discreet-romance.com/vibrators-c-1.html

Is this possible with zen 1.38 and Cherry-Zen template?

Thanks everybody.

2 Aug 2009, 9:07 AM
#6
niccol avatar

niccol

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

1.Originally you said:I need one at the top of the center box and one below, just above the footer on each catagory page.

If that is the case then the top one will be achievable by using the category description which you add from the admin section (admin-catalog-categories/products then navigate to your category and edit it) The bottom one, just above the footer can be slotted in with a bit of php and as I say I have a thought about how to do that easily but won't waste time coding if this isn't what you want.

2. In your next post you said : There would be a text area for each sub catagory along side the sub cat image describing the content of the sub catagory's

Which is kind of different. It is also possible with a bit of php editing, probably starting with category_row.php. So, also a bit of work.

You need towork out exactly what it is that you want. Getting text in the is an admirable aim for SEO but you need to decide where you are going to put it.

2 Aug 2009, 10:58 AM
#7
drunkguy avatar

drunkguy

New Zenner

Join Date:
May 2009
Location:
Longmont, CO
Posts:
91
Plugin Contributions:
0

Re: How do I add a text area on the catagory pages?

Hi niccol, thanks for the help.

This little project is only needed on the catagory pages.
My SEO suggests revelant text above and below the content area. Content consists of the sub-catagory tabs/images (turned on).

I think I can acheive this by implementing the text along side the sub-catagory/tab image(s) rather than text above and below the subcatagory/tab image(s).
However I need to change the sub-catagory/tab to display in rows instead of columns.

So basicly,

  1. Change sub-catagory/tab image(s) to display in rows not columns.
  2. Add a container or whatever to the right or left to hold the text.
    Alternate positions and repeat as needed.

for example:
sub-catagory/image - text area
text area - sub-catagory/image
sub-catagory/image - text area
text area - sub-catagory/image
etc .......

Hope that clears up some confusion.

Thanks again

2 Aug 2009, 1:15 PM
#8
niccol avatar

niccol

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

Well, to go that route start by specifying that you only one one product per row.

admin>>configuration>>max values >> categories to list per row

Set to 1.

Then you are going to have to edit category_row.php to add in the stuff that you want for each row. Then you are going to have to style it using css.

2 Aug 2009, 1:56 PM
#9
niccol avatar

niccol

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

Then your category_row.php file is going to have to be edited to something looking like the attached file.

You are going to need to ensure that you have category ( and sub-category) descriptions added where appropriate.

And before you start messing with the category_row.php file make sure you have BACKED UP.

This works fine on a clean(ish) install of Zen that I run on a test server. You will need to edit your css file to make the formatting look the way you want.

2 Aug 2009, 6:40 PM
#10
drunkguy avatar

drunkguy

New Zenner

Join Date:
May 2009
Location:
Longmont, CO
Posts:
91
Plugin Contributions:
0

Re: How do I add a text area on the catagory pages?

Thanks niccol!

That should be a GREAT start. Works fine on my test install also.

I may be back if I cant fiqure out how the style it. I assume I should look at the main stylesheet css in cherry zen directory.

Again, thank you very much!
:clap:

2 Aug 2009, 8:37 PM
#11
niccol avatar

niccol

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

Yes, that sounds as if it is the right stylesheet, but I don't know that template so can't be sure.

Good luck with it. Let us know how you get on.....

3 Aug 2009, 7:54 PM
#12
drunkguy avatar

drunkguy

New Zenner

Join Date:
May 2009
Location:
Longmont, CO
Posts:
91
Plugin Contributions:
0

Re: How do I add a text area on the catagory pages?

Nick, if your still around, I guess I will need an area to add text at the bottom of the content area (bottom of center box) that displays on all pages. Page specific, the text would be different on each page.

Is it possible?

Thanks for all your help!

Drunkguy

3 Aug 2009, 8:45 PM
#13
niccol avatar

niccol

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

Ha Ha Ha - so you want both options then?:smile:

Yes it is possible.

here's a question for you. Is this your site and will you be operating it yourself. The reason I ask is that the easiest way I can think about doing it without major re-writes of code is to use the category description to contain both top and bottom sections of the code. But put a artificial seperator in so in the editor the category description might look like:

TopSection
This is some entertaining text that will appear at the top of the page. This is some entertaining text that will appear at the top of the page. This is some entertaining text that will appear at the top of the page. This is some entertaining text that will appear at the top of the page.
Bottom Section
This is some entertaining text that will appear at the bottom of the page.This is some entertaining text that will appear at the bottom of the page.This is some entertaining text that will appear at the bottom of the page.This is some entertaining text that will appear at the bottom of the page.
EndSection

Then re-write the code on the page to only display the stuff between 'TopSection' and 'BottomSection' at the top of the page. And only display the stuff betweem 'BottomSection' and 'EndSection' at the bottom of the page.

That way we get to use all the existing coding that loads the description from admin to the appropriate page. A lot less coding :smile:

But has the disadvantage that you need to know that you HAVE to put 'TopSection' 'BottomSection' and 'EndSection' in the category description so wouldn't be great for shops that have lots of people editing category descriptions.

Let me know.

4 Aug 2009, 2:24 PM
#14
niccol avatar

niccol

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

This is how it works.

Replace the existing tpl_index_categories.php with the version that is attached.

Then in your category descriptions use the divider '###' to separate the text that you want to appear at the top from the text that you want to appear at the bottom. (At the moment it is above the new products box etc but it could be moved below them)

So your category description might be:

Some text at the top. Some text at the top. Some text at the top. Some text at the top. Some text at the top. Some text at the top. ###Some text at the bottom Some text at the bottom Some text at the bottom Some text at the bottom Some text at the bottom.

If you don't put the ### in all the text will appear at the top.

5 Aug 2009, 3:27 AM
#15
drunkguy avatar

drunkguy

New Zenner

Join Date:
May 2009
Location:
Longmont, CO
Posts:
91
Plugin Contributions:
0

Re: How do I add a text area on the catagory pages?

Thanks Nick. I didn't see your previous reply.

Yes I am the only one working this thing.
I'm not sure I follow you regarding the TOP MIDDLE and BOTTOM sections. I believe I can use the html area box to add whatever I need in the TOP section.

The MIDDLE will be flip-flop catagory/subs image/text arraingment you worked up for me.

So all I need is a way to add text or what-not below the catagory/subs image/text arraingment mentioned above within the center box.

I'll look at the php you sent tommorow.

Thanks a million Nick!

5 Aug 2009, 7:47 AM
#16
niccol avatar

niccol

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

Yes I am the only one working this thing.
I'm not sure I follow you regarding the TOP MIDDLE and BOTTOM sections. I believe I can use the html area box to add whatever I need in the TOP section.

Yes, I was confusing.

The second post is a simpler option that just involves one 'divider'(I worked it out while at the dentist!).

So yes, you just use that input to add the text to the TOP section. But any text that you add after a '###' in that same input will appear at the bottom. The code splits the text up and puts some of it at the top and some of it at the bottom. It splits it up at the point where you put the '###'.

So if you had 'The quick red fox jumped over the lazy brown dog' that would all appear at the top.

If you have 'The quick red fox jumped###over the lazy brown dog' then the phrase ' the quick red fox jumped' will appear at the top of the page and the phrase 'over the lazy brown dog' will appear at the bottom of the page.

Its just a way of getting two entries on the page out of one entry in admin.

5 Aug 2009, 2:28 PM
#17
dw08gm avatar

dw08gm

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

Hi Niccol

Although I have yet to look at your zipped solutions on this matter, I appreciate your posting as I have been wondering how to do this for some time.

However, I am running three column categories/product pages, and am seeking a single full width box for text at the bottom of the page, where each page will have different bottom text.

I was thinking to add a "clear both" and a "div with 100% width" for the text directly after the categories/products, but since you have progressed this far, I am wondering, if you have already developed a solution for this problem, whether you could post same.

Much appreciated. Thanks in advance.

5 Aug 2009, 10:58 PM
#18
niccol avatar

niccol

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

well, the code produces a variable that is the bottom bit of text. as it stands it is in a div.

<div id="categoryDescription_bottom" class="catDescContent"><?php echo $description_bottom;  ?></div>

You should be able to put that bit of code pretty much anywhere on the page.

6 Aug 2009, 2:11 PM
#19
dw08gm avatar

dw08gm

Totally Zenned

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

Re: How do I add a text area on the catagory pages?

niccol:

You should be able to put that bit of code pretty much anywhere on the page.

The texts splits well and true, however, I had to put the bottom text part after the three column section, as the bottom text would not display anywhere between the category products and the featured, specials and new products. For compactness, I have turned off the display of the featured, specials and new products via admin.

Anyway it works and I am much appreciative.

6 Aug 2009, 10:52 PM
#20
drunkguy avatar

drunkguy

New Zenner

Join Date:
May 2009
Location:
Longmont, CO
Posts:
91
Plugin Contributions:
0

Re: How do I add a text area on the catagory pages?

Hi Nick.

I tried your modified tpl_index_catagories.php and it repeats the bottom text 3 times.

By the way this is using your catagory row mod also.

Example:
The quick red fox jumped###over the lazy brown dog

See attached screenshot

Thanks,
Drunkguy