Zen Cart Logo
Forums / Basic Configuration / Adding images beside text in centered sidebox

Adding images beside text in centered sidebox

Locked

Views: 1,501

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
24 Jul 2009, 6:37 PM
#1
pointwise avatar

pointwise

New Zenner

Join Date:
Jun 2009
Posts:
8
Plugin Contributions:
0

Adding images beside text in centered sidebox

I want to add a "sale" image I have beside the title for the specials for July box. So basically I want the title to look like this:

<img src="sale" /> Monthly Specials for July <img src="sale" />.

Any way to add this in? Thanks guys

24 Jul 2009, 10:12 PM
#2
niccol avatar

niccol

Totally Zenned

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

Re: Adding images beside text in centered sidebox

You need to edit a php file.

Find: includes/modules/YOURTEMPLATE/specials_index.php

If this file does not exist you need to create it as an override. In includes/modules/ create a new folder with the name of your template. So, now you have includes/modules/YOURTEMPLATE/

Now find the file includes/modules/specials_index.php and copy it into /includes/modules/YOURTEMPLATE/

So, now you do have:

includes/modules/YOURTEMPLATE/specials_index.php

Now edit it as follows. Find the line:

  if ($specials_index->RecordCount() > 0) {
    $title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_SPECIALS_INDEX, strftime('%B')) . '</h2>';
    $zc_show_specials = true;

You need to put the html for your images in the following places:

  if ($specials_index->RecordCount() > 0) {
    $title = '<h2 class="centerBoxHeading">ImageHere' . sprintf(TABLE_HEADING_SPECIALS_INDEX, strftime('%B')) . 'ImageHere</h2>';
    $zc_show_specials = true;

The html code for the image will look something like:

<img src="../images/pixel_trans.gif" width="1" height="1" align="left" border="0">

but evidently different!

Nick
iszent.com

24 Jul 2009, 10:26 PM
#3
niccol avatar

niccol

Totally Zenned

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

Re: Adding images beside text in centered sidebox

Or do it the easy way!

Find includes/languages/YOURTEMPLATE/english.php

GO to about line 503 you'll see somthing like:

  define('TABLE_HEADING_SPECIALS_INDEX', 'Monthly Specials For %s');

Where it says 'Monthly Specials for %s' - you can add whatever you want inside the ' and the '.

So, you can put the html for the images in there.

Sorry to have found a confusing way of doing it first time around :smile:

Nick
iszent.com