NOTE:
A substantial amount of code has been added to ZC V15.5f shopping_cart classes.
Yes, that logic is there but coded differently.
It appears the "foreach" was intended to be implemented but never was.
See comment: * @todo change while loop to a foreach
Code:
/**
* Method to handle cart Action - multiple add products
*
* @param string forward destination
* @param url parameters
* @todo change while loop to a foreach
*/
function actionMultipleAddProduct($goto, $parameters) {
global $messageStack;
$addCount = 0;
if (is_array($_POST['products_id']) && sizeof($_POST['products_id']) > 0) {
// Begin mc12345678 Checkbox/TextBox
if ($_POST['check_text_active'] == true) {
$multiAddCheck = true;
} else {
$multiAddCheck = false;
}
// End mc12345678 Checkbox/TextBox
while ( list( $key, $val ) = each($_POST['products_id']) ) {
// Begin mc12345678 Checkbox/TextBox
if ((PRODUCT_ALL_CHECKBOX_TEXTBOX_ACTIVE == '1' || PRODUCT_FEATURED_CHECKBOX_TEXTBOX_ACTIVE == '1' || PRODUCT_NEW_CHECKBOX_TEXTBOX_ACTIVE == '1' || PRODUCT_LISTING_CHECKBOX_TEXTBOX_ACTIVE == '1') && $multiAddCheck == true){
//reset($_POST['products_id2']);
while ( list( $key2, $val2 ) = each($_POST['products_id2']) ) {
if ($key == $key2) {
if ($val > 0)
{