Forums / General Questions / Add text area for Featured Products on home page

Add text area for Featured Products on home page

Views: 1,490

Results 1 to 5 of 5
14 Mar 2012, 1:56 PM
#1
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Add text area for Featured Products on home page

I am working on https://www.cksperformance.com. On the home page, we have Featured products. What I would like to do is add a text area between the heading Featured Products and the actual products. The type of featured products will change every month and the customer would like to write a bit more info for his customers.

Any help is greatly appreciated! :wacko:

14 Mar 2012, 4:39 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Add text area for Featured Products on home page

3 ways to do it is to customize the tpl_modules_featured_products.php in your templates and overrides and use one the the 3 methods in RED:

<?php if ($zc_show_featured == true) { ?>
<div>My unique text is here</div>
<div><?php echo FEATURED_PRODUCTS_CUSTOM_TEXT; ?></div>
<div><?php
  $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_FEATURED_PRODUCTS_CUSTOM, 'false');
  require($define_page); ?>
</div>
<div class="centerBoxWrapper" id="featuredProducts">

The first one, just keep changing this file when needed with the text wanted ...

The second method add a define to something like:
/includes/languages/english/extra_definitions/my_extra_defines.php

by placing this in the file:

<?php
define('FEATURED_PRODUCTS_CUSTOM_TEXT', 'This is my custom featured text');

Or the third method, make a define for the define file:
/includes/extra_datafiles/my_extra_filenames.php

<?php
define('FILENAME_DEFINE_FEATURED_PRODUCTS_CUSTOM', 'define_featured_products_custom');

and make a blank file:
/includes/languages/english/html_includes/define_featured_products_custom.php

/includes/languages/english/html_includes/your_template_dir/define_featured_products_custom.php

and set that to 777 and you can edit it in the Admin in the Tools ... Define Page Editor ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 Mar 2012, 4:52 PM
#3
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Add text area for Featured Products on home page

You are simply the best!!!!!! :clap: All done, the text will now show on my home page! Thank you very much!

14 Mar 2012, 5:21 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Add text area for Featured Products on home page

You are most welcome ... thanks for the update that this worked for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Oct 2013, 10:31 PM
#5
mutinyzoo avatar

mutinyzoo

New Zenner

Join Date:
Mar 2011
Location:
Pensacola, FL
Posts:
88
Plugin Contributions:
2

Re: Add text area for Featured Products on home page

Using method 3 above, I encountered a problem where the copy in define_featured_products_custom.php was replacing the copy in all of the other pages (about us, privacy, shippinginfo, etc). changing the function (variable?) name from $define_page to $define_my_page did the trick.