Hi,
I'm not sure if this is possible within Opencart, but have a site where I need to make it so that when a customer makes their first order they can't change their shipping address - i.e. their shipping address must be the same as their card holder address (a step in fraud prevention).
After they have made their first order it should work in the normal way, they can specify an alternative shipping address.
Has anyone done this already or is it an option somewhere?
I am using only registered accounts (guest checkout is disabled, on this particular site).
Last edited by i2Paq on Fri Sep 24, 2010 11:58 pm, edited 1 time in total.
Reason: Topic moved
Reason: Topic moved
1. EDIT: catalog/controller/checkout/payment.php
2. FIND:
3. AFTER, ADD:
This should force the payment address to always follow the shipping address if there are no previous orders.
It assumes that you won't be using guest checkout
2. FIND:
Code: Select all
if (!isset($this->session->data['payment_address_id']) && isset($this->session->data['shipping_address_id']) && $this->session->data['shipping_address_id']) {
$this->session->data['payment_address_id'] = $this->session->data['shipping_address_id'];
}
Code: Select all
$this->load->model('account/order');
$order_total = $this->model_account_order->getTotalOrders();
if (isset($this->session->data['payment_address_id']) && isset($this->session->data['shipping_address_id']) && $this->session->data['shipping_address_id'] && !$order_total) {
$this->session->data['payment_address_id'] = $this->session->data['shipping_address_id'];
}
This should force the payment address to always follow the shipping address if there are no previous orders.
It assumes that you won't be using guest checkout
Who is online
Users browsing this forum: No registered users and 5 guests