Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / How to add text on all product page?

How to add text on all product page?

Started by hara on 6 Jul 2011, 6:17 PM · Views: 1,161

Results 1 to 5 of 5
6 Jul 2011, 6:17 PM
#1
hara avatar

hara

Zen Follower

Join Date:
Sep 2008
Posts:
397
Plugin Contributions:
0

How to add text on all product page?

Where can I add some text on APP PRODUCTS page? (above the Sort option menu).

I posted on other topic but I think better to post with new title here.

6 Jul 2011, 9:04 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: How to add text on all product page?

You will need to edit the template file that compiles the All Products listing, AND the Language file for the all_products defines.

includes/templates/template_default/templates/tpl_products_all_default.php

FIND

<?php
/**
 * Page Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_products_all_default.php 2603 2005-12-19 20:22:08Z wilt $
 */
?>
<div class="centerColumn" id="allProductsDefault">

<h1 id="allProductsDefaultHeading"><?php echo HEADING_TITLE; ?></h1>

<?php

ADD MY BIT IN, AS SEEN:-

<?php
/**
 * Page Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_products_all_default.php 2603 2005-12-19 20:22:08Z wilt $
 */
?>
<div class="centerColumn" id="allProductsDefault">

<h1 id="allProductsDefaultHeading"><?php echo HEADING_TITLE; ?></h1>

<div id="allProductsMessage"><?php echo TEXT_ALL_PRODUCTS_MESSAGE; ?></div>
<?php

SAVE THIS NEW EDITED FILE TO:
includes/templates/YOUR_CUSTOM_TEMPLATE/templates/

Now... the Language File

includes/languages/english/products_all.php

FIND:-

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004 The zen-cart developers                           |
// |                                                                      |   
// | http://www.zen-cart.com/index.php                                    |   
// |                                                                      |   
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: products_all.php 1969 2005-09-13 06:57:21Z drbyte $
//

define('NAVBAR_TITLE', 'All Products');
define('HEADING_TITLE', 'All Products');

define('TEXT_DATE_ADDED', 'Date Added:');
define('TEXT_MANUFACTURER', 'Manufacturer:');
define('TEXT_PRICE', 'Price:');

define('TEXT_PRODUCTS_MODEL','Model: ');
define('TEXT_PRODUCTS_WEIGHT','Weight: ');
define('TEXT_PRODUCTS_QUANTITY','In Stock: ');
define('TEXT_OUT_OF_STOCK','Out of Stock');
?>

ADD MY BIT IN, AS SEEN:-

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004 The zen-cart developers                           |
// |                                                                      |   
// | http://www.zen-cart.com/index.php                                    |   
// |                                                                      |   
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | [email protected] so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: products_all.php 1969 2005-09-13 06:57:21Z drbyte $
//

define('NAVBAR_TITLE', 'All Products');
define('HEADING_TITLE', 'All Products');

define('TEXT_DATE_ADDED', 'Date Added:');
define('TEXT_MANUFACTURER', 'Manufacturer:');
define('TEXT_PRICE', 'Price:');

define('TEXT_PRODUCTS_MODEL','Model: ');
define('TEXT_PRODUCTS_WEIGHT','Weight: ');
define('TEXT_PRODUCTS_QUANTITY','In Stock: ');
define('TEXT_OUT_OF_STOCK','Out of Stock');

define{'TEXT_ALL_PRODUCTS_MESSAGE','This is my special message that I would like to appear on All Products Listing Page');
?>

SAVE THIS NEW EDITED FILE TO:
includes/languages/english/YOUR_CUSTOM_TEMPLATE/

20 years a Zencart User

6 Jul 2011, 9:07 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: How to add text on all product page?

As we have built this inside a DIV with an ID...

div id="allProductsMessage"

... you can add STYLES to it in stylesheet.css

EG:
*
#allProductsMessage {
font-size: 12px;
text-decoration: underline;
color: #ff0000;
}*

20 years a Zencart User

7 Jul 2011, 12:47 AM
#4
hara avatar

hara

Zen Follower

Join Date:
Sep 2008
Posts:
397
Plugin Contributions:
0

Re: How to add text on all product page?

Thank you so much Schoolboy. It perfectly works.

7 Jul 2011, 8:42 AM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: How to add text on all product page?

It's a pleasure...

When you are rich and famous, think of me...:D

20 years a Zencart User