Originally Posted by
mc12345678
Unfortunately the phpmyadmin version is not the actual php version, though it may narrow the band a little of what version(s) could actually be enabled. In your Store Admin, click Admin->Tools->Server Info for version details.
I'm curious about what changes have been made to the includes/modules/pages/checkout_shipping/header_php.php file to move line 203 to be one of those applicable to a foreach loop. In the default version of that file for ZC 1.5.4, that line is in the 190s if I recall correctly from when I was looking at this a few days ago.
Also, regardless of the changes made, what is the content of line 203 in your version of the file?
Could post a few lines before and a few lines after to provide context. Please press the # button in the messagebox toolbar before pasting code to wrap it in [CODE][/CODE] tags.
PHP Version: 5.3.29 (Zend: 2.3.0) PHP Memory Limit: 128M
Here are some lines before and after line 203
Code:
// get all available shipping quotes
$quotes = $shipping_modules->quote();
// check that the currently selected shipping method is still valid (in case a zone restriction has disabled it, etc)
if (isset($_SESSION['shipping']) && $_SESSION['shipping'] != FALSE && $_SESSION['shipping'] != '') {
$checklist = array();
foreach ($quotes as $key=>$val) {
foreach($val['methods'] as $key2=>$method) {
$checklist[] = $val['id'] . '_' . $method['id'];
}
}
$checkval = (is_array($_SESSION['shipping']) ? $_SESSION['shipping']['id'] : $_SESSION['shipping']);
if (!in_array($checkval, $checklist)) {
$messageStack->add('checkout_shipping', ERROR_PLEASE_RESELECT_SHIPPING_METHOD, 'error');
}
}
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
I do have a plugin called TwitchRestrict that has some lines added before this that makes the line in question move down to 203. This plugin does not work for me so when I upgrade this coming year to the latest version of zen cart I will be deleting this plugin.
Hope this helps.
Bookmarks