Hi, can anyone teach me that which file should be edited in order to add pre-text in address field on register page.
In my case, Local customers will pick up the product in store, most likely local customers no need to enter address. Therefore I want the default address field can show "pick up in store" on the address field. Customers no need to type a fake address at most of the time.
opercart v1.5.3.1
Thanks!!
Open catalog/controller/account/register.php and find this code:
Change it to this, filling in your desired pre-text:
Code: Select all
if (isset($this->request->post['address_1'])) {
$this->data['address_1'] = $this->request->post['address_1'];
} else {
$this->data['address_1'] = '';
}
if (isset($this->request->post['address_2'])) {
$this->data['address_2'] = $this->request->post['address_2'];
} else {
$this->data['address_2'] = '';
}
Code: Select all
if (isset($this->request->post['address_1'])) {
$this->data['address_1'] = $this->request->post['address_1'];
} else {
$this->data['address_1'] = 'Your Pretext Goes Here';
}
if (isset($this->request->post['address_2'])) {
$this->data['address_2'] = $this->request->post['address_2'];
} else {
$this->data['address_2'] = 'Your Pretext Goes Here';
}
Who is online
Users browsing this forum: No registered users and 88 guests