Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

  • Index
  •  » ClickCartPro 6
  •  » additional text BELOW category product listing - but only on 1st page

#1 07-24-2008 20:41:35

wyattea
Member
Registered: 01-07-2006
Posts: 1650

additional text BELOW category product listing - but only on 1st page

I already have some text at the top of my category pages that can be added through the interface. I'd like to create a new table that stores additional text that can go below the products found in a category.  Basically just a bunch of sentences or a few paragraphs related to the topic of the category.

I'm sure I can find the place to put the code (that calls the products to be displayed) but I don't want it to display if there are too many products for one page and there's another page. I'm guessing I would need an if statement that checks if it's the 1st page...or, just not the 2nd+ page? Anyone have an idea how to do that? Maybe it's easier to add a new column to the category table...I did it for the product table as a user defined section, but I don't know if it can be done for categories.  It's also been a long time, don't remember what I did smile

James...

Offline

 

#2 07-27-2008 07:48:26

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: additional text BELOW category product listing - but only on 1st page

Give this a shot.

Make a new column in category table.... mine is called "descriptionalt"

In skin.php add this to where you would like it to appear

Code:

<?php

if ($ns_id == 'catshow') {
echo '<div id="skin_contenttext">';
$catshow = $this->globals('ecom.cat_catshow');
print $catshow['descriptionalt'];
echo '</div>';
} //End of if statement.

else {} //End of if statement. 
?>

I actually use this at the bottom of the page so as to spread some of the text out towards the bottom for SEO purposes.

Not sure how to limit this to just the first page of a category however.

Anyone know how to do that?


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#3 07-27-2008 08:08:48

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: additional text BELOW category product listing - but only on 1st page

Thanks man...is $ns_id your own variable or system one? I've seen $ns before but not $ns_id?

I was thinking it put it in the center column below the product pics, but I guess I can do it in the footer as well since it'll only show for category pages...will have to play with it to see what looks more natural smile

Offline

 

#4 07-27-2008 08:14:26

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: additional text BELOW category product listing - but only on 1st page

That is a system variable..


Go to the top link in my sig. You'll see how all the text at the bottom of the page works.  It actually changes for all the pages....

The code I gave you was only a portion of the code I'm using to do that.

Yahoo loves text all over the page.... bottom area too.

Last edited by theblade24 (07-27-2008 08:15:19)


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#5 07-27-2008 08:27:54

ZipSkins
Member
From: United Kingdom
Registered: 01-15-2006
Posts: 822
Website

Re: additional text BELOW category product listing - but only on 1st page

theblade24 wrote:

Give this a shot.
Not sure how to limit this to just the first page of a category however.

Anyone know how to do that?

Im assuming that if there is nothing entered in the 'descriptionalt' field then it wont print anything as it has nothing to print?
In which case you would only have a description for those categories that you choose to enter an alt description for? (i.e just the first page of a category and none of it's child categories)

Great little mod by the way smile

Last edited by ZipSkins (07-27-2008 08:29:35)


| Professional Quality Customisable Skins for your ClickCartPro Powered Site


-----------------------------
Certified Support Partner

Offline

 

#6 07-27-2008 08:28:55

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: additional text BELOW category product listing - but only on 1st page

can you give me all of the code then?

Offline

 

#7 07-27-2008 08:54:39

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: additional text BELOW category product listing - but only on 1st page

on a side note, i'm top of page for primary keywords on google, but 2nd page on yahoo...what else would yahoo like? smile

Offline

 

#8 07-27-2008 09:32:38

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: additional text BELOW category product listing - but only on 1st page

Code:

<?php

if ($ns_id == 'catshow') {
echo '<div id="skin_contenttext">';
$catshow = $this->globals('ecom.cat_catshow');
print $catshow['descriptionalt'];
echo '</div>';
} //End of if statement.

elseif ($ns_id == 'prodbest') {
echo '<div id="skin_contenttext">';
print $metadesc;
echo '</div>';
} //End of if statement.

elseif ($ns_id == 'prodnew') {
echo '<div id="skin_contenttext">';
print $metadesc;
echo '</div>';
} //End of if statement.

elseif ($ns_id == 'prodspec') {
echo '<div id="skin_contenttext">';
print $metadesc;
echo '</div>';
} //End of if statement.

elseif ($ns_id == 'prodall') {
echo '<div id="skin_contenttext">';
print $metadesc;
echo '</div>';
} //End of if statement.

elseif ($ns_id == 'prodidx') {
echo '<div id="skin_contenttext">';
print $metadesc;
echo '</div>';
} //End of if statement.

else {} //End of if statement. 
?>

CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#9 07-30-2008 08:02:05

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: additional text BELOW category product listing - but only on 1st page

ok, i thought i could find out where to put the text but i can't. I can place it in the skin, but i'm trying to put it below the product thumbnails. In the 'manage catalog product display = category view, it would place the text below every single product, not after all products are displayed.  If it's in the skin, it's too far down at the bottom, i want it in the center column area just below the products.  couldn't find it either in the xhtml includes.

anyone know where to find this?

James...

Offline

 

#10 06-04-2009 08:47:36

sleeper
Member
Registered: 10-29-2004
Posts: 332

Re: additional text BELOW category product listing - but only on 1st page

Sorry to open an old thread, but is there a way to add a category/product reference to this hack for example If namespace is catshow and category reference = "refname"?

Or: if namespace=prodshow" and reference="product id"

Any help appreciated


- Steve


Specialists in ClickCartPro Design

Offline

 
  • Index
  •  » ClickCartPro 6
  •  » additional text BELOW category product listing - but only on 1st page

Board footer