Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Text-link changed to a image-link


Tommy28

Recommended Posts

Posted

Hi,

 

I just added a Add-to-favorite contri to my shop. I would like to change the text(add to favorite)you have to click to an image instead.

 

I tried to modifie the file and i have gotten the image i want but it has no effect now :P

 

The file looks like this:

blue text is what i changed.

 

<?php

/*

$Id: add_favourites.php, v 1.1

 

Original Script: Burt

Updated: Ryan Hobbs

Updated: Thomas Treder

Updated: Calvin K ([email protected])

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2001 osCommerce

 

Released under the GNU General Public License

*/

?>

 

<!-- Add Favorites //-->

<?php

$TITLE = TITLE;

$STORE_NAME = STORE_NAME;

 

if (strstr ($HTTP_USER_AGENT, "MSIE")) {

$self = "http://".$HTTP_HOST.$REQUEST_URI;

?>

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => BOX_INFORMATION_BOOKMARK

);

new infoBoxHeading($info_box_contents, true, false);

 

$rows = 0;

$info_box_contents = array();

 

if ($HTTP_GET_VARS['products_id']) {

$product_box_info = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'");

$product_box_info_values = tep_db_fetch_array($product_box_info);

$text = "<a href=\"javascript:window.external.AddFavorite('$self','$STORE_NAME - " . str_replace("'", "\'", $product_box_info_values["products_name"])."')\">".$product_box_info_values['products_name']."<br>".TEXT_BOOKMARK."</a>";

}

else {

$text = "<a href=\"javascript:window.external.AddFavorite('$self','$TITLE')\">".TEXT_BOOKMARK."</a>";

}

 

$info_box_contents[] = array('align' => 'center',

'text' => '<img src="mediafiles/images/favorite.jpg"></a>');

Normaly its just 'text' => $text);

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- Add Favourites_eof //-->

<?php

}

?>

Archived

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

×
×
  • Create New...