Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Lost text


gavinmcmillan

Recommended Posts

Hi all

 

When you go to sign up a new account under the personal iformation section you have to enter your date of birth, the problem is the text next to the entry box is in the format mm/dd/yyyy, it needs to be dd/mm/yyyy and i cant find it anywhere.

 

e.g.incorrect

Date of Birth: (eg. 05/21/1970)

 

correct

Date of Birth: (eg. 21/05/1970)

 

I need to do this as this is an Australian website and the Australian date format is different to the US format.

 

This is what is displayed in the address bar of my browser

http://localhost/oscommerce/catalog/create...16ea1d8d4efdac1

 

It says that the current page is create_account.php but i have looked through this page and cant find any text that says 05/21/1970.

Link to comment
Share on other sites

I went into catalog/create_account.php and found the lines

 

for ($i=1; $i<13; $i++) {

$dob_month_arr[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));

}

 

And moved them right above

 

for ($i=1; $i<32; $i++) {

$dob_day_arr[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i));

}

 

and that moved the day infront of the month on the page when creating an account so the person would see it correctly.

 

It does not effect the admin area though. When you go into customers and then edit the birthdates will be listed as month/day/year

 

Going to go look at the page and see if I can figure out how to change that, should be simple so if I figure it out I will be back. =)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Nope, I took a quick look but couldn't figure it out. I am not all that great at manipulating the database stuff, just how it shows up on the page.

 

It works on the customer side so if no one else has any ideas atleast you have that. Good luck =)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Go to /catalog/includes/languages/english.php

 

Look for:

 

// text for date of birth example
define('DOB_FORMAT_STRING', 'mm/dd/yyyy');

 

Replace with:

 

// text for date of birth example
define('DOB_FORMAT_STRING', 'dd/mm/yyyy');

 

Might have to do the same in /catalog/admin/includes/languages/english.php

 

HTH,

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

Boy that was a lot simpler than I thought it would be or what I did. lol Thank you Terry, going to remember that for the future. =)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

I don't know anyone personally but if you do a search in the forums for australia quite a few things come up... maybe you can find someone that way. Also if you do a search in the contributions for australia there are a bunch.

 

I came across this earlier incase something doesn't work with the quick changes. It covers everything.

 

http://www.oscommerce.com/forums/index.php?showtopic=142513&hl=

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

I went into catalog/create_account.php and found the lines

 

for ($i=1; $i<13; $i++) {

    $dob_month_arr[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));

}

 

And moved them right above

 

for ($i=1; $i<32; $i++) {

      $dob_day_arr[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i));

}

 

and that moved the day infront of the month on the page when creating an account so the person would see it correctly.

 

It does not effect the admin area though. When you go into customers and then edit the birthdates will be listed as month/day/year

 

Going to go look at the page and see if I can figure out how to change that, should be simple so if I figure it out I will be back. =)

 

Hey Wendy

 

I wasnt able to find those lines of code in catelog/create_account.php

 

was it in a different location?

 

Regards

Gavin McMillan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...