Dear Dev team!
We have encountered a problem costed us 3 hours, we thought it's our post plugin's problem, then suspected cmsmart opc's problem, then finally spotted these lines.
components/com_virtuemart/controllers/cart.php
public function updatecart($html=true){
if(empty($cart->selected_shipto) or $cart->selected_shipto<1){
$cart->STsameAsBT = 1;
$cart->selected_shipto = 0;
} else {
$cart->STsameAsBT = 0;
}
These lines should be removed!!
I suppose it is detecting if any saved Shipto info is chosen, but not every opc plugin has saved shipto list for choosing, for eg: cmsmart opc.
thus while saving the order to database, the variable STsameAsBT was changed to 1 every time, but it's the variable we use to calculate the postage!
It should use the ST zip cuz STsameAsBT was not chosen, but instead it used BT zip cuz u changed this variable in php.
IMHO, u should not change this variable in php.
Ehrm, read your post again. You may get the error of your proposel yourself.
and btw, your 3 hours are a joke compared to the weeks we worked on that. Go the cmsmart, explain them, that the selected_shipto is actually used since vm2, if not even vm1.1
QuoteThese lines should be removed!!
Noooooo!
The cart is working fine
" but it's the variable we use to calculate the postage!"
Then change the way your system works!
3 hours - pah!!!
I spent more hours testing this for free!
I suggest you sort out your own OPC issues