News:

Looking for documentation? Take a look on our wiki

Main Menu

Delete prices not Working correctly

Started by m_online, January 29, 2015, 13:29:44 PM

Previous topic - Next topic

m_online

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?