If someone could help with adding an if / else statement in the code then we could get the billing info sent to SagePay if it is a download product and there is no delivery address.
Here is the section of code inside the file called includes/modules/payment/sagepay_form.php.
How do I add the statement in the section after this line:
In other words, the code must check to see if the customers delivery address OR postcode is empty. If both or any of the delivery fields are empty, it posts the billing address to SagePay instead.Code:$plain .= "BillingPhone=" . $order->customer['telephone'] . "&";
Would appreciate come help with this.thanks.Code:$plain .= "BillingPhone=" . $order->customer['telephone'] . "&"; $plain .= "DeliverySurname=" . $order->delivery['lastname'] . "&"; $plain .= "DeliveryFirstnames=" . $order->delivery['firstname'] . "&"; $plain .= "DeliveryAddress1=" . $order->delivery['street_address'] . "&"; if (ACCOUNT_SUBURB == 'true') { $plain .= "DeliveryAddress2=" . $order->delivery['suburb'] . "&"; } $plain .= "DeliveryCity=" . $order->delivery['city'] . "&"; $plain .= "DeliveryPostCode=" . $order->delivery['postcode'] . "&"; $plain .= "DeliveryCountry=" . $order->delivery['country']['iso_code_2'] . "&";


Reply With Quote


