Author Topic: Optional field  (Read 12 times)

Offline juancot

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Optional field
« on: August 03, 2020, 07:14:59 PM »
Hi.
I am using AvanteCart for the first time and here in my country we do not use the zip code, I need it to be an optional field, how can I do this in AvanteCart version 1.2.16?
Ir can I make my own customer registration form?
Thank you.

Offline dvagner

  • Core/UI Developer
  • Newbie
  • *
  • Posts: 43
  • Karma: +15/-0
    • View Profile
Re: Optional field
« Reply #1 on: Today at 01:47:15 AM »
Hi
You can use hook
for example:

Code: [Select]
public function onModelAccountCustomer_ValidateData()
{
  $that = &$this->baseObject;
  if (isset($that->error['postcode'])) {
unset($that->error['postcode']);
}
}

 

Powered by SMFPacks Social Login Mod