redzone1 Posted October 11, 2005 Share Posted October 11, 2005 Can any 1 help me on this ....followed instrustions i downloaded from here ...... http://www.dailywholesale.com/creloaded/Ad...rices_1.41.html. i get this ...... Parse error: parse error, unexpected ';', expecting ')' in /home/*******/public_html/catalog/includes/classes/shopping_cart.php on line 299 This is the code i copied of the above file ............. 5-in classes/shopping_cart.php above $products_array[] = array('id' => $products_i add //BOF PHPMOM.COM AAP//hadir $attributes_price = 0; if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '') { $attributes_price += ($attribute_price['options_values_price']-$products_price); } elseif ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } elseif ($attribute_price['price_prefix'] == '-') { $attributes_price -= $attribute_price['options_values_price']; } } } //eof actual attribute//hadir ---------------------------------------------------------------------------------------------------- And replaced this in the shopping cart.php ................................ $products_array[] = array('id' => $products_id, SHOULD THE CODE GO HERE SEE BELOW 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], 'weight' => $products['products_weight'], 'final_price' => ($products_price + $this->attributes_price($products_id)), 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')); } } ................................................................................ ..................................................... LIKE THIS... $products_array[] = array('id' => $products_id, //BOF PHPMOM.COM AAP//hadir $attributes_price = 0; if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '') { $attributes_price += ($attribute_price['options_values_price']-$products_price); } elseif ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } elseif ($attribute_price['price_prefix'] == '-') { $attributes_price -= $attribute_price['options_values_price']; } } } //eof actual attribute//hadir 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], 'weight' => $products['products_weight'], 'final_price' => ($products_price + $this->attributes_price($products_id)), 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')); } } ................................................................................ ............................ OR I GOT IT ALL WRONG PLEASE HELP?! THANKS Quote Link to comment Share on other sites More sharing options...
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.