peteravu Posted December 9, 2004 Posted December 9, 2004 I can't find out how I manual select what currencies I like to show in the dropdown menu in catalog\includes\boxes\currencies I like to hide the default currency (but still use it as the basic for the selling price). Do I have to change the $key to USD, AUD or 4, 7 (id) ??? With other words I like to keep the default currency but hide it in the shop. <?php /* $Id: currencies.php,v 1.16 2003/02/12 20:27:31 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if (isset($currencies) && is_object($currencies)) { ?> <!-- currencies //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_CURRENCIES); new infoBoxHeading($info_box_contents, false, false); 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); } } $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'), 'align' => 'center', 'text' => tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id()); new infoBox($info_box_contents); ?> </td> </tr> <!-- currencies_eof //--> <?php } ?> Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 10, 2004 Author Posted December 10, 2004 any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 10, 2004 Author Posted December 10, 2004 any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 10, 2004 Author Posted December 10, 2004 Or maybe add new field in the currencies table in the database, and ?0? for off and ?1? for on, but where and hvow to change the code? Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 11, 2004 Author Posted December 11, 2004 It must be possible to do something like this http://www.oscommerce.com/forums/index.php?showtopic=125269 If there are a lot of products, and as you say, you may want to keep them in the database, you can simply add a column to the manufacturers table, something like: disable_manufacturer boolean default value of zero 1. Set the value of the column to '1' for the said manufacturer. 2. Then when the manufacturers dropdown is done, check for the flag, just something like, a bit of pseudo code. --------------------------------- if (!disable_manufacturer) { include manufacturer in the dropdown list } --------------------------------- 3. Then when displaying products, much the same code to be inserted. I personally don't like "if not' statements, much cleaner like this ............. ---------------------------- if (disable_manufacturer) { } else { include product } ----------------------------- I add a column in the currencies table called disable_currency But where and how to write the code? Just need to get it out of the dropdown list. Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
boxtel Posted December 11, 2004 Posted December 11, 2004 It must be possible to do something like this http://www.oscommerce.com/forums/index.php?showtopic=125269 I add a column in the currencies table called disable_currency But where and how to write the code? Just need to get it out of the dropdown list. <{POST_SNAPBACK}> I use this in my header: basically it displays all languages (flags) in my header except the active one. Treasurer MFC
boxtel Posted December 11, 2004 Posted December 11, 2004 I use this in my header: basically it displays all languages (flags) in my header except the active one. <{POST_SNAPBACK}> forgot this : <?php if (!isset($lng) || (isset($lng) && !is_object($lng))) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language; } if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { $languages_string = ' | '; reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { if ($language != $value['directory'] ){ $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 . ' '; } else { echo ' '; } ?> Treasurer MFC
peteravu Posted December 11, 2004 Author Posted December 11, 2004 Maybe something like this but it don?t work $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') && ($key != " where currencies_disable_currency = '1') ) { $hidden_get_variables .= tep_draw_hidden_field($key, $value); } } Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 11, 2004 Author Posted December 11, 2004 forgot this : <?php if (!isset($lng) || (isset($lng) && !is_object($lng))) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language; } if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { $languages_string = ' | '; reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { if ($language != $value['directory'] ){ $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 . ' '; } else { echo ' '; } ?> <{POST_SNAPBACK}> I don't understand how to use the code in the currency drop down? Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 12, 2004 Author Posted December 12, 2004 any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 12, 2004 Author Posted December 12, 2004 any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 13, 2004 Author Posted December 13, 2004 any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 13, 2004 Author Posted December 13, 2004 any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 14, 2004 Author Posted December 14, 2004 any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 15, 2004 Author Posted December 15, 2004 any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 16, 2004 Author Posted December 16, 2004 any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 18, 2004 Author Posted December 18, 2004 I really hope somebody can help, it most be something like select ?USD, AUD? instead of currencies. But how to do??? Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 18, 2004 Author Posted December 18, 2004 Now I only have this little problem left. Any help would be much appreciated! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
peteravu Posted December 20, 2004 Author Posted December 20, 2004 I still think this is a way to go, but how to do? It must be possible to do something like this http://www.oscommerce.com/forums/index.php?showtopic=125269 I add a column in the currencies table called disable_currency But where and how to write the code? Just need to get it out of the dropdown list. Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
boxtel Posted December 20, 2004 Posted December 20, 2004 I still think this is a way to go, but how to do? <{POST_SNAPBACK}> go to the currencies box: this code : $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } try something like: $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { if ($key != 'USD') { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } } give it a try. never grasped why you would want to do this in the first place. Treasurer MFC
peteravu Posted December 20, 2004 Author Posted December 20, 2004 Thanks boxtel you are just wonderful, that was just what I was looking fore. Thank you so much!!! Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
Recommended Posts
Archived
This topic is now archived and is closed to further replies.