Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Remove "Currency, language, manufaturer"


zepp88

Recommended Posts

on my custom template which i bought from template monster, next to the main banner, is a box with different options..

3 of them : Change currency, change language, and choose manufacturer.. it's all dropdown menus.

 

i would like to remove these, and replace them with a newsmail and maybe a tell a friend option.

 

how do i do that ? What code do i have to change ?

 

ty in advance.

 

/Sebastian.

Link to comment
Share on other sites

Hey Sebastian dude,

 

I had a similar problem that might relate to this issue...

 

http://www.oscommerce.com/forums/index.php?showtopic=205639

 

Check out that link! I'm not sure if it's exactly what you're after but hopefully it steers you in the right direction.

 

Cheers,

Paul

 

ty for your help, allthough it did not work :/ i tried removing the code woth "currencies" and "language" completely, but they're still there.. maybe it is because i have a custom template :/

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
post your header.php or wherever the-stuff-you want to remove, is in so we can help you..

 

even a doctor cannot examine a patient without seeing him/her..

 

Well since he has given up...Ill take his role and paste my code. Thanks everyone :thumbsup:

 

<?php
/*
 $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

?>

<?php

// check if the 'install' directory exists, and warn of its existence
 if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
  $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
 }

// check if the configure.php file is writeable
 if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
  $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
 }

// check if the session folder is writeable
 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
  if (!is_dir(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
  } elseif (!is_writeable(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
  }
}
 }

// check session.auto_start is disabled
 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
  $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
 }

 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
  $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
 }

 if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
 }
?>


<table cellspacing=0 cellpadding=0 width=744 align=center bgcolor=#ffffff>
 <tr><td class=bg3 width=4></td>
   <td>

 <table cellspacing=0 cellpadding=0 width=724 align=center>
  <tr><td>
	<table cellspacing=0 cellpadding=0>
	 <tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/mXX01.gif width=207 height=88 border=0></a></td>
		 <td>
		  <table cellspacing=0 cellpadding=0>
		   <tr><td colspan=2>
				<table cellspacing=0 cellpadding=0>
				 <tr><td><img src=images/m02.gif width=1 height=62></td>
					 <td width=172>
					  <table cellspacing=0 cellpadding=0 width=134 align=center>
					   <tr><td height=15></td></tr>
					   <tr><td class=ch>Choose your language: </td></tr>
					   <tr><td height=5></td></tr>
					   <tr><td>

<? // LANGUAGES

 if (!isset($lng) || (isset($lng) && !is_object($lng))) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language;
 }

 $languages_string = '';
 reset($lng->catalog_languages);
 while (list($key, $value) = each($lng->catalog_languages)) {
$languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
 }

 echo $languages_string;

?>						   

					   </td></tr>
					   <tr><td height=8></td></tr>
					  </table>
					 </td>
					 <td><img src=images/m02.gif width=1 height=62></td>
					 <td width=167>
					  <table cellspacing=0 cellpadding=0 width=140 align=center>
					   <tr><td height=15></td></tr>
					   <tr><td class=ch>Currencies: </td></tr>
					   <tr><td height=5></td></tr>
					   <tr><td>   

<? // CURRENCIES

echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');

reset($currencies->currencies);
$currencies_array = array();
while (list($key, $value) = each($currencies->currencies)) {
  $currencies_array[] = array('id' => $key, 'text' => $value['title']);
}

$hidden_get_variables = '';
reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
  if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
	$hidden_get_variables .= tep_draw_hidden_field($key, $value);
  }
}

echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="font-size:10px; width:140px; border-style: solid; border-width: 1px; border-color: #000000;" ') . $hidden_get_variables . tep_hide_session_id();
echo '</form>';

?>			   

					   </td></tr>
					   <tr><td height=8></td></tr>
					  </table>
					 </td>						 
					 <td><img src=images/m02.gif width=1 height=62></td>
					 <td width=175>
					  <table cellspacing=0 cellpadding=0 width=128 align=center>
					   <tr><td height=15></td></tr>
					   <tr><td class=ch><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m03.gif width=15 height=17 border=0 align=absmiddle></a>  Shopping cart: </td></tr>
					   <tr><td height=5></td></tr>
					   <tr><td>now in your cart <a href=<?=tep_href_link('shopping_cart.php')?> class=ml><?=$cart->count_contents()?> items</a></td></tr>
					   <tr><td height=8></td></tr>
					  </table>
				 </td></tr>																		   
				</table>
		   </td></tr>
		   <tr><td width=23 bgcolor=#E5E5E5></td><td>
		   <table cellspacing=0 cellpadding=0><tr>
			 <td background=images/m04.gif width=79 height=22><a class=tmenu href=<?=tep_href_link('specials.php')?>>Specials</a></td>
			 <td background=images/m05.gif width=95 height=22><a class=tmenu href=<?=tep_href_link('advanced_search.php')?>>Site Search</a></td>
			 <td background=images/m06.gif width=92 height=22><a class=tmenu href=<?=tep_href_link('contact_us.php')?>>Contact Us</a></td>
			 <td background=images/m07.gif width=126 height=22><a class=tmenu href=<?=tep_href_link('create_account.php')?>>Create an account</a></td>
			 <td background=images/m08.gif width=102 height=22><a class=tmenu href=<?=tep_href_link('login.php')?>>Customer Login</a></td>
		   </tr></table>
		   </td></tr>			  
		   <tr><td colspan=2 height=1></td></tr>
		   <tr><td colspan=2 height=3 bgcolor=#E5E5E5></td></tr>
		  </table>
	 </td></tr>
	</table>
	<table cellspacing=0 cellpadding=0>
	 <tr><td width=201 valign=top bgcolor=#E9E9E9>
		  <table cellspacing=0 cellpadding=0 bgcolor=#ffffff>
		   <tr><td height=30></td></tr>
		   <tr><td><img src=images/m18.gif width=201 height=20></td></tr>
		   <tr><td height=5></td></tr>


<?   // ---- CATEGORIES

 function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array;

  if(!$tree[$counter]['level']){				

$categories_string .= $categories_string ? '<tr><td><img src=images/m13.gif width=201 height=1></td></tr> <tr><td height=2></td></tr>' : '';			 

$categories_string .= '<tr><td>      <img src=images/m12.gif width=7 height=5 align=absmiddle>   <a class=ml1 href=';

if ($tree[$counter]['parent'] == 0) {
  $cPath_new = 'cPath=' . $counter;
} else {
  $cPath_new = 'cPath=' . $tree[$counter]['path'];
}
$categories_string .= tep_href_link('index.php', $cPath_new) . '>';
// display categry name
$categories_string .= $tree[$counter]['name'];
$categories_string .= '</a></td></tr><tr><td height=2></td></tr>';
  }else{
$categories_string .= '<tr><td>      ';

for($i=0;$i<$tree[$counter]['level'];$i++)
 $categories_string .= '   ';

$categories_string .= ' - <a class=ml1 href=';   
if ($tree[$counter]['parent'] == 0) {
  $cPath_new = 'cPath=' . $counter;
} else {
  $cPath_new = 'cPath=' . $tree[$counter]['path'];
}
$categories_string .= tep_href_link('index.php', $cPath_new) . '>';
// display category name
$categories_string .= $tree[$counter]['name'];
$categories_string .= '</a></td></tr><tr><td height=2></td></tr>';
  }  

if ($tree[$counter]['next_id'] != false) {
  tep_show_category($tree[$counter]['next_id']);
}  
 }



 define(TABLE_CATEGORIES, "categories");
 define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");
 $categories_string = '';
 $tree = array();

 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
 while ($categories = tep_db_fetch_array($categories_query))  {
$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
											'parent' => $categories['parent_id'],
											'level' => 0,
											'path' => $categories['categories_id'],
											'next_id' => false);

if (isset($parent_id)) {
  $tree[$parent_id]['next_id'] = $categories['categories_id'];
}

$parent_id = $categories['categories_id'];

if (!isset($first_element)) {
  $first_element = $categories['categories_id'];
}
 }

 //------------------------
 if ($cPath) {
$new_path = '';
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
  unset($parent_id);
  unset($first_id);
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
  if (tep_db_num_rows($categories_query)) {
	$new_path .= $value;
	while ($row = tep_db_fetch_array($categories_query)) {
	  $tree[$row['categories_id']] = array('name' => $row['categories_name'],
										   'parent' => $row['parent_id'],
										   'level' => $key+1,
										   'path' => $new_path . '_' . $row['categories_id'],
										   'next_id' => false);

	  if (isset($parent_id)) {
		$tree[$parent_id]['next_id'] = $row['categories_id'];
	  }

	  $parent_id = $row['categories_id'];

	  if (!isset($first_id)) {
		$first_id = $row['categories_id'];
	  }

	  $last_id = $row['categories_id'];
	}
	$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
	$tree[$value]['next_id'] = $first_id;
	$new_path .= '_';
  } else {
	break;
  }
}
 }
 $categories_string .=  '';
 tep_show_category($first_element); 
 $categories_string .=  '';

 echo $categories_string;
?>

		   <tr><td><img src=images/m13.gif width=201 height=1></td></tr>
		   <tr><td height=6></td></tr>			  
		  </table>

		  <table cellspacing=0 cellpadding=0 bgcolor=#ffffff>			   
		   <tr><td><img src=images/m19.gif width=201 height=20></td></tr>
		   <tr><td height=5></td></tr>


<?   // ---- MANUFACTURERS STRING OUTPUT


 $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
 if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {

  $manufacturers_array = array();
  while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
	$output .= $output ? '<tr><td><img src=images/m13.gif width=201 height=1></td></tr><tr><td height=2></td></tr>' : '';			 
	$output .= '<tr><td>      <img src=images/m14.gif width=7 height=5 align=absmiddle>   <a class=ml1 href=';
	$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
	$output .= tep_href_link('index.php', 'manufacturers_id='.$manufacturers['manufacturers_id']). '>'.$manufacturers_name;
	$output .= '</a></td></tr><tr><td height=2></td></tr>';
  }

echo $output;
 }

?>

		   <tr><td height=15></td></tr>
		  </table>

		  <table cellspacing=0 cellpadding=0>
		   <tr><td><img src=images/m15.gif width=201 height=41></td></tr>
		   <tr><td bgcolor=#E9E9E9>

<? // SEARCH ?>

		  <table cellspacing=0 cellpadding=0 width=187 align=center  bgcolor=#ffffff>
		  <?=tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')?>
		   <tr><td height=16 bgcolor=#AC2236 class=ch colspan=2>   <font color=#ffffff>Enter keyword:</font></td></tr>
		   <tr><td height=8 colspan=2></td></tr>
		   <tr><td align=center><?=tep_draw_input_field('keywords', '', 'size="20" maxlength="30" class=go') . ' ' . tep_hide_session_id()?>  </td>
			   <td><input type=image src=images/m17.gif width=27 height=18></td></tr>
		   <tr><td height=10 colspan=2></td></tr>
		  </form>
		  </table>

<? // END SEARCH ?>



				<table cellspacing=0 cellpadding=0>
				 <tr><td height=10></td></tr>
				</table>					
		   </td></tr>
		  </table>
		 </td>
		 <td width=6></td>
		 <td width=517 valign=top>
		  <table cellspacing=0 cellpadding=0>
		   <tr><td><img src=images/m width=517 height=181></td>
			   <td background=>
				<table cellspacing=0 cellpadding=0>
				 <tr><td height=158 colspan=0></td></tr>
				 <tr><td width=47></td><td><a href=<?=tep_href_link('index.php','cPath=62')?> class=ml2></a></td></tr>
				 <tr><td colspan=2 height=10></td></tr>
				</table>
		   </td></tr>
		  </table>
		  <table cellspacing=0 cellpadding=0>
		   <tr><td height=1></td></tr>
		   <tr><td height=27 width=517 bgcolor=#6780B8>
				<table cellspacing=0 cellpadding=0>
				 <tr><td height=9></td></tr>
				 <tr><td width=30></td><td width=48><a class=ml3 href=<?=tep_href_link('index.php')?>>Home</a></td><td><img src=images/m23.gif width=3 height=8 vspace=3></td><td width=111 align=center><a href=<?=tep_href_link('products_new.php')?> class=ml3>New Products</a></td><td><img src=images/m23.gif width=3 height=8 vspace=3></td><td width=101 align=center><a href=<?=tep_href_link('account.php')?> class=ml3>My Account</a></td><td><img src=images/m23.gif width=3 height=8 vspace=3></td><td width=115 align=center><a href=<?=tep_href_link('shopping_cart.php')?> class=ml3>Shopping Cart </a></td><td><img src=images/m23.gif width=3 height=8 vspace=3></td><td width=97 align=center><a href=<?=tep_href_link('checkout_shipping.php')?> class=ml3>Checkout</a></td></tr>
				 <tr><td height=9></td></tr>
				</table>
		   </td></tr>
		   <tr><td height=5></td></tr>
		  </table>   
		  <table cellspacing=0 cellpadding=0>
		   <tr><td background=images/m24.gif width=1></td>
			   <td width=4></td>
			   <td width=512>

 

Thanks,

Tim

Link to comment
Share on other sites

The documentation covers how to add and remove and even create new boxes/pages.

 

http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/66

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

The documentation covers how to add and remove and even create new boxes/pages.

 

http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/66

 

Hello there geoffreywalton. I have done this already looking through the threads....and this is colum_right with the code below:

if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
include(DIR_WS_BOXES . 'languages.php');
include(DIR_WS_BOXES . 'currencies.php');
 }

 

My header.php has currencies and languages hard coded in it I believe :) If you dont mind would you please review this for me?

 

Thanks,

Tim

Link to comment
Share on other sites

Hello there geoffreywalton. I have done this already looking through the threads....and this is colum_right with the code below:

if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
include(DIR_WS_BOXES . 'languages.php');
include(DIR_WS_BOXES . 'currencies.php');
 }

 

My header.php has currencies and languages hard coded in it I believe :) If you dont mind would you please review this for me?

 

Thanks,

Tim

 

Hello Hello..its almost new years :lol: lets try to have some fun with this coding

 

Thanks,

Tim

Link to comment
Share on other sites

Hello Hello..its almost new years :lol: lets try to have some fun with this coding

 

Thanks,

Tim

Hi Tim

Why are we not having fun instead of coding! :lol:

 

I have this in my column_right.php

  if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
//   include(DIR_WS_BOXES . 'languages.php');
//   include(DIR_WS_BOXES . 'currencies.php');
 }

& the boxes disappear!

 

Julie

Link to comment
Share on other sites

Hi Tim

Why are we not having fun instead of coding! :lol:

 

I have this in my column_right.php

  if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
//   include(DIR_WS_BOXES . 'languages.php');
//   include(DIR_WS_BOXES . 'currencies.php');
 }

& the boxes disappear!

 

Julie

 

LOL...good question. Well maybe coding makes us joly :D

 

Yea I believe this to be true for the regular default oscommerce. However I have a template and as I can see by scanning my header.php above it is hardcoded in the code I think. And Im not a php programmer in any way....

 

santa has not given me those skills this year :blush:

 

Again, any help would be greatly appreciated.

 

Thanks,

Tim

Link to comment
Share on other sites

LOL...good question. Well maybe coding makes us joly :D

 

Yea I believe this to be true for the regular default oscommerce. However I have a template and as I can see by scanning my header.php above it is hardcoded in the code I think. And Im not a php programmer in any way....

 

santa has not given me those skills this year :blush:

 

Again, any help would be greatly appreciated.

 

Thanks,

Tim

Sorry :blush: Me neither

 

Good luck & Happy New Year

Link to comment
Share on other sites

Sorry :blush: Me neither

 

Good luck & Happy New Year

 

its alright man. Thanks for your time. The gift from santa may not come from me or you...but from the other generous people in this forum :) Thanks everyone for viewing and continuing to respond/support this topic.

 

Thanks,

Tim

Link to comment
Share on other sites

its alright man. Thanks for your time. The gift from santa may not come from me or you...but from the other generous people in this forum :) Thanks everyone for viewing and continuing to respond/support this topic.

 

Thanks,

Tim

 

Its new Years! Happy new year everyone :)

 

Regards,

Tim

Link to comment
Share on other sites

echo $languages_string; to

//echo $languages_string;

 

for languages.

 

Just chek similar for currencies.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...