devoknows Posted April 30, 2008 Posted April 30, 2008 Hello, I'm configuring an osCommerce install for a client, and he uses ups to ship -- only ups, and almost always ground, so he wanted me to disable all the other shipping methods. Should be no problem, as I have installed upsxml v 1.3.5 for him. However, whenever I select any of the shipping options (to remove them from consideration) and apply, osC pumps out the following error: Warning: constant() [function.constant]: Couldn't find constant UPSXML_--none-- in /home/beerwine/public_html/store/includes/modules/shipping/upsxml.php on line 2171 So instead of using this method, I've disabled the undesired shipping methods by commenting them out in the store/languages/english/modules/shipping/upsxml.php file. So instead of the one error when I submit, I get a cascade of errors when I edit. Not the most elegant solution, but it'll do for now. However, if anyone has any advice as to why this is happening and what I can do to actually fix it instead of hacking around it, please let me know. For reference, the install itself was seamless. Thanks in advance, Devo Quote
Jan Zonjee Posted April 30, 2008 Posted April 30, 2008 Warning: constant() [function.constant]: Couldn't find constant UPSXML_--none-- in /home/beerwine/public_html/store/includes/modules/shipping/upsxml.php on line 2171 Very, very strange because this is exactly coded not to happen in the function at the bottom outside of the class upsxml.php line 1010 about: function get_multioption_upsxml($values) { if (tep_not_null($values)) { $values_array = explode(',', $values); foreach ($values_array as $key => $_method) { if ($_method == '--none--') { $method = $_method; } else { $method = constant('UPSXML_' . trim($_method)); } $readable_values_array[] = $method; } $readable_values = implode(', ', $readable_values_array); return $readable_values; } else { return ''; } } There are only 1039 lines in that file so I don't see how you can get an error on line 2171 by the way. This contribution has its own support thread in the General Contribution Support forum. Quote
befreestudios Posted August 16, 2012 Posted August 16, 2012 (edited) SOLUTION. I just did an install of this module and ran into the same issue. The problem is that the code is expecting a definition for --none-- and there isnt any. If you add this definition to the language file you will no longer get these warnings. Goto: /includes/languages/english/modules/shipping/upsxml.php Add: define('UPSXML_--none--', 'None'); Whalah... Edited August 16, 2012 by befreestudios diannecl 1 Quote
diannecl Posted August 28, 2015 Posted August 28, 2015 Burton, your solution - define('UPSXML_--none--', 'None'); WORKED!!!!! You are AWESOME! Thanks! Dianne Quote
Recommended Posts
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.