Contributions

Features (Category Index)
Search: 

birthdate combo select

The Birthdate combo select contribution provides the following enhancements to the Create Account and Edit Account features of osCommerce:

* Date of birth field is now divided into three combo select, ones for day, month and year

With this plugin, users simply have to choise a date from a combo select (drop down) without thinking to the date format (xx/xx/xxxx).

Administrator has not this functionality.


File List

This contribution is based on osCommerce 2.2-RC2a.

The following files have changes:

* catalog/account_edit.php
* catalog/create_account.php
* catalog/includes/languages/english.php

---------------------------------------------
No PHP files are included in this ZIP file .
---------------------------------------------


Support at
http://forums.oscommerce.com/index.php?showtopic=317106

Expand All / Collapse All

Really bugfix with dates in different formats + Added multiple languages 19 Apr 2010

ENGLISH

There is a problem when selecting the dates when different languages and each has a different format. The solution is very simple, just put the same format in all languages

Open
- catalog/includes/languages/english.php
- catalog/includes/languages/espanol.php
- catalog/includes/languages/german.php

- catalog/admin/includes/languages/english.php
- catalog/admin/includes/languages/espanol.php
- catalog/admin/includes/languages/german.php

and in all languages that are taken that are not included here


Look for lines 34 and 36 in each file. The espanol and german languages have the same format, language is not english

Copy the format of the language that interested in copying in the language you are not interested

All languages should have the same format, no exceptions


return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);

for english format (mm/dd/yy)


or


return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);

for espanol and german format (dd/mm/yy)



Complete instructions

*************************************************************************

ESPAŅOL

Existe un problema al seleccionar las fechas cuando hay diferentes idiomas y cada uno tiene un formato distinto. La solucion es muy simple, solo hay que poner el mismo formato en todos los idiomas

Abrir
- catalog/includes/languages/english.php
- catalog/includes/languages/espanol.php
- catalog/includes/languages/german.php

- catalog/admin/includes/languages/english.php
- catalog/admin/includes/languages/espanol.php
- catalog/admin/includes/languages/german.php

y en todos los lenguajes que se tengan que no esten aqui incluidos


Buscar las lineas 34 y 36 en cada archivo. Los idiomas espanol y german tienen el mismo formato, el idioma english no

Copiar el formato del lenguaje que interese copiandolo en el lenguaje que no interese

TODOS los lenguajes deben tener el mismo formato, no hay excepciones


return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);

para el formato ingles (mm/dd/aa)


o


return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);

para el formato espaņol y aleman (dd/mm/aa)


Intrucciones completas

Birthdate combo select 1.1a 10 Feb 2010
birthdate combo select 1.1 1 Feb 2010
birthdate combo select 6 Oct 2008

Note: Contributions are used at own risk.