Jump to content
Latest News: (loading..)

Search the Community

Showing results for tags 'automatic'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News and Announcements
    • News and Announcements
    • Partner Announcements
    • Ambassadors
  • Commercial Support
    • Developer Feedback
  • osCommerce Online Merchant v2.x
    • General Support
    • Installation and Configuration
    • Upgrading from Earlier Versions (v2.x to v2.x)
    • Add-Ons
    • Tips and Tricks
    • Security
  • Development
    • osCommerce Online Merchant v2.4
    • osCommerce Online Merchant Community Bootstrap Edition
    • osCommerce Online Merchant v3.x
    • Development Proposals
  • General
    • OSCOMMERCE.TV
    • Next Steps / Optimizations / Marketing
    • Live Shop Reviews
    • E-Commerce Laws
    • General Discussions
    • PHP / SQL / Web Design
  • oscBooks and oscTemplates's Announcements
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein
  • German Community's OSCOM v3.x

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Real Name


Location


Interests


Website


Skype

Found 3 results

  1. This add-on will show a state drop down menu in "create account", address_book" and "checkout_new_address". - When the customer first views the Create Account or Add Address Book Entry form, a default country is pre-selected - If the default country has zones (states, provinces, etc.), a drop-down list for the zones is automatically displayed; if no zones are in the database, a normal text input field is shown instead - If the customer changes the country, the form refreshes and the state field is updated according to the new country; any entries in other fields are preserved. BS version only. ---------------------------------- Country State BS v3.0 - milerwan Adding/editing some codes into states.php file to fix automatic display of entry_state field if not null Javascript changes into catalog/includes/modules/ht_country_state_jquery.php file : - Automatic display of entry_state field if not null - Refresh logo alignment - Removal complementary text which is useless Language files updated next to the additional text removal Add french language for form And always no core change ! NB: We are never better served than by ourselves ;) ---------------------------------- Official thread here. Link to the app : https://apps.oscommerce.com/UT1CL&country-state-selector-bs
  2. OSC Module : Country State Selector BS (https://apps.oscommerce.com/UT1CL&country-state-selector-bs) Hi, I have updated my Country State BS module yesterday with the latest version to fix the issue with vanished State when editing an address. This works when Country has got registred list of States (tep_draw_pull_down_menu) but don't work if there is no listing (tep_draw_input_field). When I compare states.php and address_book_details.php, I see that a portion of code is missing to activate this genuine script : In states.php file : if ($entry_state_has_zones == true) { $zones_array = array(); $zones_array[0] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); $zones_query = tep_db_query("select zone_name from zones where zone_country_id = '" . (int)$country_id . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array, $state_name, 'id="inputState" aria-required="true"'); echo FORM_REQUIRED_INPUT; } else { echo tep_draw_input_field('state', NULL, 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); echo FORM_REQUIRED_INPUT; } In address_book_details.php file : if ($process == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array, 0, 'id="inputState" aria-describedby="atState"'); if (tep_not_null(ENTRY_STATE_TEXT)) echo '<span id="atState" class="help-block">' . ENTRY_STATE_TEXT . '</span>'; } else { echo tep_draw_input_field('state', NULL, 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); } } else { echo tep_draw_input_field('state', (isset($entry['entry_country_id']) ? tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']) : ''), 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); } This sentence is missing : if ($process == true) { ... } else { echo tep_draw_input_field('state', (isset($entry['entry_country_id']) ? tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']) : ''), 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); } I have tried to add it on the state.php in many ways but with no result. :( The problem is when you have an existing address with already State registred as text field, this one don't appear when you edit the address. The field "entry_state" is not called by the script. To test this you must choose a Country without state listing registred (entry_zone_id = 0). Here is a screenshot from mysql to see the difference between Country ID + State ID dropdown registry (entry_country_id + entry_zone_id) then Country ID + State text registry (entry_country_id + entry_state). Anyone could help me to fix this module ?!? Best regards.
  3. I am trying to find an auto update exchange rate module to help keep our prices updated to our international customers. We purchase some of our products from the UK also so trying to figure out if we need to have a way of putting UK Prices on those specific products or whether or not we can put the exchange rate price at the time of entry. The current module that I am looking at is called Auto Update Currency Exchange Rate code and installation process below. Hi All I've modified this contribution to do the following: - Integrate with the native Currency functionality of OSC (ie when you go to Admin->Localization->Currencies) it will update the currencies using the European Central bank rates - Because it integrates with the native Currencies functionality, it will work with as many Currencies as you want. Just use the OSC's Localization->Currency functionality to add and manage currencies. - Will work with all stores, regardless of what the Default Currency is (ie the store default currency doesn't have to be EUR or GBP). It will auto detected the store's native currency and calculate the exchange rates correctly. - Will work with all currencies provided by EC Bank (EUR, GBP, USD, CAD, HKD, and many more ....; it won't work with currencies not listed by the EC Bank). INSTALLATION INSTRUCTIONS: Step 1) Edit /admin/includes/functions/localization.php At the end of the document, paste the following code (before the "?>" line): function quote_ECBank_currency($to) { # Read currency exchanges rates $xmlcontents = file("http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml"); # $xld may be used in your output to inform you user or admin # Extract exchange rates foreach ($xmlcontents as $line) { ereg("currency='([[:alpha:]]+)'",$line,$gota); if (ereg("rate='([[:graph:]]+)'",$line,$gotb)) { $exchrate[$gota[1]] = $gotb[1]; } } $exchrate['EUR'] = 1; /* manually add 1 EUR = 1 EUR to the array (all Exch.Rates are from EUR to X because we're getting them from ECB*/ if (!array_key_exists(DEFAULT_CURRENCY, $exchrate)) { return false; /* the Store Default currency must be present in the list because these exchange rates are based in 1EUR=xx Therefore we need to calculate the rate from EUR to the Default currency and then from the Default currency to the destination currency */ } if (!array_key_exists($to, $exchrate)) { return false; } $DefaultCurr_to_EUR_Rate = round(1 / $exchrate[DEFAULT_CURRENCY], 8); $DefaultCurr_to_DestCurr = round($DefaultCurr_to_EUR_Rate * $exchrate[$to], 8); if (is_numeric($DefaultCurr_to_DestCurr) && $DefaultCurr_to_DestCurr > 0) { /* make sure we got a valid number */ return $DefaultCurr_to_DestCurr; } else { return false; } } Save the file. Step 2: Edit admin/includes/application_top.php Find the line that starts with "define('CURRENCY_SERVER_PRIMARY', " and replace the whole line with: define('CURRENCY_SERVER_PRIMARY', 'ECBank'); Save the file. All done. TESTING THE INSTALLATION: Now go to the Admin section, select Localization and then Currencies. Click Update. You should see a message saying that all currencies were successfully updated via ECBank. If you see an error about updating via ECBank, see the troubleshooting bellow: TROUBLESHOOTING: 1) If you see an error when testing it may be caused by 2 things: A) Your server is not being able to fetch the file from the EC bank. B) There's a poorly written sanity check in the file admin/currencies.php that may cause these issues. To fix case B) do this: Edit admin/currencies.php Find the line that says "if (tep_not_null($rate)) {" and replace the whole line with: if (is_numeric($rate) && $rate > 0) { Save the file and test again. 2) You may also want to adjust your Exchange Rate BACKUP server (in case the updating via the primary server - ECBank - fails). In admin/includes/application_top.php Find the line that looks like "define('CURRENCY_SERVER_BACKUP', 'XXXX');" replace 'XXXX' with 'oanda' or 'xe' depending on which server you want to use as backup server. I hope you find the contribution useful. :) As always, BACKUP ALL FILES before modifying them. Contributions used at your own risk. ( I will not be responsible for any direct or indirect damage or loss derived of using this contribution. ) Regards Pedro We use osCommerce Online Merchant v2.3.3 with OzPost MultiQuote and Paypal Website Payments Standard. Hope someone can help with this and you understand my questions. All help appreciated.
×