Instead of making a custom post_type pack
What the previous developer did is to add options (with more units) to the products and make them mandatory...
this way when user adds a item to the cart. we have:
- the pack prize, ej:
66€
- the uni price, ej:
5,50€
when i should be only: 66€
but in the shopping cart then are 71,50€
( wrong)
So how can i correct this mess?
i looked into the product constructor in the product controller file (/catalog/controller/product.php):
And in the foreach, i tried:
foreach ($product_options as $product_option) {
if ($product_option['type'] == 'select' || $product_option['type'] == 'radio' || $product_option['type'] == 'checkbox' || $product_option['type'] == 'image') {
$product_option_value_data = array();
if($product_option['name'] == 'Pack'){
$price = $packPrice;
$total = $packPrice;
$product_option_value['price'] = $product_option_value_data;
die('Die: '.$product_option_value_data);
}else{
}
Any idea why is this not doing anything? any idea where should i be looking?
thanks