|
order managment javascript code change |
Post Reply |
Author | |
lleemon
Groupie Joined: March/16/04 Location: United States Status: Offline Points: 41 |
Post Options
Thanks(0)
Posted: June/01/04 at 6:39am |
Not sure if this is just our order managment pages or not. Today is the 1st and when you go into Control Panel/Manage Orders/Purchase orders ...... you view 'Order Retrieval' with a bunch of sections. The top one 'by Date' has Today, Yesterday, 2 days Ago, and 3 days Ago option buttons. On the first few days of each month your javascript may not provide the proper date if you select anything other then Today. I have found some code online that may help and I will provide what I have.
Will, can you give some feedback on if you also have this same issue and if this will work? If anyone finds issues with this please provide some feedback for everyone that uses this. -page with javascript: shop/online/3_order.asp -javascript function: AddDay <code> function AddDay(xdays){ var now = new Date() var day = now.getDate() - xdays var month = now.getMonth() + 1 var year = now.getYear() var dateValue = "" + month + "/" + day + "/" + year //Start of new code if (day < 1){ // original source code from http://developer.irt.org/script/1127.htm var today = new Date(); var MonthDays = new Array(31,28,31,30,31,30,31,31,30,31,30,31); theYear = today.getYear(); if (theYear < 1000) theYear +=1900; StartOfThisYear = new Date(theYear,0,1); EndOfThisYear = new Date(theYear,11,31); StartOfLastYear = new Date(theYear-1,0,1); EndOfLastYear = new Date(theYear-1,11,31); if (today.getMonth()==0) { StartOfLastMonth = new Date(theYear-1,11,1); EndOfLastMonth = new Date(theYear-1,11,MonthDays[11]); } else { StartOfLastMonth = new Date(theYear,today.getMonth()-1,1); LastMonth = today.getMonth()-1; DaysInLastMonth = MonthDays[LastMonth]; if (LastMonth == 1) { // February if (theYear%400==0 || (theYear%4 == 0 && theYear%100!=0) ) DaysInLastMonth +=1; } EndOfLastMonth = new Date(theYear,today.getMonth()-1,DaysInLastMonth); } //Recalculating date now = EndOfLastMonth day = now.getDate() - xdays + 1 month = now.getMonth() + 1 year = now.getYear() dateValue = "" + month + "/" + day + "/" + year } //End of new code return dateValue; } </code>   ; |
|
Techno Geek
Admin Group Evil monkey living in my closet! Joined: March/11/04 Location: United States Status: Offline Points: 1206 |
Post Options
Thanks(0)
|
I believe the issue has been addressed. Please submit a support ticket and we'll send you the appropriate files.
This was a bug in the order management so the revised files are provided upon request. |
|
Techno Geek
Customer Support Engineer ComCity and SalesCart Technical Support |
|
lleemon
Groupie Joined: March/16/04 Location: United States Status: Offline Points: 41 |
Post Options
Thanks(0)
|
Will,
Thanks for the response. I looked at the support page and looks like you only provide support for 60 days. What url are you referring to when you say a support ticket? This was just one issue that was fixed. I imagine that others have been fixed as well. Can we get those as well or do we have to pay for them? Just wondering what the process is. Plus, could be a major pain since we may have coded for a lot of these already. Do you also provide what code has changed for us developers that do add-ons to your purchased code? Thanks |
|
Techno Geek
Admin Group Evil monkey living in my closet! Joined: March/11/04 Location: United States Status: Offline Points: 1206 |
Post Options
Thanks(0)
|
Actually if it is a bug within the code you get it for free. The only thing that you would need to do is send in the support request and we would give you the files.
As long as you have the current version of the cart, you would have the current files. |
|
Techno Geek
Customer Support Engineer ComCity and SalesCart Technical Support |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |