View Full Version : Default Delivery Date
smiffy
12-Feb-2003, 07:25 AM
Under V5 the default delivery date would always default to todays date.
I was able to modify the Shopping Cart.pl file and add +1 to the day value as most of my products ship over night.
In my test V6 site the default date is default to 1st Jan 2000 - does anybody know how I can change this to today?
cdicken
13-Feb-2003, 10:55 AM
The best solution I can give you at the moment is to wait until the next maintenance release of the software (due in a few weeks) where the date drop-downs will work again as they did in v5.
Sorry about the hassle caused.
Perfect Eye
09-Nov-2004, 04:20 PM
Just bringing this thread back to life with a query.
Currently when you click on a product in our store the delivery date option is defaulting to 1 January 2004. Is it possible to change this so it displays todays date? (customers can get same day or next day delivery). It seems a little odd if the customer can pick a date in the past. Any tips guys? Thanks a lot.
smiffy
09-Nov-2004, 07:02 PM
Just bringing this thread back to life with a query.
Currently when you click on a product in our store the delivery date option is defaulting to 1 January 2004. Is it possible to change this so it displays todays date? (customers can get same day or next day delivery). It seems a little odd if the customer can pick a date in the past. Any tips guys? Thanks a lot.
Is this a V6 problem still?
Perfect Eye
09-Nov-2004, 08:22 PM
Yes it is a v.6 thing. We got the CD ROM off of our client who bought version 6 a while ago, so we have to work with that. Is there a known prob relating to this issue?
TraceyG
11-Nov-2004, 03:09 PM
Hi,
You cannot use 'Quantity on Product Page' as the shopping mode if you want to default to todays date. 'Quantity on Confirmation Page' defaults to todays date as standard - this has been the same through previous versions of actinic. If you want to use 'Quantity in Shopping Cart' as your shopping mode then you will need to make a change to the ShoppingCart.pl file (found in your site folder).
Open this file in a text editor and search for:
# Date prompt?
You should see:
if ($bDateExists)
{
my $sYear = $::g_InputHash{"Y_" . $ProductRef};
my $sMonth = $::g_InputHash{"M_" . $ProductRef};
my $sDay = $::g_InputHash{"DAY_" . $ProductRef};
Add the following after the above:
if ($sYear eq "")
{
my $now = time;
my @now = gmtime($now);
$sDay = $now[3];
$sMonth = $now[4] + 1;
$sYear = $now[5] + 1900;
}
Save and close the file and update the site.
To set it to tomorrows date:
- for 'Quantity on Confirmation Page', in the same .pl file, search for:
$Date[0] = $now[3];
and change it to:
$Date[0] = $now[3] + 1;
- for 'Quantity in Shopping Cart', search for:
$sDay = $now[3];
and change it to:
$sDay = $now[3] + 1;
The 'Quantity on Product Page' is not generated from a perl script so cannot be changed.
Perfect Eye
12-Nov-2004, 08:32 AM
Hi, thanks for the code Tracey, i tried implementing the code so that todays date is displayed in the shopping cart but it only changed the day number and not the month, so its half solved which is progress, any other additions/pointers?
TraceyG
12-Nov-2004, 02:31 PM
Hi,
Hmm, this is very strange. When I tested it yesterday I am positive that it worked. I've just tried it again and it doesn't :( . I've put it back through to the development team and will post as soon as I hear from them.
TraceyG
16-Nov-2004, 08:02 AM
Hi,
Sorry but there is a slight mistake in the above code. I will set it out again, for the 'Quantity in Shopping Cart' mode so you may want to replace your ShoppingCart.pl file from the 'c:\program files\actinic ecommerce v6\Original' folder and then re-apply the following changes:
Search for '# Date prompt?' and you should see:
if ($bDateExists)
{
my $sYear = $::g_InputHash{"Y_" . $ProductRef};
my $sMonth = $::g_InputHash{"M_" . $ProductRef};
my $sDay = $::g_InputHash{"DAY_" . $ProductRef};
$sMonth = $::g_MonthMap{$sMonth};
Add the following directly after the above:
if ($sYear eq "")
{
my $now = time;
my @now = gmtime($now);
$sDay = $now[3];
$sMonth = $now[4] + 1;
$sYear = $now[5] + 1900;
}
To make the default tomorrow, in the above, change...
$sDay = $now[3];
to...
$sDay = $now[3] + 1;
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.