AM/PM-Girl Posted November 28, 2007 Share Posted November 28, 2007 Hi,you must do the following ADMIN 3 files change: 1) admin/orders.php Find this: for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { echo ' <tr>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> ------------------------------------------------------------------------------------------------ and after add this: <?php //M if (isset($order->delivery['shipdate'])){ ?> <tr> <td class="main"><b><?php echo TEXT_ARRIVAL_DATE; ?></b></td> </tr> <tr> <td class="main"><?php echo date("l, F j, Y",$order->delivery['shipdate']); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php } ?> ******************************************************************************** *************** 2) admin/clases/order.php Find this: function query($order_id) { ------------------------------------------------------------------------------------------------ and after replace this: $order_query = tep_db_query("select 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 from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); for this: $order_query = tep_db_query("select customers_name, shipdate, 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 from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); ******************************************************************************** **************** Find this: 'country' => $order['delivery_country'], ------------------------------------------------------------------------------------------------ and after add this: 'shipdate' => $order['shipdate'], ******************************************************************************** **************** LANGUAGES, do the same for each language: 3) admin/english/orders.php Find this: define('WARNING_ORDER_NOT_UPDATED', 'Warning: Nothing to change. The order was not updated.'); ----------------------------------------------------------------------------------------------- and after add this: define('TEXT_ARRIVAL_DATE','Shipment Arrival Date'); and it will be OK Thank you for your help. On step 2) admin/clases/order.php I do not have that file - do you mean admin/includes/clases/order.php insted? **Also I have tired to alter the delivery calendar. I do not want it to allow customers to chose delivery on Saturday, and Sunday AND if they place their order after 4pm on Thursday it will only allow them to sechedule Monday as the Next earliest delivery day. I believe I have changed everything correclty but it still allows customers to chose saturday. Thank you for your help T Quote Link to comment Share on other sites More sharing options...
AM/PM-Girl Posted November 29, 2007 Share Posted November 29, 2007 I have modified the ADMIN/ORDERS.php File and have added DELIVERY DATE right after the DATE PURCHASED on the Customer Orders Page View. When I add the following code (arround line 400) the DELIVERY DATE will show Wednesday December31, 1969. <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td> <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td> <td class="dataTableContent" align="center"><?php echo date("l, F j, Y",$order->delivery['shipdate']); ?></td> <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td> Now using the same code (arround line 270) <?php echo tep_datetime_short($orders['date_purchased']); ?> I get the Correct Delivery Date on each of the individual Order Details Page. I am stumped and after many hours of working on it my eyes are starting to bleed. Anyone have any ideas on how to fix this??? One more small request. I do not want it to allow customers to chose delivery on Saturday, and Sunday AND if they place their order after 4pm on Thursday it will only allow them to sechedule Monday as the Next earliest delivery day. I believe I have changed everything correclty in the code but it still allows customers to chose saturday. Again stumped! Please please please help me before I go insane.... Is it bad to beg? T Quote Link to comment Share on other sites More sharing options...
jicedel Posted November 29, 2007 Share Posted November 29, 2007 I have modified the ADMIN/ORDERS.php File and have added DELIVERY DATE right after the DATE PURCHASED on the Customer Orders Page View. When I add the following code (arround line 400) the DELIVERY DATE will show Wednesday December31, 1969. <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td> <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td> <td class="dataTableContent" align="center"><?php echo date("l, F j, Y",$order->delivery['shipdate']); ?></td> <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td> Now using the same code (arround line 270) <?php echo tep_datetime_short($orders['date_purchased']); ?> I get the Correct Delivery Date on each of the individual Order Details Page. I am stumped and after many hours of working on it my eyes are starting to bleed. Anyone have any ideas on how to fix this??? One more small request. I do not want it to allow customers to chose delivery on Saturday, and Sunday AND if they place their order after 4pm on Thursday it will only allow them to sechedule Monday as the Next earliest delivery day. I believe I have changed everything correclty in the code but it still allows customers to chose saturday. Again stumped! Please please please help me before I go insane.... Is it bad to beg? T Hi again, Earliest delivery days and valid days for delivery are configured in the shipsched.php file. open it with notepad an do the changes ( there is one line per day) regards Quote Link to comment Share on other sites More sharing options...
AM/PM-Girl Posted November 29, 2007 Share Posted November 29, 2007 Hi again, Earliest delivery days and valid days for delivery are configured in the shipsched.php file. open it with notepad an do the changes ( there is one line per day) regards Thank you for the reply. That is the file that I have modified and it is still showing availability for a Saturday shipment. Like I said I am stumped as to why it is not working. Any Ideas on why it is still allowing it? Also any ideas on how to fix the December 31. 1969 issue that I posted above? <td class="dataTableContent" align="center"><?php echo date("l, F j, Y",$order->delivery['shipdate']); ?> I appreciate the all the help.. T Quote Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2007 Share Posted December 3, 2007 Also any ideas on how to fix the December 31. 1969 issue that I posted above? <td class="dataTableContent" align="center"><?php echo date("l, F j, Y",$order->delivery['shipdate']); ?> I've encounter a similar problem of getting Deccember 31, 1969 as the delivery date. But the strange thing is, I do get the correct delivery date on my "checkout_shipping.php" & "checkout_confirmation.php", but not on my "account_history_info.php" & "orders.php". I've checked and double checked my files, can't seem to find the problem. Any idea how to fix this??? Quote Link to comment Share on other sites More sharing options...
Guest Posted December 6, 2007 Share Posted December 6, 2007 I've encounter a similar problem of getting Deccember 31, 1969 as the delivery date. But the strange thing is, I do get the correct delivery date on my "checkout_shipping.php" & "checkout_confirmation.php", but not on my "account_history_info.php" & "orders.php". I've checked and double checked my files, can't seem to find the problem. Any idea how to fix this??? Does anybody know how to fix this "December 31, 1969" issue?? Attached are the related files, can somebody please point out to me where my problems are. :D Below is what I have on my "catalog/checkout_shipping.php" file, cut & paste with only sections involving "shipdate": //M if (!isset($_SESSION['shipdate'])) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error=no_arrival_date', 'SSL')); //ERR MSG HERE // If no month/year set, use current month/year if (!isset($_GET['month'])){ $month=(isset($_SESSION['shipdate'])) ? date("n",$_SESSION['shipdate']) : date("n"); }else{ $month=$_GET['month']; } if (!isset($_GET['year'])){ $year=(isset($_SESSION['shipdate'])) ? date("Y",$_SESSION['shipdate']) : date("Y"); }else{ $year=$_GET['year']; } require('includes/classes/calendar.php'); $cal = new MyCalendar; echo $cal->getMonthView($month, $year); if(isset($_GET['date'])){ echo TEXT_YOUR_ARRIVAL_DATE . ' ' . date('l, F j, Y',$_GET['date']); $_SESSION['shipdate']=$_GET['date']; }elseif(!isset($_GET['date']) && isset($_SESSION['shipdate'])){ echo TEXT_YOUR_ARRIVAL_DATE . ' ' . date('l, F j, Y',$_SESSION['shipdate']); } ?></td> Below is what I have on my "catalog/checkout_confirmation.php" file, cut & paste with only sections involving "shipdate": // if no shipping method has been selected or no shipdate, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping') || !tep_session_is_registered('shipdate')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } //M require(DIR_WS_CLASSES . 'shipsched.php'); $shipsched=new ShippingSchedule; if(!$shipsched->DateStillValid($_SESSION['shipdate'])){ unset($_SESSION['shipdate']); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error=expired_arrival_date', 'SSL')); //ERR MSG ON NEXT PAGE } <td class="main"><?php echo '<b>' . 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 TEXT_YOUR_ARRIVAL_DATE . ' ' . date('l, F j, Y',$order->delivery['shipdate']); ?></td> </tr> Below is what I have on my "catalog/checkout_process.php" file, cut & paste with only sections involving "shipdate": //M require(DIR_WS_CLASSES . 'shipsched.php'); $shipsched=new ShippingSchedule; if(!$shipsched->DateStillValid($_SESSION['shipdate'])){ unset($_SESSION['shipdate']); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error=expired_arrival_date', 'SSL')); //ERR MSG ON NEXT PAGE } $sql_data_array = array('customers_id' => $customer_id, 'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'], 'customers_company' => $order->customer['company'], 'customers_street_address' => $order->customer['street_address'], 'customers_suburb' => $order->customer['suburb'], 'customers_city' => $order->customer['city'], 'customers_postcode' => $order->customer['postcode'], 'customers_state' => $order->customer['state'], 'customers_country' => $order->customer['country']['title'], 'customers_telephone' => $order->customer['telephone'], 'customers_email_address' => $order->customer['email_address'], 'customers_address_format_id' => $order->customer['format_id'], 'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 'delivery_company' => $order->delivery['company'], 'delivery_street_address' => $order->delivery['street_address'], 'delivery_suburb' => $order->delivery['suburb'], 'delivery_city' => $order->delivery['city'], 'delivery_postcode' => $order->delivery['postcode'], 'delivery_state' => $order->delivery['state'], 'delivery_country' => $order->delivery['country']['title'], 'delivery_address_format_id' => $order->delivery['format_id'], 'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'billing_company' => $order->billing['company'], 'billing_street_address' => $order->billing['street_address'], 'billing_suburb' => $order->billing['suburb'], 'billing_city' => $order->billing['city'], 'billing_postcode' => $order->billing['postcode'], 'billing_state' => $order->billing['state'], 'billing_country' => $order->billing['country']['title'], 'billing_address_format_id' => $order->billing['format_id'], 'payment_method' => $order->info['payment_method'], 'cc_type' => $order->info['cc_type'], 'cc_owner' => $order->info['cc_owner'], 'cc_number' => $order->info['cc_number'], 'cc_expires' => $order->info['cc_expires'], 'date_purchased' => 'now()', 'orders_status' => $order->info['order_status'], 'currency' => $order->info['currency'], 'shipdate' => $_SESSION['shipdate'], 'currency_value' => $order->info['currency_value']); if(isset($_SESSION["shipdate"]))$email_order.="\n" . EMAIL_TEXT_ARRIVAL_DATE . "\n" . EMAIL_SEPARATOR . "\n" . date('l, F j, Y',$_SESSION["shipdate"]) . "\n\n"; //M tep_session_unregister('shipdate'); tep_session_unregister('quotes_array_cartID'); Below is what I have on my "catalog/account_history_info.php" file, cut & paste with only sections involving "shipdate": <?php if (isset($order->delivery['shipdate'])){ ?> <tr> <td class="main"><b><?php echo HEADING_ARRIVAL_DATE; ?></b></td> </tr> <tr> <td class="main"><?php echo date('l, F j, Y',$order->delivery['shipdate']); ?></td> </tr> Below is what I have on my "catalog/includes/classes/calendar.php" file, cut & paste with only sections involving "shipdate": 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; } Below is what I have on my "catalog/includes/classes/order.php" file, cut & paste with only sections involving "shipdate": $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 . "'"); $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']); $this->delivery = array('firstname' => $shipping_address['entry_firstname'], 'lastname' => $shipping_address['entry_lastname'], 'company' => $shipping_address['entry_company'], 'street_address' => $shipping_address['entry_street_address'], 'suburb' => $shipping_address['entry_suburb'], 'city' => $shipping_address['entry_city'], 'postcode' => $shipping_address['entry_postcode'], 'state' => ((tep_not_null($shipping_address['entry_state'])) ? $shipping_address['entry_state'] : $shipping_address['zone_name']), 'zone_id' => $shipping_address['entry_zone_id'], 'country' => array('id' => $shipping_address['countries_id'], 'title' => $shipping_address['countries_name'], 'iso_code_2' => $shipping_address['countries_iso_code_2'], 'iso_code_3' => $shipping_address['countries_iso_code_3']), 'country_id' => $shipping_address['entry_country_id'], 'shipdate' => $_SESSION['shipdate'], 'format_id' => $shipping_address['address_format_id']); Below is what I have on my "catalog/includes/classes/shipsched.php" file, cut & paste with only sections involving "shipdate": function DateStillValid($shipdate){ if(!isset($this->earliest_date))$this->EarliestArrival(); $result=($this->earliest_date>$shipdate) ? false : true; return $result; } Below is what I have on my "catalog/admin/orders.php" file, cut & paste with only sections involving "shipdate": <?php //M if (isset($order->delivery['shipdate'])){ ?> <tr> <td class="main"><b><?php echo TEXT_ARRIVAL_DATE; ?></b></td> <td class="main"><?php echo date("l, F j, Y",$order->delivery['shipdate']); ?></td> </tr> <?php } ?> Below is what I have on my "catalog/admin/includes/classes/order.php" file, cut & paste with only sections involving "shipdate": function query($order_id) { $order_query = tep_db_query("select 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 . "'"); $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']); Quote Link to comment Share on other sites More sharing options...
beddo Posted December 9, 2007 Share Posted December 9, 2007 I came back to this as my customer requested the ability to exclude holidays. Thankfully I see the functionality has already been written in. I did however notice it was in a bit of a complicated way. So I changed it :) Previously in order to add a new date, you would have to create a variable for it, then create a stamp variable, then add it to the array creation. Now all you have to do is add it to one variable and your sorted. I've dropped off all the old dates too as they're in the past. catalog/includes/classes/shipsched.php ************************* Replace This ************************* $xmas06 = '2006-12-25'; $boxing06 = '2006-12-26'; $newyear = '2007-01-01'; $goodfriday = '2007-04-06'; $easter = '2007-04-09'; $mayday = '2007-05-07'; $pentecost = '2007-05-28'; $augustbh = '2007-08-28'; $xmas = '2007-12-25'; $boxingday = '2007-12-26'; //Ende eintragen //change date to timestamp $xmas06_stamp = strtotime ($xmas06); $boxing06_stamp = strtotime ($boxing06); $newyear_stamp = strtotime ($newyear); $goodfriday = strtotime ($goodfriday); $easter_stamp = strtotime ($easter); $mayday_stamp = strtotime ($mayday); $pentecost_stamp = strtotime ($pentecost); $augustbh_stamp = strtotime ($augustbh); $xmas_stamp = strtotime ($xmas); $boxingday = strtotime ($boxingday); //construct an array of timestamps $special_date = array ("$xmas06_stamp", "$boxing06_stamp", "$newyear_stamp", "$goodfriday", "$easter_stamp", "$mayday_stamp", "$pentecost_stamp", "$augustbh_stamp", "$xmas_stamp", "$boxingday"); ************************* With This ************************* //preset dates $newyear = '2008-01-01'; $xmas = '2007-12-25'; $boxingday = '2007-12-26'; //To add additional dates, simply include them as another option for the array, ie: // $special_date = array ("$newyear", "$xmas", "$boxingday", "2008-02-02") $special_dates = array ("$newyear", "$xmas", "$boxingday"); $special_date = array(); //construct an array of timestamps $i = 0; foreach ($special_dates as $value) { $special_date[$i] = strtotime($value); $i++; } unset($value); unset($i); Quote Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2007 Share Posted December 17, 2007 (edited) Thank you for the reply. That is the file that I have modified and it is still showing availability for a Saturday shipment. Like I said I am stumped as to why it is not working. Any Ideas on why it is still allowing it? Hello :) I know how to set this up, but it's interesting trying to figure out how to tell you to do it LOL :blink: I'll just paste the relevant bits from shipsched.php and try to explain: $this->schedule[0]=array('start_time'=>0,'target_day'=>1); So, schedule[0] is Sunday's schedule -> start time is 0 (midnight), target_day -> 1 (which is Monday) ... So any orders placed from Midnight Saturday will not be shipped until Monday. So Saturday, (schedule[6]) would have to be set up the same way... $this->schedule[6]=array('start_time'=>0,'target_day'=>1); Hope it helps... Edited December 17, 2007 by LeViSioN Quote Link to comment Share on other sites More sharing options...
bengalliboy Posted February 24, 2008 Share Posted February 24, 2008 Ship date is really a great contribution. However I need to have the time option too. My store customer need to pick a time set by admin. Has any 1 done this? Can some one help me ? Thanks a lot Hello,I've just posted a new contribution, my first! Shipdate v0.1 http://www.oscommerce.com/community/contributions,1393 This contribution adds the capability to specify the date that customers' shipments should arrive on. Specific features include: -Configuration of earliest day for delivery based on date/time of an order. -Valid days for delivery are displayed and selected on a dynamic PHP calendar on the checkout_shipping page. -Prior to final order confirmation and processing, the program checks to see if the shipdate is still valid. (in case somebody leaves their computer on one screen for days) -Storage of the information in the database and display on all standard screens. If you install this contribution it will make the selection of an arrival date mandatory with each order. REQUIREMENTS: -PHP 4.1.0 and up, for this initial version I used the $_SESSION variable. Sorry! I'll try to fix things up later. -OSCommerce MS1... with no prior mods involving the files I use here, unless you want to edit manually. Quote Link to comment Share on other sites More sharing options...
bengalliboy Posted February 24, 2008 Share Posted February 24, 2008 Hey Salvo I need the same thing. Have you got it working or do you have the code for ship date and Time? Thanks a lot Hi all Has anybody created the shipdate and TIME of delivery? Quote Link to comment Share on other sites More sharing options...
gterbeek Posted March 12, 2008 Share Posted March 12, 2008 (edited) Hi guys, i am installing the contribution (V2.3) on OScommerce 2.2MS-2d , but encounter the following problem: at the end of the installation instruction i have to find and replace some code in : admin/includes/languages/english/orders.php This file does not exist however !? (By the way: ignoring this part of the installation gives: 1054 - Unknown column 'shipdate' in 'field list') help anyone ? Edited March 12, 2008 by gterbeek Quote Link to comment Share on other sites More sharing options...
bpmcclure Posted March 12, 2008 Share Posted March 12, 2008 Hey SalvoI need the same thing. Have you got it working or do you have the code for ship date and Time? Thanks a lot Hi all, Another looking for date and time of delivery, sort of like you see on a rental car site, where you choose your date and then pic a time from a drop down. Anyone got this working? Thanks, Bruce Quote Link to comment Share on other sites More sharing options...
bengalliboy Posted March 13, 2008 Share Posted March 13, 2008 Hi all, Another looking for date and time of delivery, sort of like you see on a rental car site, where you choose your date and then pic a time from a drop down. Anyone got this working? Thanks, Bruce Bruce, I am paying some one to do this for me. He is using Zen and It is under development. Thanks Quote Link to comment Share on other sites More sharing options...
bpmcclure Posted March 13, 2008 Share Posted March 13, 2008 Bruce,I am paying some one to do this for me. He is using Zen and It is under development. Thanks That may be the only way to go at this point. I'd be interested in how it works out once done: may want to buy the code! Thanks, Bruce Quote Link to comment Share on other sites More sharing options...
bpmcclure Posted March 15, 2008 Share Posted March 15, 2008 Hi all, I installed the 2.3 version, and had some problems. The issue at the moment seems to be in catalog/checkout_process.php. The instructions say to find this code: EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n"; But that code does not exist in my file. I have: EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . without the "\n"; at the end of the line. Since that was the only line I could find, I pasted the code after it per the instructions. But when I run it, I get; Parse error: syntax error, unexpected T_IF in /home/supper5/public_html/os/checkout_process.php on line 269, which is the line after the one I found above where I pasted: if(isset($_SESSION["shipdate"])) { $email_order.="\n" . EMAIL_TEXT_ARRIVAL_DATE . "\n" . EMAIL_SEPARATOR . "\n" . date('l, F j, Y',$_SESSION["shipdate"]) . "\n\n"; } Think there are other issues too, since I tried to process an order without selecting a date and got no error message, just kicked back to that page, but I'll deal with that later. Anyone run into this before? Thanks, Bruce Quote Link to comment Share on other sites More sharing options...
Guest Posted June 17, 2008 Share Posted June 17, 2008 Hi, This contribution looks brilliant but I have one question - Can I set it to show a different calender depending on the customer, we aim to sell to a select few clients and their staff will puchase our products but we would like to offer each client different delivery dates, these would be specific calender dates and not days of the week (at present). ie once they have input their company name can this be used to provide the relevent calendar? Thanks Quote Link to comment Share on other sites More sharing options...
scouti Posted March 23, 2009 Share Posted March 23, 2009 I would like the date on German. Is it to be worked possible with this code? Use then the variable according to. only what? // Translate day names english/german $day = substr($this->date, 0, strpos($this->date, " ")); $day_english = $day; switch($day) { case "Monday" : $day_german = "Montag"; break; case "Tuesday" : $day_german = "Dienstag"; break; case "Wednesday" : $day_german = "Mittwoch"; break; case "Thursday" : $day_german = "Donnerstag"; break; case "Friday" : $day_german = "Freitag"; break; case "Saturday" : $day_german = "Samstag"; break; case "Sunday" : $day_german = "Sonntag"; break; } $date = str_replace($day_english, $day_german . ", den", $this->date); Quote Link to comment Share on other sites More sharing options...
scouti Posted March 25, 2009 Share Posted March 25, 2009 can none help? Gladly this problem for all would solve on German. Quote Link to comment Share on other sites More sharing options...
scouti Posted March 27, 2009 Share Posted March 27, 2009 Hello, can one insert this code? All this in German indicates? How can one adapt - shipdate? <?php // Beginn Datum und Wochentag $name_tag[0] = "Sonntag"; $name_tag[1] = "Montag"; $name_tag[2] = "Dienstag"; $name_tag[3] = "Mittwoch"; $name_tag[4] = "Donnerstag"; $name_tag[5] = "Freitag"; $name_tag[6] = "Samstag"; $name_monat[1] = "Januar"; $name_monat[2] = "Februar"; $name_monat[3] = "März"; $name_monat[4] = "April"; $name_monat[5] = "Mai"; $name_monat[6] = "Juni"; $name_monat[7] = "Juli"; $name_monat[8] = "August"; $name_monat[9] = "September"; $name_monat[10] = "Oktober"; $name_monat[11] = "November"; $name_monat[12] = "Dezember"; $num_tag = date("w"); $num_monat = date("m"); $test = substr($num_monat,0,1); if ($test == "0") { $num = substr($num_monat,1,1); $num_monat = $num; } $jahr = date("Y"); $tag_zahl = date("d"); $tag = $name_tag[$num_tag]; $monat = $name_monat[$num_monat]; // Ende Datum und Wochentag ?> Quote Link to comment Share on other sites More sharing options...
davidboon Posted November 9, 2009 Share Posted November 9, 2009 (edited) Hi, This shipdate is really a great contribution. But iam in need of shipping time to select by the customer inaddition to the date. Can you please suggest the solution for this..... Thanks in advance...... Hello, I've just posted a new contribution, my first! Shipdate v0.1 http://www.oscommerce.com/community/contributions,1393 This contribution adds the capability to specify the date that customers' shipments should arrive on. Specific features include: -Configuration of earliest day for delivery based on date/time of an order. -Valid days for delivery are displayed and selected on a dynamic PHP calendar on the checkout_shipping page. -Prior to final order confirmation and processing, the program checks to see if the shipdate is still valid. (in case somebody leaves their computer on one screen for days) -Storage of the information in the database and display on all standard screens. If you install this contribution it will make the selection of an arrival date mandatory with each order. REQUIREMENTS: -PHP 4.1.0 and up, for this initial version I used the $_SESSION variable. Sorry! I'll try to fix things up later. -OSCommerce MS1... with no prior mods involving the files I use here, unless you want to edit manually. Edited November 9, 2009 by davidboon Quote Link to comment Share on other sites More sharing options...
monkeybytes Posted September 9, 2010 Share Posted September 9, 2010 (edited) Smashing contribution thus far. How would I alter shipping availability for: 1) Same day if ordered before 10am? 2) Next day if ordered before 5pm? Edited September 9, 2010 by monkeybytes Quote Link to comment Share on other sites More sharing options...
monkeybytes Posted September 9, 2010 Share Posted September 9, 2010 http://addons.oscommerce.com/info/6178 <?php echo (date("G") <= 10)) ? "minDate: '0d'," : "minDate: '1d',"; ?> Different contribution than the one originally posted. Above code -should- (untested!) do it on 6178. Thanks. Is this in conjunction with the Shipdate addon? Quote Link to comment Share on other sites More sharing options...
monkeybytes Posted September 9, 2010 Share Posted September 9, 2010 It would be for a different contribution and the code I gave is wrong I think; <?php echo (date("G") <= 9)) ? "minDate: '0d'," : "minDate: '1d',"; ?> So anything up to 9:59am will be same day selectable. Derp, you're right. Much appreciated. I'll look into this one. Quote Link to comment Share on other sites More sharing options...
monkeybytes Posted September 16, 2010 Share Posted September 16, 2010 It would be for a different contribution and the code I gave is wrong I think; <?php echo (date("G") <= 9)) ? "minDate: '0d'," : "minDate: '1d',"; ?> So anything up to 9:59am will be same day selectable. I've added in your shipping date calender (jQuery is always awesome), and your snippet of code is exactly what I was looking for. Thanks for this excellent piece of code. Quote Link to comment Share on other sites More sharing options...
monkeybytes Posted September 16, 2010 Share Posted September 16, 2010 Do you, by any chance, have an extension that allows me to select the time of delivery as well? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.