Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add sidebox in Product Listing Page

Add sidebox in Product Listing Page

Locked

Views: 574

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
27 Sep 2010, 5:55 PM
#1
fawad123 avatar

fawad123

New Zenner

Join Date:
Oct 2009
Posts:
93
Plugin Contributions:
0

Add sidebox in Product Listing Page

How can i add a sidebox in a product listing page?

28 Sep 2010, 6:13 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Add sidebox in Product Listing Page

Look at the numerous commented items in tpl_main_page.php
There are many examples that you can use or modify for pages you want

30 Sep 2010, 8:06 AM
#3
fawad123 avatar

fawad123

New Zenner

Join Date:
Oct 2009
Posts:
93
Plugin Contributions:
0

Re: Add sidebox in Product Listing Page

Yes you are right but if i add anything under "right column" it will appear on all pages. I want that only on product listing pages which has the following urls:

https://www.xxxxxxxxxx.com/index.php?main_page=index&cPath=11_200_201

Now how can i detect the product listing page in tpl_main_page.php ?

Like

If (Product_listing_Page) then
{
Show right column text
}

............

Please help me out.

30 Sep 2010, 12:09 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Add sidebox in Product Listing Page

An individual sidebox will not be controlled in tpl_main_page.php, but in its own module file
(/includes/modules/sideboxes/your_template/sidebox_name.php). You will see something like this near the top of the file:

$show_sidebox_name = true;
if ($show_sidebox_name == true;) {

For your example, you would do something like this:```php
if ($current_page_base == 'index' and $_GET['cPath'] == '11_200_201') {
$show_sidebox_name = true;
} else {
$show_sidebox_name = false;
}
if ($show_sidebox_name == true;) {