Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bob Terveuren

Members
  • Posts

    496
  • Joined

  • Last visited

  • Days Won

    15

Bob Terveuren last won the day on January 17 2016

Bob Terveuren had the most liked content!

1 Follower

Profile Information

  • Real Name
    Bob Terveuren
  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Bob Terveuren's Achievements

  1. Hi - OK had that rethink - this one can be tricky to setup and you can often end up with the situation you are seeing if there's a glitch in the admin. When it cannot correctly calculate a value it should display: Postcode Shipping No delivery/shipping available to the selected Postcode. But if you have not set the weights correctly then you can get: Postcode Shipping The delivery/shipping fee cannot be determined at this time $0.00 The trick is to set a big final weight in each zone - something like 10000:10000 - e.g. 4:7,10:10,99:13.50, 10000:10000 If that still does not fix it then here's a code hack that will disable the module if it sees a zero value returned // class constructor function zipship() { global $order; $this->code = 'zipship'; $this->title = MODULE_SHIPPING_ZIPSHIP_TEXT_TITLE; $this->description = MODULE_SHIPPING_ZIPSHIP_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_ZIPSHIP_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_ZIPSHIP_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_ZIPSHIP_STATUS == 'True') ? true : false); // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED!!! $this->num_zones = 6; if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_ZIPSHIP_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_ZIPSHIP_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } // check for a zero shipping price if ($this->quote()['methods'][0]['cost'] <= 0){ $this->enabled = false; } } // class methods
  2. nope - having a rethink........
  3. Hi - just dropped by and spotted this - thanks for the kind words from people - few disparate thoughts on PayPal follow...... I'm in the middle of coding up a module for a non-oSC cart (that is also PHP/MySQL) trying to use the PayPal REST APi. Two weeks ago I fell over an undocumented problem with that APi and, so far, PayPal have maintained a resolute silence to my requests for advice. (I really suspect that they no longer have anybody in support who knows how their legacy stuff works [legacy means more than three years old???]). In addition I found that they will return a response of 'Completed' even if the payment method is an eCheck (unusual here in the UK but for a US merchant that eCheck should clear before despatch). I've also found a great difference between the Sandbox and Live versions of PayPal - so much so that it entails testing in both taking twice the time and effort to do so (and also ballsing up personal PayPal accounts in the process). I'm currently trying to decide if I should just cut my losses and drop out of the contract - it is that bad trying to work with them. Bluntly? My advice would be to have a good, hard look at why you want to use PayPal. Buy an SSL and use Stripe (certainly if you are USD/UK/CAN/AUD) - they will 'sit' on your money for seven days but do not come with the baggage of PayPal. If not then find a payments processor that provides their own code and supports it! Finally - the 'new' oSC PayPal App was probably written with due regard to the published/documented PayPal info by HPDL and his team - I have learned recently that the documentation is, frankly? Pish (as they say where I grew up). As a payments developer, PayPal customer and PayPal merchant (albeit UK based)? PayPal are failing to defend their previous market lead as a third party, online payments processor - look elsewhere, you may get cheaper rates and you will not have to suffer their 'buyer protection' policy that will feck over merchants continually. Cynical? Moi? Yup!
  4. Hi - can you rename it on your local computer as a .txt, upload and then rename on the server to a .bin?
  5. Hi If you are using a recent version of osC then the includes/classes/order.php file will not record anything in those fields - e.g. 2.3.4 and 2.3.4BS have these at line 218/221 'cc_type' => '', 'cc_owner' => '', 'cc_number' => '', 'cc_expires' => '', so you'll always get empty data. If you change those lines to this you'll get a record 'cc_type' => $_POST['cc_type'], 'cc_owner' => $_POST['cc_owner'], 'cc_number' => $_POST['cc_number'], 'cc_expires' => $_POST['cc_expires'], However that could land you in a world of pain as storing the cc_number in its entirety is most likely a hanging offence in most of the Western World nowadays so you should obfuscate that in some manner e.g. I think this should get you a card number like 4111XXXXXXXX1234 for storage but best check 'cc_type' => $_POST['cc_type'], 'cc_owner' => $_POST['cc_owner'], 'cc_number' => substr($_POST['cc_number'], 0, 4) . str_repeat('X', (strlen($_POST['cc_number']) - 8)) . substr($_POST['cc_number'], -4); 'cc_expires' => $_POST['cc_expires'],
  6. No - it is not a mismatch - what you are seeing is down to the difference between the catalog/includes/classes/currencies.php file and admin/includes/classes/currencies.php files - as pointed out to you the latter is missing: function get_decimal_places($code) { return $this->currencies[$code]['decimal_places']; } if you add that into admin/includes/classes/currencies.php then the order editor add on should work. You may also have to cast the value at line 29 to an integer: 'decimal_places' => (int)$currencies['decimal_places'], Shipping modules were never designed to be pulled into the admin side of things - when they are then you also need to have all the catalog operations available to them so, in this case the error lies in a combination or order editor and the stock code - not the shipping module. This has always been the case with osCommerce (at least since 2006) - that get_decimal_places is missing from the admin class.
  7. Mr_a - the code may be correct but the error message is telling you that it is being called more than once probably because it looks as though both compatability.php files (admin / catalog) are being called someplace in the code Idealy you'd weed through the code and work out what/where/when/why but that may take sometime - here's a very hacky suggestion that may fix the problem but not screw up anything else.... Actually, having looked at the file at: /home/user/public_html/includes/functions/compatibility.php the 'hacky' stuff is in there but not for that function - go to that file and it will have the code as you posted: function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; reset($ar); while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } Now wrap that in a if (!function_exists('blah de blah')) {} : if (!function_exists('do_magic_quotes_gpc')) { //---------------------------- function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; reset($ar); while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } //------------------------------- } If you look further into the file you'll see similar wraps
  8. Hi there I'm guessing that this is not possible in that function - do you want it in the later one at line 621 function doExpressCheckoutPayment($parameters) ??? If so then try this - go up to the before_process() function and add the lines as shown after $params['PAYMENTREQUEST_0_SHIPTOZIP'] = $order->delivery['postcode']; on or about line 232 $params['PAYMENTREQUEST_0_SHIPTOZIP'] = $order->delivery['postcode']; //phone $params['PAYMENTREQUEST_0_SHIPTOPHONENUM'] = $order->customer['telephone'];// changed your _n_ to _0_ //end
  9. Hi Try Jack's addon http://addons.oscommerce.com/info/7701 works usually - support here
  10. Hi chaps Cron is a total PITA from server to server - what works on one fails on another (every dang time) If you are not troubled by the feeder file getting relocated to the /catalog/ folder then you could try running it under cron using wget (so long as wget id in the PHP install) - I've resorted to that a few times when a Cron syntax reduces me to tears. It does mean the cron file is exposed to the web in the /catalog/ folder but you could install some basic security check if you were troubled 0 * * * * wget -O /dev/null http://www.example.com/googlefeeder.php?user=MyUserName&pass=MyPassWord
  11. Hi Jack & Mr A. Looks like the includes folder is not being found by application_top? You could try coding in the path to the includes file so it would maybe something like: set_include_path('/home/user/public_html/admin/includes/') at the top of the googlefeeder file (maybe remove the admin/ bit depending where chdir ../ is in the code) I've had a couple of sites where running the cronjob on an /admin/ file fails every time - some needed the cron file to actually be in the catalog folder (old stuff - PHP 5.3 and less) on some more recent ones with osC 2.3.4 I've used a chopped down application_top file - /admin/includes/application_top_cron.php (code below) - that may run without the chdir command but I think Mr A server is the culprit as cron jobs vary so much from server to server <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ // Start the clock for the page parse time log define('PAGE_PARSE_START_TIME', microtime()); // Set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); // check support for register_globals if (function_exists('ini_get') && (ini_get('register_globals') == false) && (PHP_VERSION < 4.3) ) { exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory. Please use PHP 4.3+ if register_globals cannot be enabled on the server.'); } // load server configuration parameters if (file_exists('includes/local/configure.php')) { // for developers include('includes/local/configure.php'); } else { include('includes/configure.php'); } // Define the project version --- obsolete, now retrieved with tep_get_version() define('PROJECT_VERSION', 'osCommerce Online Merchant v2.3'); // some code to solve compatibility issues require_once(DIR_WS_FUNCTIONS . 'compatibility.php'); // set the type of request (secure or not) $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL'; // set php_self in the local scope $req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); $PHP_SELF = substr($req['path'], ($request_type == 'SSL') ? strlen(DIR_WS_HTTPS_ADMIN) : strlen(DIR_WS_ADMIN)); // Used in the "Backup Manager" to compress backups define('LOCAL_EXE_GZIP', 'gzip'); define('LOCAL_EXE_GUNZIP', 'gunzip'); define('LOCAL_EXE_ZIP', 'zip'); define('LOCAL_EXE_UNZIP', 'unzip'); // include the list of project filenames require(DIR_WS_INCLUDES . 'filenames.php'); // include the list of project database tables require(DIR_WS_INCLUDES . 'database_tables.php'); // Define how do we update currency exchange rates // Possible values are 'oanda' 'xe' or '' define('CURRENCY_SERVER_PRIMARY', 'oanda'); define('CURRENCY_SERVER_BACKUP', 'xe'); // include the database functions require(DIR_WS_FUNCTIONS . 'database.php'); // make a connection to the database... now tep_db_connect() or die('Unable to connect to database server!'); // set application wide parameters $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION); while ($configuration = tep_db_fetch_array($configuration_query)) { define($configuration['cfgKey'], $configuration['cfgValue']); } // define our general functions used application-wide require(DIR_WS_FUNCTIONS . 'general.php'); require(DIR_WS_FUNCTIONS . 'html_output.php'); // initialize the logger class require(DIR_WS_CLASSES . 'logger.php'); // include shopping cart class require(DIR_WS_CLASSES . 'shopping_cart.php'); // define our localization functions require(DIR_WS_FUNCTIONS . 'localization.php'); // Include validation functions (right now only email address) require(DIR_WS_FUNCTIONS . 'validations.php'); // setup our boxes require(DIR_WS_CLASSES . 'table_block.php'); require(DIR_WS_CLASSES . 'box.php'); //define chaset if(!defined(CHARSET)){ define('CHARSET', 'utf-8'); } // split-page-results require(DIR_WS_CLASSES . 'split_page_results.php'); // entry/item info classes require(DIR_WS_CLASSES . 'object_info.php'); // email classes require(DIR_WS_CLASSES . 'mime.php'); require(DIR_WS_CLASSES . 'email.php'); // file uploading class require(DIR_WS_CLASSES . 'upload.php'); // calculate category path if (isset($HTTP_GET_VARS['cPath'])) { $cPath = $HTTP_GET_VARS['cPath']; } else { $cPath = ''; } if (tep_not_null($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[(sizeof($cPath_array)-1)]; } else { $current_category_id = 0; } // initialize configuration modules if(class_exists(DIR_WS_CLASSES . 'cfg_modules.php')){ require(DIR_WS_CLASSES . 'cfg_modules.php'); $cfgModules = new cfg_modules(); // the following cache blocks are used in the Tools->Cache section // ('language' in the filename is automatically replaced by available languages) $cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_MANUFACTURERS, 'code' => 'manufacturers', 'file' => 'manufacturers_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_ALSO_PURCHASED, 'code' => 'also_purchased', 'file' => 'also_purchased-language.cache', 'multiple' => true) ); } // define low stock report ?>
  12. Hi - which OPC are you using? It sounds like when you have only one gateway available that it should be getting autoselected but the OPC is not doing that - what happens though if you just fill in all the details then click the button? Does it say 'you must select a payment option'? If so then the autoselect is bust
  13. Hi If I read this correctly - try changing all the instances of mysql_real_escape_string to mysqli_real_escape_string or do you mean you want it osC style? Something like: tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_group_id, date_added,configuration_description) values ($title, $key, $value, '6', now(),$description)"); (or something like that)
  14. Hi - as far as I can see the tax code is in there - can you double check that you have a tax rate applied to the shipping module and that the store is set to display prices with tax - in a default store if I have those set and then enlarge the 7% default sales tax to cover all countries and all zones then I get the 7% tax added. If I then restrict it back to (say) just the USA then that works too. Note that it only works on country wide taxes so if, for example, you use the default Florida only 7% tax then you cannot narrow it down that far so if you select USA in the counties dropdown it will not generate a tax value until your into the checkout stream and set shipping address
×
×
  • Create New...