Author Topic: Delete prices not Working correctly  (Read 570 times)

m_online

  • Beginner
  • *
  • Posts: 1
Delete prices not Working correctly
« on: January 29, 2015, 13:29:44 pm »
VM 2.6.12.2

has an product more than one Prices and we want to delete one of them will not work, when by chance " virtuemart_product_price_id " equal " virtuemart_product_id "  is.

in product.php

            foreach($old_price_ids as $key => $oldprice){
                     if(array_search($pricesToStore['virtuemart_product_price_id'], $oldprice )){
                     $pricesToStore = array_merge($oldprice,$pricesToStore);
                     $toUnset[] = $key;
            }



my fix works for me

            foreach($old_price_ids as $key => $oldprice){
                     if($pricesToStore['virtuemart_product_price_id'] == $oldprice['virtuemart_product_price_id'] ){
                     $pricesToStore = array_merge($oldprice,$pricesToStore);
                     $toUnset[] = $key;
            }



is this a Bug?