cutiesweetie Posted September 30, 2008 Share Posted September 30, 2008 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 More sharing options...
cutiesweetie Posted September 30, 2008 Author Share Posted September 30, 2008 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 More sharing options...
cutiesweetie Posted September 30, 2008 Author Share Posted September 30, 2008 Anyone pls??? hi all, really appreciate the helps, it really drive me mad........ Link to comment Share on other sites More sharing options...
oschellas Posted September 30, 2008 Share Posted September 30, 2008 echo '<a href="' . tep_href_link(FILENAME_NEW) . '">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</a>'; Note: FILENAME_NEW has to be defined in catalog/includes/filenames.php Link to comment Share on other sites More sharing options...
cutiesweetie Posted September 30, 2008 Author Share Posted September 30, 2008 echo '<a href="' . tep_href_link(FILENAME_NEW) . '">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</a>'; Note: FILENAME_NEW has to be defined in catalog/includes/filenames.php Link to comment Share on other sites More sharing options...
cutiesweetie Posted September 30, 2008 Author Share Posted September 30, 2008 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 More sharing options...
oschellas Posted September 30, 2008 Share Posted September 30, 2008 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 More sharing options...
cutiesweetie Posted September 30, 2008 Author Share Posted September 30, 2008 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 More sharing options...
oschellas Posted September 30, 2008 Share Posted September 30, 2008 /public_html/includes/languages/english/index.php as below. -correct in here the part of the define TEXT_MAIN as I posted before Question: where do i put my new.html? - /public_html/ Link to comment Share on other sites More sharing options...
cutiesweetie Posted October 1, 2008 Author Share Posted October 1, 2008 /public_html/includes/languages/english/index.php as below.-correct in here the part of the define TEXT_MAIN as I posted before Question: where do i put my new.html? - /public_html/ Hi oschellas, thanks! it works fine! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.