Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipdate contribution (shipping arrival date)


Guest

Recommended Posts

  • 2 weeks later...
In addition, an integration guide for PayPal IPN (official osCom PayPal IPN v1.4) has been included.

 

Full package but I have not included full file versions, only the update instructions.

 

 

Which do I need to install before installing this update? Thanks in advance.

Link to comment
Share on other sites

Which do I need to install before installing this update? Thanks in advance.
Not sure what you mean - just open the contribution package & read the install instructions. The PayPal IPN obviously only applies if you are using that contribution in your shop. Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

hey there, i just did the install on a vanilla ms2, thing is, when i go to create a product, i dont see any shipdate anywhere. am i missing something?

Shipdate has nothing to do with creating products - it's a checkout function. Log into your own shop as customer and go through checkout to test it. And no - there is no way for each product to have a different delivery date. At least not with this contribution. Terra

Edited by Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

Hi all

 

Has anybody created the shipdate and TIME of delivery?

 

 

Sorry if I post again this request. Had anybody added the delivery time to the shipping date?

 

If not, is anybody willing to help me to achieve this?

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

This contribution is great! Everything seems to work well. But, I am receiving a little error. This is only because I am selling downloadable items. When you enable the download feature, it appears that no shipedate is sent because one is not needed. On all traditional items that need to be mailed, the module is working great!

 

Thanks!!!

Jose Carlos

Link to comment
Share on other sites

  • 4 weeks later...
I cannot get the correct date to show in the account history page, it has the default of Thursday, January 1, 1970. Shows up fine everywhere else, can someone help please.

I've got it working on a live customer site so the good news it can work! I'd advise to check the following:

 

on account_history.php you should have some code like this:

echo date("l, F j, Y",$order->delivery['shipdate'])

 

This ties in with /includes/classes/order.php - You must make sure that you correctly amended this file! For the problem at hand check the following:

 

the function must have the shipdate added to the mysql query:

function query($order_id) {
  global $languages_id;

  $order_id = tep_db_prepare_input($order_id);

$order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified, shipdate from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
  $order = tep_db_fetch_array($order_query);

 

and it also needs to be included a bit further down in the array:

 

$this->delivery = array('name' => $order['delivery_name'],
						  'company' => $order['delivery_company'],
						  'street_address' => $order['delivery_street_address'],
						  'suburb' => $order['delivery_suburb'],
						  'city' => $order['delivery_city'],
						  'postcode' => $order['delivery_postcode'],
						  'state' => $order['delivery_state'],
						  'country' => $order['delivery_country'],
						  'shipdate' => $order['shipdate'],
						  'format_id' => $order['delivery_address_format_id']);

 

Your problem seems to indicate that shipdate is empty (the date you have is the start of unix time, the equivalent of 0).

 

all the best - Terra

My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad)

and how to solve the invoice already paid error

General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email **

Link to comment
Share on other sites

I've just installed Shipdate v2.3 and I dont see the shipdate on the checkout_confirmation.php. Is there anyway to include the shipdate on the confirmation page ??

 

the problem is in the install instructions step 2B

the correction should be the following

Find this:

if ($order->info['shipping_method']) {
?>
		  <tr>
			<td class="main"><?php echo '<b>' . HEADING_SHIPPING_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo $order->info['shipping_method']; ?></td>
		  </tr>
<?php 
}
and after add this:

 if (tep_not_null($order->delivery['shipdate'])){
?>
		  <tr>
							<td class="main"><b><?php echo HEADING_ARRIVAL_DATE . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo date("l, F j, Y",$order->delivery['shipdate']); ?></td>
		  </tr>
<?php
 }

 

Done! now it should show on the confirmation page

 

Also, I need help, I don't know how to add more the one arrive date, because I'm not in professional PHP programmer.

if anyone can give a hand, I preciate your help ;)

Edited by ohiyo777
Link to comment
Share on other sites

Cool thanks alot ohiyo. I've been looking into the posibility of added another calendar onto my website, i'm planning on a rental website and was wandering if anyone can provide some sort of help of adding another calendar for end of rental date ??

 

Thanks !!!

 

the problem is in the install instructions step 2B

the correction should be the following

Find this:

if ($order->info['shipping_method']) {
?>
		  <tr>
			<td class="main"><?php echo '<b>' . HEADING_SHIPPING_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo $order->info['shipping_method']; ?></td>
		  </tr>
<?php 
}
and after add this:

 if (tep_not_null($order->delivery['shipdate'])){
?>
		  <tr>
							<td class="main"><b><?php echo HEADING_ARRIVAL_DATE . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo date("l, F j, Y",$order->delivery['shipdate']); ?></td>
		  </tr>
<?php
 }

 

Done! now it should show on the confirmation page

 

Also, I need help, I don't know how to add more the one arrive date, because I'm not in professional PHP programmer.

if anyone can give a hand, I preciate your help ;)

Link to comment
Share on other sites

I have installed Shipdate v2.3, everything was working fine untill we've moved to a new hosting provider. Register_globals is enabled, while safe_mode settings where disabled.

 

What happens is when you want to checkout, checkout_shipping.php is showing only the headertext Delivery-information and select an arrival date, rest of the page's stays empty without any warnings.

 

Contribution is build in correctly, was working with the old host, took the whole site down to a local environment and shipdate is still working there also. To enable our customers to checkout without shipdate I temporary replaced the checkout_shipping.php and checkout_confirmation.php with a version from before the implementation.

 

I can simulate the sitution locally without replacing any checkout_shipping or checkout_confirmation file by edit the includes/classes/calendar.php (just remove a ';' at the end of some code). Therefore I believe some code in this file needs to be changed to work with the new server environment. Probably the date format or something is causing the problems.

 

Here's my code for calendar.php, does somebody know what to change to let Shipdate work again?:

 

<?

// PHP Calendar Class Version 1.4 (5th March 2001)

//

// Copyright David Wilkinson 2000 - 2001. All Rights reserved.

//

// This software may be used, modified and distributed freely

// providing this copyright notice remains intact at the head

// of the file.

//

// This software is freeware. The author accepts no liability for

// any loss or damages whatsoever incurred directly or indirectly

// from the use of this script. The author of this software makes

// no claims as to its fitness for any purpose whatsoever. If you

// wish to use this software you should first satisfy yourself that

// it meets your requirements.

//

// URL: http://www.cascade.org.uk/software/php/calendar/

// Email: [email protected]

 

//Modifications and additions for the OSCommerce contribution ShipDate by Matt Plummer

//7/28/03

 

require('shipsched.php');

function GetLine($exclude_vars=array()) {

$result='';

if(isset($_GET)){

$revised_gets=array_key_diff($_GET,$exclude_vars);

foreach($revised_gets as $key=>$get){

$result.= '&' . $key . '=' . $get;

}

}

return $result;

}

function array_key_diff($ar1, $ar2) {

// returns copy of array $ar1 with those entries removed

// whose keys appear as keys in any of the other function args

 

$aSubtrahends = array_slice(func_get_args(),1);

foreach ($ar1 as $key => $val)

if (in_array($key, $ar2))

unset ($ar1[$key]);

return $ar1;

}

 

class Calendar

{

/*

Constructor for the Calendar class

*/

function Calendar()

{

}

function getClass(){

return "";

}

 

/*

Get the array of strings used to label the days of the week. This array contains seven

elements, one for each day of the week. The first entry in this array represents Sunday.

*/

function getDayNames()

{

return $this->dayNames;

}

 

/*

Set the array of strings used to label the days of the week. This array must contain seven

elements, one for each day of the week. The first entry in this array represents Sunday.

*/

function setDayNames($names)

{

$this->dayNames = $names;

}

 

/*

Get the array of strings used to label the months of the year. This array contains twelve

elements, one for each month of the year. The first entry in this array represents January.

*/

function getMonthNames()

{

return $this->monthNames;

}

 

/*

Set the array of strings used to label the months of the year. This array must contain twelve

elements, one for each month of the year. The first entry in this array represents January.

*/

function setMonthNames($names)

{

$this->monthNames = $names;

}

 

 

 

/*

Gets the start day of the week. This is the day that appears in the first column

of the calendar. Sunday = 0.

*/

function getStartDay()

{

return $this->startDay;

}

 

/*

Sets the start day of the week. This is the day that appears in the first column

of the calendar. Sunday = 0.

*/

function setStartDay($day)

{

$this->startDay = $day;

}

 

 

/*

Gets the start month of the year. This is the month that appears first in the year

view. January = 1.

*/

function getStartMonth()

{

return $this->startMonth;

}

 

/*

Sets the start month of the year. This is the month that appears first in the year

view. January = 1.

*/

function setStartMonth($month)

{

$this->startMonth = $month;

}

 

 

/*

Return the URL to link to in order to display a calendar for a given month/year.

You must override this method if you want to activate the "forward" and "back"

feature of the calendar.

 

Note: If you return an empty string from this function, no navigation link will

be displayed. This is the default behaviour.

 

If the calendar is being displayed in "year" view, $month will be set to zero.

*/

function getCalendarLink($month, $year)

{

return "";

}

 

/*

Return the URL to link to for a given date.

You must override this method if you want to activate the date linking

feature of the calendar.

 

Note: If you return an empty string from this function, no navigation link will

be displayed. This is the default behaviour.

*/

function getDateLink($day, $month, $year)

{

return "";

}

 

 

/*

Return the HTML for the current month

*/

function getCurrentMonthView()

{

$d = getdate(time());

return $this->getMonthView($d["mon"], $d["year"]);

}

 

 

/*

Return the HTML for the current year

*/

function getCurrentYearView()

{

$d = getdate(time());

return $this->getYearView($d["year"]);

}

 

 

/*

Return the HTML for a specified month

*/

function getMonthView($month, $year)

{

return $this->getMonthHTML($month, $year);

}

 

 

/*

Return the HTML for a specified year

*/

function getYearView($year)

{

return $this->getYearHTML($year);

}

 

 

 

/********************************************************************************

 

The rest are private methods. No user-servicable parts inside.

 

You shouldn't need to call any of these functions directly.

 

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

*/

 

 

/*

Calculate the number of days in a month, taking into account leap years.

*/

function getDaysInMonth($month, $year)

{

if ($month < 1 || $month > 12)

{

return 0;

}

 

$d = $this->daysInMonth[$month - 1];

 

if ($month == 2)

{

// Check for leap year

// Forget the 4000 rule, I doubt I'll be around then...

 

if ($year%4 == 0)

{

if ($year%100 == 0)

{

if ($year%400 == 0)

{

$d = 29;

}

}

else

{

$d = 29;

}

}

}

 

return $d;

}

 

 

/*

Generate the HTML for a given month

*/

function getMonthHTML($m, $y, $showYear = 1)

{

$s = "";

 

$a = $this->adjustDate($m, $y);

$month = $a[0];

$year = $a[1];

 

$daysInMonth = $this->getDaysInMonth($month, $year);

$date = getdate(mktime(12, 0, 0, $month, 1, $year));

 

$first = $date["wday"];

$monthName = $this->monthNames[$month - 1];

 

$prev = $this->adjustDate($month - 1, $year);

$next = $this->adjustDate($month + 1, $year);

 

if ($showYear == 1)

{

$prevMonth = $this->getCalendarLink($prev[0], $prev[1]);

$nextMonth = $this->getCalendarLink($next[0], $next[1]);

}

else

{

$prevMonth = "";

$nextMonth = "";

}

 

$header = $monthName . (($showYear > 0) ? " " . $year : "");

 

$s .= "<table class=\"calendar\">\n";

$s .= "<tr>\n";

$s .= "<td align=\"center\" valign=\"top\">" . (($prevMonth == "") ? " " : "<a href=\"$prevMonth\"><<</a>") . "</td>\n";

$s .= "<td align=\"center\" valign=\"top\" class=\"calendarHeader\" colspan=\"5\">$header</td>\n";

$s .= "<td align=\"center\" valign=\"top\">" . (($nextMonth == "") ? " " : "<a href=\"$nextMonth\">>></a>") . "</td>\n";

$s .= "</tr>\n";

 

$s .= "<tr>\n";

$s .= "<td align=\"center\" valign=\"top\" class=\"calendarHeader\">" . $this->dayNames[($this->startDay)%7] . "</td>\n";

$s .= "<td align=\"center\" valign=\"top\" class=\"calendarHeader\">" . $this->dayNames[($this->startDay+1)%7] . "</td>\n";

$s .= "<td align=\"center\" valign=\"top\" class=\"calendarHeader\">" . $this->dayNames[($this->startDay+2)%7] . "</td>\n";

$s .= "<td align=\"center\" valign=\"top\" class=\"calendarHeader\">" . $this->dayNames[($this->startDay+3)%7] . "</td>\n";

$s .= "<td align=\"center\" valign=\"top\" class=\"calendarHeader\">" . $this->dayNames[($this->startDay+4)%7] . "</td>\n";

$s .= "<td align=\"center\" valign=\"top\" class=\"calendarHeader\">" . $this->dayNames[($this->startDay+5)%7] . "</td>\n";

$s .= "<td align=\"center\" valign=\"top\" class=\"calendarHeader\">" . $this->dayNames[($this->startDay+6)%7] . "</td>\n";

$s .= "</tr>\n";

 

// We need to work out what date to start at so that the first appears in the correct column

$d = $this->startDay + 1 - $first;

while ($d > 1)

{

$d -= 7;

}

 

// Make sure we know when today is, so that we can use a different CSS style

$today = getdate(time());

 

while ($d <= $daysInMonth)

{

$s .= "<tr>\n";

 

for ($i = 0; $i < 7; $i++)

{

 

 

if ($d > 0 && $d <= $daysInMonth)

{

$class = $this->getClass($d,$month,$year);

$s .= "<td $class align=\"right\" valign=\"top\">";

$link = $this->getDateLink($d, $month, $year);

$s .= (($link == "") ? $d : "<a href=\"$link\">$d</a>");

}

else

{

$class = 'class="invalid"';

$s .= "<td $class align=\"right\" valign=\"top\">";

$s .= " ";

}

 

$s .= "</td>\n";

$d++;

}

$s .= "</tr>\n";

}

 

$s .= "</table>\n";

 

return $s;

}

 

 

/*

Generate the HTML for a given year

*/

function getYearHTML($year)

{

$s = "";

$prev = $this->getCalendarLink(0, $year - 1);

$next = $this->getCalendarLink(0, $year + 1);

 

$s .= "<table class=\"calendar\" border=\"0\">\n";

$s .= "<tr>";

$s .= "<td align=\"center\" valign=\"top\" align=\"left\">" . (($prev == "") ? " " : "<a href=\"$prev\"><<</a>") . "</td>\n";

$s .= "<td class=\"calendarHeader\" valign=\"top\" align=\"center\">" . (($this->startMonth > 1) ? $year . " - " . ($year + 1) : $year) ."</td>\n";

$s .= "<td align=\"center\" valign=\"top\" align=\"right\">" . (($next == "") ? " " : "<a href=\"$next\">>></a>") . "</td>\n";

$s .= "</tr>\n";

$s .= "<tr>";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(0 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(1 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(2 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "</tr>\n";

$s .= "<tr>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(3 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(4 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(5 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "</tr>\n";

$s .= "<tr>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(6 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(7 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(8 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "</tr>\n";

$s .= "<tr>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(9 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(10 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "<td class=\"calendar\" valign=\"top\">" . $this->getMonthHTML(11 + $this->startMonth, $year, 0) ."</td>\n";

$s .= "</tr>\n";

$s .= "</table>\n";

 

return $s;

}

 

/*

Adjust dates to allow months > 12 and < 0. Just adjust the years appropriately.

e.g. Month 14 of the year 2001 is actually month 2 of year 2002.

*/

function adjustDate($month, $year)

{

$a = array();

$a[0] = $month;

$a[1] = $year;

 

while ($a[0] > 12)

{

$a[0] -= 12;

$a[1]++;

}

 

while ($a[0] <= 0)

{

$a[0] += 12;

$a[1]--;

}

 

return $a;

}

 

/*

The start day of the week. This is the day that appears in the first column

of the calendar. Sunday = 0.

*/

var $startDay = 0;

 

/*

The start month of the year. This is the month that appears in the first slot

of the calendar in the year view. January = 1.

*/

var $startMonth = 1;

 

/*

The labels to display for the days of the week. The first entry in this array

represents Sunday.

*/

var $dayNames = array("Z", "M", "D", "W", "D", "V", "Z");

 

/*

The labels to display for the months of the year. The first entry in this array

represents January.

*/

var $monthNames = array("Januari", "Februari", "Maart", "April", "Mei", "Juni",

"Juli", "Augustus", "September", "Oktober", "November", "December");

 

 

/*

The number of days in each month. You're unlikely to want to change this...

The first entry in this array represents January.

*/

var $daysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);

 

}

class MyCalendar extends Calendar

{

var $ship_sched;

function MyCalendar(){

$this->ship_sched=new ShippingSchedule;

}

function getCalendarLink($month, $year){

 

// Redisplay the current page, but with some parameters

// to set the new month and year

$exclude_vars[]=(isset($_GET['month'])) ? 'month' : '';

$exclude_vars[]=(isset($_GET['year'])) ? 'year' : '';

 

 

$s = $_SERVER['PHP_SELF'];

return "$s?month=$month&year=$year" . GetLine($exclude_vars);

}

 

function getDateLink($day, $month, $year){

$datestamp=mktime(0,0,0,$month,$day,$year);

$exclude_vars[]=(isset($_GET['date'])) ? 'date' : '';

 

$date_info=$this->ship_sched->DateInfo($datestamp);

$link = $date_info['valid'] ? $_SERVER['PHP_SELF'] . '?date=' . $datestamp . GetLine($exclude_vars) : '';

 

return $link;

}

function getClass($day,$month,$year){

$datestamp=mktime(0,0,0,$month,$day,$year);

$date_info=$this->ship_sched->DateInfo($datestamp);

 

$class='class="' . $date_info['class'] . '"';

if(isset($_GET['date']) && $datestamp==$_GET['date']){

$class.=' id="selected"';

}elseif(!isset($_GET['date']) && isset($_SESSION['shipdate'])){

if($_SESSION['shipdate']==$datestamp)$class.=' id="selected"';

}

return $class;

}

}

?>

Link to comment
Share on other sites

Great mod! Two items I'm working on at the moment:

 

 

Does anyone know how to sort admin/orders.php by the shipdate?

 

 

Also, if anyone has the Manual Order Entry mod installed, have you figured out a way to add this field/function to admin/edit_orders.php?

 

 

 

Thanks for any and all help!

Link to comment
Share on other sites

  • 4 weeks later...
Great mod! Two items I'm working on at the moment:

Does anyone know how to sort admin/orders.php by the shipdate?

Also, if anyone has the Manual Order Entry mod installed, have you figured out a way to add this field/function to admin/edit_orders.php?

Thanks for any and all help!

 

Hello, I placed a shipdate field in the edit_order php. The problem is that I do not know the function that formats the date string. Try to use the code that I put down here and you will see the shipdate field in the edit_orders.php, but if you try to change it, you will get a different date. I have try to put the calendar in the edit:orders.php, but it does not insert any value to the mysql. And I wonder if anybody have done it.

 

In admin/includes/classes/oe_order.php add

CODE

'shipdate' => $order['shipdate'],

on a new line after

CODE

'orders_status' => $order['orders_status'],

 

 

Then in admin/edit_orders.php add

CODE

shipdate = '" . tep_db_input(tep_db_prepare_input($_POST['update_info_shipdate'])) . "',

on a new line after

CODE

cc_expires = '" . tep_db_input(tep_db_prepare_input($_POST['update_info_cc_expires'])) . "',

 

 

Next add

CODE

<tr class="dataTableRow">

<td class="dataTableContent" valign="middle" align="right">Shipdate: </td>

<td colspan="3" valign="top" class="dataTableContent"><input name='update_info_shipdate' size='35' value='<?php echo $order->info['shipdate']; ?>'></td>

</tr>

after

CODE

<tr class="dataTableRow">

<td class="dataTableContent" valign="middle" align="right"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>

<td colspan="3" valign="top" class="dataTableContent"><input name='update_customer_email_address' size='35' value='<?php echo $order->customer['email_address']; ?>'></td>

</tr>

Link to comment
Share on other sites

Hello everybody,

 

For those who have an ecommerce with several languages you surely want to have the dates in the different languages also. So here how to perform

 

Go to the files of the contribution where you will find the echo for the date like :

 

date("l, F j, Y",$_SESSION["shipdate"])

 

and replace this code with :

 

strftime("%A %d %B %Y",$_SESSION["shipdate"])

 

this will give you the date in french, german, english or what ever language you use.

 

Good luck.

 

smalto

oscommerce 2.2 ms1 with contrib - lilibikini.com - 2005

Link to comment
Share on other sites

  • 1 month later...

Hi all,

 

I installed the shipdate module and it worked fine for about a week. Now, I am getting this error:

 

Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway : Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway

 

Its a part of the UPS XML module, but that has been working for a while and is also installed on another site which is still working fine.

 

And the last thing I installed for the non-functional site is this shipdate contribution.

 

Please suggest anything, its a live site.

 

Thanks in advance,

a8le

Thuan Nguyen

Link to comment
Share on other sites

Hello everybody,

 

For those who have an ecommerce with several languages you surely want to have the dates in the different languages also. So here how to perform

 

Go to the files of the contribution where you will find the echo for the date like :

 

date("l, F j, Y",$_SESSION["shipdate"])

 

and replace this code with :

 

strftime("%A %d %B %Y",$_SESSION["shipdate"])

 

this will give you the date in french, german, english or what ever language you use.

 

Good luck.

 

smalto

 

 

Dear smalto,

 

First thanks for your language contribution,

 

But I can not install after many ours of work,

 

I find only one file similar that your indication as:

 

date("l, F j, Y",$_SESSION["shipdate"])

 

 

FILES:

 

1) catalog/checkout_confirmation.php

 

date("l, F j, Y",$order->delivery['shipdate']) (appeared)

 

2)catalog/checkout_process.php

 

date('l, F j, Y',$_SESSION["shipdate"]) (equal)

 

3)catalog/checkout_shipping.php:

 

date('F j, Y',$_SESSION['shipdate']) (appeared)

 

4)admin/orders.php:

 

date("l, F j, Y",$order->delivery['shipdate']) (appeared)

 

 

Please, in what o these files do I nedd to change for : strftime("%A %d %B %Y",$_SESSION["shipdate"])

 

 

Thanks in advance,

 

Sincerely yours Nelson

Link to comment
Share on other sites

Hello everybody,

 

For those who have an ecommerce with several languages you surely want to have the dates in the different languages also. So here how to perform

 

Go to the files of the contribution where you will find the echo for the date like :

 

date("l, F j, Y",$_SESSION["shipdate"])

 

and replace this code with :

 

strftime("%A %d %B %Y",$_SESSION["shipdate"])

 

this will give you the date in french, german, english or what ever language you use.

 

Good luck.

 

smalto

 

 

Dear smalto,

 

First thanks for your language contribution,

 

But I can not install after many ours of work,

 

I find only one file similar that your indication as:

 

date("l, F j, Y",$_SESSION["shipdate"])

 

 

FILES:

 

1) catalog/checkout_confirmation.php

 

date("l, F j, Y",$order->delivery['shipdate']) (appeared)

 

2)catalog/checkout_process.php

 

date('l, F j, Y',$_SESSION["shipdate"]) (equal)

 

3)catalog/checkout_shipping.php:

 

date('F j, Y',$_SESSION['shipdate']) (appeared)

 

4)admin/orders.php:

 

date("l, F j, Y",$order->delivery['shipdate']) (appeared)

 

 

Please, in what o these files do I nedd to change for : strftime("%A %d %B %Y",$_SESSION["shipdate"])

 

 

Thanks in advance,

 

Sincerely yours Nelson

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...