Snarg Posted December 12, 2013 Posted December 12, 2013 Hello, I live in Washington state and we use a location based sales tax. It's a giant pain in the neck however, some time ago a contrib was developed to help out. It's an old contrib originally developed for 2.2rc2 however, it seems to work OK with 2.3.3.4. I have a fairly clean test install of 2.3.3.4 and am using FWR's KissER Error Handling & Debugging to help chase down problems. I have installed the WA State Destination-based Sales Tax v2.2f found here: http://addons.oscommerce.com/info/6013/ Everything seems to be working as it should with a few minor exceptions. When you open up the report the formatting is off (I'll try and work on that later) and KissER spews up a couple errors. The errors are: Error: Undefined index: month File: wa_taxes_report.php Line: 23 Error: Undefined index: year File: wa_taxes_report.php Line: 35 Error: Undefined index: status File: wa_taxes_report.php Line: 63 Error: Use of undefined constant BOX_WIDTH - assumed 'BOX_WIDTH' File: wa_taxes_report.php Line: 98 I'm fairly certain the last error is the cause of the formatting ugliness but, like I said, I'll work on that later. The top two errors seems to deal with the date. The section of code causing the problems resides in catalog/admin/wa_taxes_report.php. The code looks like this: //set up the date if ($_GET['month'] == '') { $month = date('m'); }else{ $month = $_GET['month']; } if ($month != 555) { $tmonth = " AND month(o.date_purchased) = " . $month . " "; }else{ $tmonth = ''; } if ($_GET['year'] == '') { $year = date('Y'); }else{ $year = $_GET['year']; } The code for the third error looks like this: $status = (int)$_GET['status']; I have done some reading on $_GET and to be honest, I don't really know what it's supposed to be doing. So, I humbly hang my hat and turn to the user base of this fine forum in the hopes that someone will be able to guide me in the proper direction. Thank you in advance.
MrPhil Posted December 12, 2013 Posted December 12, 2013 Is BOX_WIDTH still defined for osC 2.3? I'm not sure it is -- you may have to define it for the add-on. $_GET contains anything in a URI's "Query String". If you have .../page.php?var1=val1&var2=val2, $_GET['var1'] will be 'val1' and $_GET['var2'] will be 'val2'. If there is no 'status' element (from status=... in the URI), you'll get an error message.
Snarg Posted December 12, 2013 Author Posted December 12, 2013 @@MrPhil Thanks for your reply. Sorry to waste your time however, had I done a bit more trial and error I would have solved the issue on my own. The report has some year/month drop downs. When the report is first generated the values are not filled and you have an empty URI, hence the errors. Once the values are filled in a proper URI is created and there are no errors. I still have the issue of crappy formatting, but that is possibly an issue for a different thread. Thank you for your assistance.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.