Terra Posted November 8, 2006 Share Posted November 8, 2006 NEW VERSION RELEASE V2.3 has been posted: http://www.oscommerce.com/community/contributions,1393 KEY CHANGES -> Includes instructions on how to make shipdate optional -> Shows delivery date in admin order overview -> Allows exclusion of holidays -> Minor code cleaning & bug fixes 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. Thanx go to the ones who wrote & updated this contrib as well as to the ones who posted code on the support thread. Terra Quote 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 More sharing options...
stefbel99 Posted November 8, 2006 Share Posted November 8, 2006 Hello, First thanks for this helpfull contribution. I've installed it but unfortunately, the date doesn't get into the database. Everything looks fine until the checkout_confirmation page, where I still can find trace of the date, but nothing after. Is it because of the date format, does it explain anything ? Quote Link to comment Share on other sites More sharing options...
Terra Posted November 9, 2006 Share Posted November 9, 2006 (edited) Everything looks fine until the checkout_confirmation page, where I still can find trace of the date, but nothing after. Hi - can you give more info what you mean by "trace" (copy over text or provide screenshot if poss)? Plus, please confirm whether you are on a Linux server, what version of PHP/MySQL you are running and whether register globals is enabled. Terra Edited November 9, 2006 by Terra Quote 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 More sharing options...
smalto Posted November 9, 2006 Share Posted November 9, 2006 Hello Terra, Nice job for putting all the add on of the contrib together. Very helpful. Could you help me in two questions : in calendar.php the array has names in english : var $dayNames = array("S", "M", "T", "W", "T", "F", "S"); How could I test the language used by the customer and then give other inputs for the $dayNames (in french or german) ? So each client would see the calendar in their language. What would you suggest if you shipp in different countries ? How could we make the code use shipsched.php for 1 country or shipsched2.php for another country ? Maybe you could help...on my part I can do translation....unfortunately I am not a coder.... Cheers, smalto Quote oscommerce 2.2 ms1 with contrib - lilibikini.com - 2005 Link to comment Share on other sites More sharing options...
stefbel99 Posted November 9, 2006 Share Posted November 9, 2006 Hi - can you give more info what you mean by "trace" (copy over text or provide screenshot if poss)? Plus, please confirm whether you are on a Linux server, what version of PHP/MySQL you are running and whether register globals is enabled. Terra Yes, sorry for the approximative English, I used the wrong word. Linux server, PHP 5.0 - MySQL 4.1.20 In fact, checkout_shipping.php react properly, when i select a date, it appears below the calender, "Your order will arrive on November 18, 2006...." checkout_confirmation.php page is still ok, it seems like the pages keep track of the date ; but unfortunately, it stops here, no more arrival date in : account_history_info.php, or in admin/orders.php. When I look into the database, though the field "shipdate" exists, it remains empty. You may try it, the site is in test, protected by password which I can provide. By the way, thanks for considering my problem, Stephane Quote Link to comment Share on other sites More sharing options...
stefbel99 Posted November 9, 2006 Share Posted November 9, 2006 Ok, Over, problem solved, problem on the server side. I just had to wait. Now it works properly. I close my question, Thanks for this contribution again. Stephane Quote Link to comment Share on other sites More sharing options...
Terra Posted November 9, 2006 Share Posted November 9, 2006 in calendar.php the array has names in english : var $dayNames = array("S", "M", "T", "W", "T", "F", "S"); How could I test the language used by the customer and then give other inputs for the $dayNames (in french or german) ? So each client would see the calendar in their language. What would you suggest if you shipp in different countries ? How could we make the code use shipsched.php for 1 country or shipsched2.php for another country ? Hi Smalto - I'm sorry but I can't do any more work on this for now - had to use this contrib on a client site and thought I might as well tweak it a bit. To have the dates in different languages, you'd have to use Constants which are defined at language level. As for different countries .... you'd have to teach the calendar to recognise the shipping address country. Both mods would be useful but there's not enough hours in the day. Terra PS: the irony is that the calendar is still not working properly on my own site :'( can't teach the thing to recognise the valid delivery dates from today .... oh well. Quote 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 More sharing options...
Terra Posted November 9, 2006 Share Posted November 9, 2006 no more arrival date in : account_history_info.php, or in admin/orders.php. When I look into the database, though the field "shipdate" exists, it remains empty. Hi Stephane - glad it got sorted! Just in case anybody else has the same problem in the future, would be great if you can post what made it work. I'm assuming that the date was not written to the database (checkout uses session variables to store the date but account inf and admin pull the date from the database). Terra Quote 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 More sharing options...
smalto Posted November 9, 2006 Share Posted November 9, 2006 hello Terra, Ok I understand.... maybee someone else can answer those questions to a beginner....? The very begining for me would be to know how to set constants into an array.... If somebody has some time... Thanks Quote oscommerce 2.2 ms1 with contrib - lilibikini.com - 2005 Link to comment Share on other sites More sharing options...
midnightsun Posted December 11, 2006 Share Posted December 11, 2006 Hi, I'm having the same problems as other people. I can see the ship date under the calendar however after this I don't see it again. Any ideas what I might need to do? Many Thanks Quote Link to comment Share on other sites More sharing options...
sunny88 Posted December 11, 2006 Share Posted December 11, 2006 Hi, I'm having the same problems as other people. I can see the ship date under the calendar however after this I don't see it again. Any ideas what I might need to do? Many Thanks Hi all, This is a brilliant contribution by the way. However I am experiencing the same problem as others in this thread, in that the delivery date is NOT being recorded in the database. How is the store owner notified of this delivery date? I noticed that some people who have come across this problem were able to resolve it. Please share :) Many thanks, - Sunny. Quote Link to comment Share on other sites More sharing options...
acreswell Posted December 12, 2006 Share Posted December 12, 2006 Thanks for a very useful Contrib. I have an immediate need to make the Delivery Dates for dates after the New Year, i.e. 01/10/2007 and not before. Can I do that and how? Quote Link to comment Share on other sites More sharing options...
stefbel99 Posted December 12, 2006 Share Posted December 12, 2006 Hi all, This is a brilliant contribution by the way. However I am experiencing the same problem as others in this thread, in that the delivery date is NOT being recorded in the database. How is the store owner notified of this delivery date? I noticed that some people who have come across this problem were able to resolve it. Please share :) Many thanks, - Sunny. OK, To what I remember, I had a server problem, on which I couldn't act (it seems to be a file update problem) On another website, I didn't update all files and I forgot to upload certain other. I suggest to all the all having this problem to double check wether they did upload and update files. It should work. Regards, Stéphane Quote Link to comment Share on other sites More sharing options...
sunny88 Posted December 12, 2006 Share Posted December 12, 2006 OK,To what I remember, I had a server problem, on which I couldn't act (it seems to be a file update problem) On another website, I didn't update all files and I forgot to upload certain other. I suggest to all the all having this problem to double check wether they did upload and update files. It should work. Regards, Stéphane I've checked all the files I should update & upload, and all have been done. But still the same problem - the shipping date does not get written into the database. 1) Is anyone able to direct me to the php file where the shipdate actually gets written into the database. I can re-check this file just to make sure that there aren't any problems. 2) When I followed the installation instructions for "shipdate_2_3.zip", 2b) says to find: tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } Problem is - this statement occurs TWICE in the file, catalog/checkout_confirmation.php. Can anyone tell me which one (first or second instance), should be the one I should act on? 3) I have been using "shipdate_2_3.zip". Is there a later one? Where can I download "shipdate_2_3(2).zip". The latest I could find in the osCommerce website was "shipdate_2_3.zip". - Sunny. Quote Link to comment Share on other sites More sharing options...
sunny88 Posted December 12, 2006 Share Posted December 12, 2006 I've checked all the files I should update & upload, and all have been done. But still the same problem - the shipping date does not get written into the database. 1) Is anyone able to direct me to the php file where the shipdate actually gets written into the database. I can re-check this file just to make sure that there aren't any problems. 2) When I followed the installation instructions for "shipdate_2_3.zip", 2b) says to find: tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } Problem is - this statement occurs TWICE in the file, catalog/checkout_confirmation.php. Can anyone tell me which one (first or second instance), should be the one I should act on? 3) I have been using "shipdate_2_3.zip". Is there a later one? Where can I download "shipdate_2_3(2).zip". The latest I could find in the osCommerce website was "shipdate_2_3.zip". - Sunny. Also does it matter that the shipdate field is a varchar(10) type as opposed to a date type? I have checked this and re-checked everything. The date is definitely not being saved into the database under the field "shipdate". And when I go into phpAdmin and physically add a date to an order straight into the database, it displays with the date of Jan 01, 1970. Is anyone able to give me some pointers. Pretty please :'( Quote Link to comment Share on other sites More sharing options...
Terra Posted December 12, 2006 Share Posted December 12, 2006 (edited) 1) Is anyone able to direct me to the php file where the shipdate actually gets written into the database. I can re-check this file just to make sure that there aren't any problems.checkout_process.php - this file writes all order info to database. check how you implemented the manual changes from the installation instructions to make sure every comma & code is there, especially 'shipdate' => $_SESSION['shipdate'], 2) When I followed the installation instructions for "shipdate_2_3.zip", 2b) says to find: tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } Problem is - this statement occurs TWICE in the file, catalog/checkout_confirmation.php. Can anyone tell me which one (first or second instance), should be the one I should act on? The second (full code snippet is): // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } Also - the shipdate is included in the session variables - double-check that you did not forget a change on a page / file. It's easily done. I recommend printing out the install file & cross-checking every file. And finally - the db filed is varchar for a reason - it stores the date in UNIX time, i.e. the number of seconds since 1 January 1970. When you manually enter a date is therefore needs to be in seconds since 1/1/1970. Check out the wiki for more info: http://en.wikipedia.org/wiki/Unix_time Terra Edited December 12, 2006 by Terra Quote 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 More sharing options...
sunny88 Posted December 12, 2006 Share Posted December 12, 2006 checkout_process.php - this file writes all order info to database. check how you implemented the manual changes from the installation instructions to make sure every comma & code is there, especially 'shipdate' => $_SESSION['shipdate'], Thank Terra. I rechecked the file & its all there. I copy-pasted to ensure that there were no typing errors. I definitely have shipdate in the session variable during checkout, as after selecting the date from the calendar, as it displays correctly in both 'checkout_shipping.php' and 'checkout_confirmation.php'. After finding out from you which line of code actually does the write to the database, I did a simple test and changed: 'shipdate' => $_SESSION['shipdate'], to: 'shipdate' => $order->delivery['postcode'], as I knew delivery_postcode was being written in the database and I was curious to know if this postcode would then be written into the shipdate field of the database. I placed an order online, and checked out. The shipdate field is STILL EMPTY (should at least be populated with postcode)! The delivery_postcode field however still populates fine! Any other ideas on why I can't seem to write ANYTHING back to this shipdate field? Quote Link to comment Share on other sites More sharing options...
Terra Posted December 13, 2006 Share Posted December 13, 2006 The shipdate field is STILL EMPTY (should at least be populated with postcode)! The delivery_postcode field however still populates fine! Any other ideas on why I can't seem to write ANYTHING back to this shipdate field? The code change in checkout_process.php should be in the lines above this code: tep_db_perform(TABLE_ORDERS, $sql_data_array); $insert_id = tep_db_insert_id(); and should look something like this: $sql_data_array = array('customers_id' => $customer_id, [..... more values .....] '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'], 'currency_value' => $order->info['currency_value'], 'shipdate' => $_SESSION['shipdate']); tep_db_perform(TABLE_ORDERS, $sql_data_array); $insert_id = tep_db_insert_id(); Can't really think of anything else - if the value is in the array & the field is in the correct table in the db, then I really don't know what else could be wrong. Terra Quote 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 More sharing options...
midnightsun Posted December 14, 2006 Share Posted December 14, 2006 I'm pretty sure that my problem is related to the server. I was wondering if there is anything that might be not letting it work. On my local webserver it works fine and also on my web hosting it works however I have to use another server. Any ideas? Quote Link to comment Share on other sites More sharing options...
Terra Posted December 14, 2006 Share Posted December 14, 2006 On my local webserver it works fine and also on my web hosting it works however I have to use another server. Any ideas?It is Linux/Apache right? Unix time & Windows don't play nicely with each other. Terra Quote 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 More sharing options...
midnightsun Posted December 14, 2006 Share Posted December 14, 2006 hey, yeah it is, its apache 1.3 and php 4.3.10. would this cause problems? Quote Link to comment Share on other sites More sharing options...
Terra Posted December 14, 2006 Share Posted December 14, 2006 yeah it is, its apache 1.3 and php 4.3.10. would this cause problems? No - that should be fine. As it's server specific, have you tried asking the hosting provider / server admin? The usual things I'd investigate are register globals (on/off), security settings .. anything which differs between the servers. Terra Quote 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 More sharing options...
sunny88 Posted December 14, 2006 Share Posted December 14, 2006 The code change in checkout_process.php should be in the lines above this code: tep_db_perform(TABLE_ORDERS, $sql_data_array); $insert_id = tep_db_insert_id(); and should look something like this: $sql_data_array = array('customers_id' => $customer_id, [..... more values .....] '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'], 'currency_value' => $order->info['currency_value'], 'shipdate' => $_SESSION['shipdate']); tep_db_perform(TABLE_ORDERS, $sql_data_array); $insert_id = tep_db_insert_id(); Can't really think of anything else - if the value is in the array & the field is in the correct table in the db, then I really don't know what else could be wrong. Terra Terra - I managed to get it going. Because I'm using PayPal, I needed to make these ammendments to the PayPal module file. Everything works fine now! Many thanks for all your help. Quote Link to comment Share on other sites More sharing options...
msnyla27 Posted December 14, 2006 Share Posted December 14, 2006 I loaded this contribution, but when I place an order it makes that product I ordered inactive. Is this coding or something else. NEW VERSION RELEASE V2.3 has been posted: http://www.oscommerce.com/community/contributions,1393 KEY CHANGES -> Includes instructions on how to make shipdate optional -> Shows delivery date in admin order overview -> Allows exclusion of holidays -> Minor code cleaning & bug fixes 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. Thanx go to the ones who wrote & updated this contrib as well as to the ones who posted code on the support thread. Terra Quote Link to comment Share on other sites More sharing options...
midnightsun Posted December 20, 2006 Share Posted December 20, 2006 I think it might be to do with the tmp folder. Where should this normally be? 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.