PDA

View Full Version : Quantity Price Breaks Per Product



michael_s
09-05-2008, 10:54 PM
in the install.html it says
...
Open: catalogadmincategories.php
...
After (around line 384):
} elseif (tep_not_null($HTTP_POST_VARS)) {
$pInfo->objectInfo($HTTP_POST_VARS);

Replace with:
// BOF qpbpp
$price_breaks_array = array();
for ($count = 0; $count $HTTP_POST_VARS['products_price' . $count],
'products_qty' => $HTTP_POST_VARS['products_qty' . $count],
'products_delete' => (isset($HTTP_POST_VARS['products_delete' . $count]) && tep_not_null($HTTP_POST_VARS['products_delete' . $count])));
}
}
// EOF qpbpp



acutally it should be
// BOF qpbpp
} elseif (tep_not_null($HTTP_POST_VARS)) {
$price_breaks_array = array();
for ($count = 0; $count $HTTP_POST_VARS['products_price' . $count],
'products_qty' => $HTTP_POST_VARS['products_qty' . $count],
'products_delete' => (isset($HTTP_POST_VARS['products_delete' . $count]) && tep_not_null($HTTP_POST_VARS['products_delete' . $count])));
}
}
// EOF qpbpp

that is, the following line should not be delete
} elseif (tep_not_null($HTTP_POST_VARS)) {

otherwise when you EDIT an existing product with price break, the existing price break will be gone :)

More... (http://addons.oscommerce.com/info/1242)