Post by straightlight » Wed Jan 18, 2012 8:17 am

File updated.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

New member

Posts

Joined
Sun Mar 20, 2011 3:58 pm

Post by straightlight » Wed Jan 18, 2012 3:23 pm

Nothing more than uploading the file into your vqmod/xml folder.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by andyyblake » Fri Feb 03, 2012 1:32 am

Birth date in Registration form is very helpful as it prohibits the operators which are under age and it is one of the best way for putting the under age and the spammers outside of the site.

Newbie

Posts

Joined
Fri Feb 03, 2012 1:21 am

Post by straightlight » Fri Feb 03, 2012 1:38 am

andyyblake wrote:Birth date in Registration form is very helpful as it prohibits the operators which are under age and it is one of the best way for putting the under age and the spammers outside of the site.
While the opinion above may have its truth, the downside of this methodology is that even an underage customer could state he has the legal age from the form. :/

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by bleuclay » Tue Mar 20, 2012 10:46 am

i was try it for 1.5.x Version..
Everything fine in admin, i can see it in
customer_form.tpl file

well my question is how to sort the

Code: Select all

birth_date
in
customer_list.tpl
This is what i did before..
dob.jpg

dob.jpg (97.94 KiB) Viewed 8315 times

Any suggested?
Thanks in advance..

Imeth Clay
http://imajiworks.com

Newbie

Posts

Joined
Thu Jan 20, 2011 3:09 am

Post by straightlight » Wed Mar 21, 2012 11:00 pm

Post your TPL file as an attachment. I will take a look at it.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by bleuclay » Sat Mar 24, 2012 9:34 pm

straightlight wrote:Post your TPL file as an attachment. I will take a look at it.
Finally I managed to do it & fix that thanks.. here is my solution :)

Code: Select all

if (!empty($data['filter_birth_date'])) {
			$implode[] = "DATE(c.birth_date) = DATE('" . $this->db->escape($data['filter_birth_date']) . "')";
		}
change to

Code: Select all

if (!empty($data['filter_birth_date'])) {
			$implode[] = "DATE(birth_date) = DATE('" . $this->db->escape($data['filter_birth_date']) . "')";
		}
and any other with this format format
c.birth_date
you can see my admin/view/template/sale/customer_list.tpl & customer_form.tpl file as attachment bellow

Now user can input their dob and edited later on their account page instanly, in the backend/admin i can also see and filter Customer DOB and edited in customer form without any problem.. :)

Here are my screenshoot :
customer_list.jpg

customer_list.tpl - customer_list.jpg (122.88 KiB) Viewed 8254 times

customer_form.jpg

customer_form.tpl - customer_form.jpg (124.08 KiB) Viewed 8254 times

i love this forum.. thanks mates :drunk:

Newbie

Posts

Joined
Thu Jan 20, 2011 3:09 am

Post by straightlight » Sat Mar 24, 2012 9:46 pm

While this solution may be working fine, your suggestion above is to modify core files rather than creating an XML file.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by tolinho » Tue Aug 07, 2012 6:59 pm

Hi,
Could someone be so kind to point out the code for validating the birthday field?
To verify if it is a valid date.

All I can do is this:

in:
catalog\controller\account\register.tpl in function:
private function validate()

add this:

if ( (utf8_strlen($this->request->post['birth_date'] == '')) ) {
$this->error['birth_date'] = $this->language->get('error_birth_date');
}

but this will only check if it is empty. Not validate the field date.

Thanks

New member

Posts

Joined
Sat Jul 21, 2012 2:01 am

Post by JoshuaMadison » Thu Aug 09, 2012 9:32 am

Thank you for sharing!

Newbie

Posts

Joined
Wed Aug 08, 2012 10:50 am

Post by spamhub » Mon Nov 19, 2012 11:51 pm

@straightlight - I downloaded your xml file and it contains something regarding zone_id or similar, did you changed the file for some other use?

Or am I missing something??

Thanks.
A.

Newbie

Posts

Joined
Sat Jun 26, 2010 2:49 am

Post by thbr02 » Tue Nov 27, 2012 12:19 am

I'm trying to implement the birth date into my customer_list.tpl. I've downloaded the birth_date.zip above and extract it, but I get some error I can't get rid of. It looks like this in my error log:

2012-11-26 17:06:04 - PHP Notice: Undefined variable: sort_birth_date in /home/t/torshamm/www/textiltryck/admin/view/template/sale/customer_list.tpl on line 53
2012-11-26 17:06:04 - PHP Notice: Undefined variable: column_birth_date in /home/t/torshamm/www/textiltryck/admin/view/template/sale/customer_list.tpl on line 53
2012-11-26 17:06:04 - PHP Notice: Undefined variable: filter_birth_date in /home/t/torshamm/www/textiltryck/admin/view/template/sale/customer_list.tpl on line 110
2012-11-26 17:06:04 - PHP Notice: Undefined index: birth_date in /home/t/torshamm/www/textiltryck/admin/view/template/sale/customer_list.tpl on line 129

I understand that I have to add "column_birth_date" into my language file. I've tried to add it into sale/customer.php but it won't help. is there anywhere eles to declare it ?

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by irmaNiza » Wed Jan 02, 2013 12:16 pm

Hi,

I don't have create.tpl file in my Account folder. where should I get it?

tq :)

Newbie

Posts

Joined
Wed Jan 02, 2013 12:09 pm

Post by thbr02 » Fri Jan 04, 2013 4:19 am

You will have to change all occurrences of create.* to register.*. That will do it.

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by cutero » Fri May 24, 2013 3:03 am

Thanks man!

Newbie

Posts

Joined
Fri May 24, 2013 3:02 am

Post by Newlifebeat » Wed Jul 30, 2014 11:17 pm

Notice: Undefined index: birthday_date in\vq2-catalog_controller_account_register.php on line 395
:'( :'( :'( :'( :'(

please i beg you all please help me on this (how do i fix this ) please and thanks once again thanks thanks i really appreciate you all ... thanks ...
Last edited by Newlifebeat on Mon Jul 13, 2015 11:30 pm, edited 1 time in total.

Newbie

Posts

Joined
Wed Jul 30, 2014 11:14 pm

Post by David Sanchez » Wed Aug 20, 2014 1:04 am

In the new version on Opencar v2 you will be able to add as many custom fields no matter which type :D

Visit our Store http://www.Alzoco.com for more info


Newbie

Posts

Joined
Tue Dec 10, 2013 11:58 pm
Location - Beijing, China
Who is online

Users browsing this forum: No registered users and 35 guests