Guest Posted January 17, 2009 Share Posted January 17, 2009 I am trying to install "multi attributes" but a change to code will overwrite QPB. I tried a couple of things but I keep getting errors. Installation instructions for multi attibutes: 2. In the includes/application_top.php file Find the code line: case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { Below that you will find the following code: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); Repalce that line with the following piece of code: // Code segment includes/modified for Multiple product option lines. // maintainance and Qns : Harishyam :> [email protected] for($i=0;$i<5;$i++) { $qty_str = $i.'_quantity'; $arr = array(); $arr = $HTTP_POST_VARS[$i.'_id']; $qty = $HTTP_POST_VARS[$i.'_quantity']; //echo " the quantity and option " . $i . " is: ".. ' and qty is: ' . $qty . 'or ' .$HTTP_POST_VARS[$i.'_quantity']; $opt = $i.'_id'; $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id'], $arr))+$qty, $arr); } // End of Code segment includes/modified for Multiple product option lines. // maintainance and Qns : Harishyam :> [email protected] My application_top has that line already edited: //BOF qpbpp //$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']); //EOF qpbpp I thought I could do this but keep getting a parsing error that I can't seem to fix: //BOF qpbpp //$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id'], $arr))+$qty, $arr); //EOF qpbpp 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.