Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

If I go to add a contribution like a link no like a info box


capsulas

Recommended Posts

Hello !!!

A beginner question:

If I go to add a contribution like a link no like a info box, What I must change into the original PHP file?

 

I made this modification:

----------------------------------------------------------------------------------

1. Add this to catalog/boxes/information.php:

 

'<a href="' . tep_href_link(FILENAME_ADD_FAVOURITES, '', 'NONSSL') . '">' . BOX_INFORMATION_ADD_FAVOURITES . '</a><br>' .

 

2. Add this to catalog/includes/application_top.php:

 

define('FILENAME_ADD_FAVOUTIRES', 'add_favourites.php');

 

3. Add this to catalog/includes/languages/english.php

define('BOX_INFORMATION_ADD_FAVOURITES', 'Bookmark Us');

 

4. What change in the following file?

 

 

Original file

-------------------------------------------------------------------------------------

<?php

/*

$Id: add_favourites.php, v 1.0

 

Original Script: Burt

Updated: Ryan Hobbs

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2001 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- Add Favourites //-->

<?php

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, false, 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="java script:window.external.AddFavorite('$self','$HTTP_HOST Online Shop - " . str_replace("'", "'", $product_box_info_values["products_name"])."')">Bookmark ".$product_box_info_values['products_name']."</a>";

}

else {

$text = "<a href="java script:window.external.AddFavorite('$self','$HTTP_HOST Online Shop')">Bookmark Us</a>";

}

 

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

'text' => $text);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- Add Favourites_eof //-->

<?php

}

?>

 

 

------------------------------------------------------------------------

 

Thank for your help

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...