Payment based on Billing-Adress and not on Delivery-Adress

Started by Nick-DE, December 05, 2013, 09:14:54 AM

Previous topic - Next topic

Nick-DE

hi,

is there an option in vm 2.0.24b for payment by billing-adress and not by delivery-adress? if a customer has to different contries in billing- an shipping-adress vm shows the payment-options based on delivery-adress (delivery-country) but i need it based on the billing-adress. is there a way to do this?

thanks and greetings
nick

alatak

Hello
It is a payment plugin problem. For some payment processor it is the Bill to address, some others the Ship To.
Which payment plugin are you using ?

Nick-DE

Hi,

got this problem with the standard payment and sepa direct mandate. i've got three payment-methods:

invoice = only in germany
sepa direct mandate = only in germany
pay bevor livering = all other countrys

in the payments i selected the countrys for wich the payment is avaible.

if a customer had an billing-adress e.g. in france and no delivering-adress so the correct payment "pay bevor livering" could only selected.

if a customer had an billing-adress e.g. in france and a delivery-adress in germany so only the payments "invoice" and "sepa direct mandate" are avaible. but i need here only "pay bevor livering" because the payment should only be based on bill-adress and not at the delivery-adress.

i think that the payment by joomla/vm is based on the billing-adress if there is no delivery-adress. if there is a delivery-adress the payment is based on the delivery-adress - but i need always payment is based only on billing-adress.

you got an idea how i can do this?

greetings
nick


GJC Web Design

For the VM standard plugin it's line 216 in plugins\vmpayment\standard\standard.php

change
$address = (($cart->ST == 0) ? $cart->BT : $cart->ST);

to

$address =  $cart->BT;

what is the SEPA one? Commercial plugin? will probably use the same snippet - most do

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Nick-DE

Hi,

many thanks :-). works perfect :-). you're right: sepa uses the same snippet.

sepa direct mandate is a comercial plugin for payment-method sepa (i don't know if this only given in germany): http://extensions.virtuemart.net/payments/sepa-direct-debit-mandate-detail. it's supported by alatak (also posted to this thread) with great support.

thanks again.

greetings
nick

GJC Web Design

I use a slightly different snippet in my plugins - the std. one

$address = (($cart->ST == 0) ? $cart->BT : $cart->ST);

ignores if they set a shipping address but then tick the "Use for the shipto same as billto address"

I use

if($cart->STsameAsBT == 0){
$address = (($cart->ST == 0 ) ? $cart->BT : $cart->ST);
}else{
$address = $cart->BT;
}


won't affect you but might be interesting for alatak

cheers

John
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation