News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

weight_countries.php - No price shown product page [change from 3.0.17+]

Started by maxispin, December 12, 2016, 17:42:49 PM

Previous topic - Next topic

maxispin

/plugins/vmshipment/weight_countries/weight_countries.php

Change made in 3.0.17.2 made Product price disappear. This occurs when product has no real price set and it is computed from subproducts. (I know this is related to the plugin I have (ty S42), but still wondering why it happens. )

See attachments.





3.0.173.0.17+
if(!isset($cart)){ 
                 $cart = VirtueMartCart::getCart(); 
                 $cart->products['virtual'] = $product; 
                 $cart->_productAdded = true; 
                 $cart->prepareCartData(); 
             }
      
if(!isset($cart)){        
                   $cart = VirtueMartCart::getCart();        
                   $cart->prepareCartData();        
               }       
               $prices=array('salesPrice'=>0.0);        
               if(isset($cart->cartPrices)){        
                   $prices['salesPrice'] = $cart->cartPrices['salesPrice'];        
               }       
               if(isset($product->prices)){        
                   $prices['salesPrice'] += $product->prices['salesPrice'];        
               }       
      
               if($this->checkConditions($cart,$this->_currentMethod,$prices,$product)){
[td

VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9

Studio 42

Valerie informed me that it's not the only plugin having problem seens(not only for price calc).
I waited for a new Stable release before changing something, because it's not the only case having this problem and each new release have new code changes.
But vm3.0.16.2 is very stable, simply do not use vm3.0.18 for now, if you don't need it.

maxispin

Thank you Studio42 for responding! Good to know what version is most stable. I test with the newest version with my hack and roll back if I found any severe problems.
VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/