Post by topy » Tue May 17, 2016 1:34 am

Salut,

Ma poate ajuta cineva cum pot scoate fieldul de email sa nu mai fie obligatoriu daca cineva alege sa comande fara sa-si creezi cont ?

Opencart v1.5.6.4

Active Member

Posts

Joined
Mon Jun 20, 2011 2:52 pm

Post by titusel » Tue May 17, 2016 5:06 pm

Salut!

Intrebare, de ce doresti sa faci acest lucru? care este logica? De ce nu ai avea nevoie de emailul clientului?

User avatar
Active Member

Posts

Joined
Sat May 15, 2010 7:29 pm
Location - Bucharest, Romania

Post by topy » Tue May 17, 2016 6:50 pm

titusel wrote:Salut!

Intrebare, de ce doresti sa faci acest lucru? care este logica? De ce nu ai avea nevoie de emailul clientului?
Vreau sa scot mandatory pe email cand se decide sa finalizeze comanda fara sa creeze cont. Daca clientul nu are adresa de email sau nu doreste sa spuna, nu trebuie sa-l oblig. Confirmarea comenzi se va face prin telefon de catre administrator...

Active Member

Posts

Joined
Mon Jun 20, 2011 2:52 pm

Post by titusel » Tue May 17, 2016 9:06 pm

Ok. Ca sa scoti obligativitatea de pe camp, stergi acest cod:
if ((utf8_strlen($this->request->post['email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) {
$json['error']['email'] = $this->language->get('error_email');
}
din catalog/controller/checkout/guest.php din functia validate.

Insa e posibil sa iti crape dupa ce apasa clientul "confirma", practic atunci el trimite un mail catre admin si catre client. Nu am testat dar poti incerca.

User avatar
Active Member

Posts

Joined
Sat May 15, 2010 7:29 pm
Location - Bucharest, Romania

Post by topy » Tue May 17, 2016 9:26 pm

titusel wrote:Ok. Ca sa scoti obligativitatea de pe camp, stergi acest cod:
if ((utf8_strlen($this->request->post['email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) {
$json['error']['email'] = $this->language->get('error_email');
}
din catalog/controller/checkout/guest.php din functia validate.

Insa e posibil sa iti crape dupa ce apasa clientul "confirma", practic atunci el trimite un mail catre admin si catre client. Nu am testat dar poti incerca.
Am incercat asta... dar se pare ca nu a mers :))

Active Member

Posts

Joined
Mon Jun 20, 2011 2:52 pm

Post by topy » Tue May 17, 2016 9:34 pm

Ahh... stai ! Da .. avem un quick checkout ! Sry .. my bad, oboseala !

Active Member

Posts

Joined
Mon Jun 20, 2011 2:52 pm
Who is online

Users browsing this forum: No registered users and 181 guests