Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add an URL/link to the image at front page


cutiesweetie

Recommended Posts

Hi all experts,

 

i added a E-voucher image (filename is 1.gif) to the main page of the site. (please go to www.ywaste.net and you can see the E-voucher image) and i am thinking to add a link to this 1.gif. So whenever the people click on 1.gif. it will brings me to another page.

 

How do i add the link to the 1.gif? anyone can advice. I am not good in this. I have tried several times but it does not create a link for me.

 

below is the code for 1.gif

 

<?php

/*

$Id: $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', '<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="center">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b></b><span class="messageStackError"></span></td></tr><td class="main" valign="center">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td> <td class="main" valign="top"><b></b><nobr class="messageStackSuccess"></nobr><nobr class="messageStackSuccess"></nobr> <nobr class="messageStackSuccess"></nobr> <br><br><br><br><nobr><span class="messageStackSuccess"></span></nobr><br><br><br><br><nobr> </nobr><br><br></td></tr><tr><td class="main" valign="top"></a></td></tr></table><br>');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', '7 days money back guarantee if not genuine');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

Link to comment
Share on other sites

Hi all experts,

 

i added a E-voucher image (filename is 1.gif) to the main page of the site. (please go to www.ywaste.net and you can see the E-voucher image) and i am thinking to add a link to this 1.gif. So whenever the people click on 1.gif. it will brings me to another page.

 

How do i add the link to the 1.gif? anyone can advice. I am not good in this. I have tried several times but it does not create a link for me.

 

below is the code for 1.gif

 

<?php

/*

$Id: $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', '<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="center">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b></b><span class="messageStackError"></span></td></tr><td class="main" valign="center">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td> <td class="main" valign="top"><b></b><nobr class="messageStackSuccess"></nobr><nobr class="messageStackSuccess"></nobr> <nobr class="messageStackSuccess"></nobr> <br><br><br><br><nobr><span class="messageStackSuccess"></span></nobr><br><br><br><br><nobr> </nobr><br><br></td></tr><tr><td class="main" valign="top"></a></td></tr></table><br>');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', '7 days money back guarantee if not genuine');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

 

Anyone pls???

Link to comment
Share on other sites

Hi

I have amended

 

1. /public_html/includes/languages/english/index.php as below.

2. /public_html/includes/filename.php

3. Question: where do i put my new.html?

 

 

Filenames.php

define('FILENAME_NEW', 'new.html');

 

Index.php

<?php

/*

$Id: $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', '<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="center">'

echo '<a href="' . tep_href_link(FILENAME_NEW) . '">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</a>'; '<a href="Advertise1.htm"></td><td class="main" valign="top"><b></b><span class="messageStackError"></span></td></tr><td class="main" valign="center">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td> <td class="main" valign="top"><b></b><nobr class="messageStackSuccess"></nobr><nobr class="messageStackSuccess"></nobr> <nobr class="messageStackSuccess"></nobr> <br><br><br><br><nobr><span class="messageStackSuccess"></span></nobr><br><br><br><br><nobr> </nobr><br><br></td></tr><tr><td class="main" valign="top"></a></td></tr></table><br>');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', '7 days money back guarantee if not genuine');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

Link to comment
Share on other sites

In the catalog directory (in your situation, your webroot), correct the define TEXT_MAIN as below:

 

define('TEXT_MAIN', '<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="center"><a href="' . tep_href_link(FILENAME_NEW) . '">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</a></td><td class="main" valign="top"><b></b><span class="messageStackError"></span></td></tr><td class="main" valign="center">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td> <td class="main" valign="top"><b></b><nobr class="messageStackSuccess"></nobr><nobr class="messageStackSuccess"></nobr> <nobr class="messageStackSuccess"></nobr> <br><br><br><br><nobr><span class="messageStackSuccess"></span></nobr><br><br><br><br><nobr> </nobr><br><br></td></tr><tr><td class="main" valign="top"></td></tr></table><br>');

Link to comment
Share on other sites

Hi,

 

where can i find this file?? sorry, i am not good in this.

and where i need to upload my new.html?

 

 

 

 

In the catalog directory (in your situation, your webroot), correct the define TEXT_MAIN as below:

 

define('TEXT_MAIN', '<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="center"><a href="' . tep_href_link(FILENAME_NEW) . '">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</a></td><td class="main" valign="top"><b></b><span class="messageStackError"></span></td></tr><td class="main" valign="center">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td> <td class="main" valign="top"><b></b><nobr class="messageStackSuccess"></nobr><nobr class="messageStackSuccess"></nobr> <nobr class="messageStackSuccess"></nobr> <br><br><br><br><nobr><span class="messageStackSuccess"></span></nobr><br><br><br><br><nobr> </nobr><br><br></td></tr><tr><td class="main" valign="top"></td></tr></table><br>');

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...