Euthorus Posted December 16, 2005 Share Posted December 16, 2005 I just recently installed this contribution to my old MS1 site and everything seemed to go smoothly, that is until I tested the system with any item that has more than 1 choice of attributes (i.e using 2oz size instead of default 1oz.) As soon as non-default size/weigth item is added the shopping cart screen gets filled with errors like this: Warning: Variable passed to each() is not an array or object in /catalog/shopping_cart.php on line 58 Warning: reset(): Passed variable is not an array or object in /catalog/includes/modules/order_details.php on line 84 Warning: Variable passed to each() is not an array or object in /catalog/includes/modules/order_details.php on line 85 Warning: reset(): Passed variable is not an array or object in /catalog/includes/modules/order_details.php on line 107 Warning: Variable passed to each() is not an array or object in /catalog/includes/modules/order_details.php on line 108 this is the only mod I am using that has to deal with shopping cart contents so the changes its making specifically to: /catalog/includes/boxes/shopping_cart.php /catalog/includes/classes/shopping_cart.php shopping_cart.php on line 58: // Push all attributes information in an array if (isset($products[$i]['attributes'])) { for ($cont = 0; $cont < sizeof($products[$i]['attributes']) ; $cont++) { while (list($option, $value) = each($products[$i]['attributes'][$cont])) { echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $cont . ']', '{' . $option . '}' . $value); $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.options_values_qty from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa ... order_details.php on line 84-108: reset($products[$i]['attributes'][$cont]); while (list($option, $value) = each($products[$i]['attributes'][$cont])) { echo '<br><small><i> - ' . $products[$i][$cont][$option]['products_options_name'] . ' ' . $products[$i][$cont][$option]['products_options_values_name'] . '</i></small>'; } } } echo '</td>' . "\n"; // Tax (not in shopping cart, tax rate may be unknown) if (!strstr($PHP_SELF, FILENAME_SHOPPING_CART)) { echo ' <td align="center" valign="top" class="main">' . number_format($products[$i]['tax'], TAX_DECIMAL_PLACES) . '%</td>' . "\n"; } // Product price if (!strstr($PHP_SELF, FILENAME_ACCOUNT_HISTORY_INFO)) { echo ' <td align="right" valign="top" class="main"><b>' . $currencies->display_price($products[$i]['price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>'; } else { echo ' <td align="right" valign="top" class="main"><b>' . $currencies->display_price($products[$i]['price'], $products[$i]['tax'], $products[$i]['quantity']) . '</b>'; } // Product options prices if ($attributes_exist == 1) { for ($cont = 0; $cont < sizeof($products[$i]['attributes']) ; $cont++) { reset($products[$i]['attributes'][$cont]); while (list($option, $value) = each($products[$i]['attributes'][$cont])) { I sincerely apologize for such a lengthy post - I really like the capabilities of this contribution I just cant have it the way it is now when it makes the erest of my site unusable. Has anyone encountered this sort of behavior ? Again it seems to deal specifically with items in the shopping cart that have non-default attributes chosen by the customer. Thank you you kindly ANY help is appreciated. Link to comment Share on other sites More sharing options...
Euthorus Posted December 16, 2005 Author Share Posted December 16, 2005 small bump to keep visibility Link to comment Share on other sites More sharing options...
Euthorus Posted December 16, 2005 Author Share Posted December 16, 2005 could someone please at least recommend what I can do to figure out whats causing this ? Link to comment Share on other sites More sharing options...
♥Vger Posted December 17, 2005 Share Posted December 17, 2005 could someone please at least recommend what I can do to figure out whats causing this ? Rebuild your site using MS2. Nobody should be still trying to hang on to MS1. Vger Link to comment Share on other sites More sharing options...
Euthorus Posted December 19, 2005 Author Share Posted December 19, 2005 Rebuild your site using MS2. Nobody should be still trying to hang on to MS1. Vger I have tried to do that but seemed to be a rather daunting task - where do i even begin ? If I backup the product /customer database will it import into the new build ? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.