with regards to jim's 2nd statement, i find it highly unlikely that the script is where it is supposed to be. if it was, then the 404 error could be caused by a .htaccess rule or a apache server configuration issue, or something like that. but the odds of that being the case are highly unlikely....
as your admin directory is compromised, i would agree that you should rename it (and change your config file if using v139 or older)
with regards to your specific problem, i think you are probably uploading the files into the wrong directory. i would re-read the install very carefully and try again. the script that the system is complaining about is no doubt part of the plug-in, and you have probably uploaded that file into the wrong spot. which probably means other files are also uploaded incorrectly. just a guess...
good luck!
Hey all! I'm running Zencart 1.5.4 with Sales Report 3.1.0 and I'm wondering how I can add a "payment method" heading to the report. I have experience with programming but this is my first Zencart site so I'm still finding my way around. Any help would be much appreciated! Great module btw :)
I guess the easy answer would be to modify the PAGE_HEADING in admin/includes/languages/english/stats_sales_report.php. Or, to get fancier, you could modify admin/stats_sales_report.php. Search for where PAGE_HEADING is written out and put a little php logic around it - if $payment_method != false then use it as part of the page header.
Hope this helps...
So I took what you suggested and stretched it a bit, I almost have it working but I cant seem to populate that column with the payment_method data. For the total's column I copied the code for the num_products as that's fine for that purpose. I've screen caped my report output as well as the section of code that I think populates the table. Please, any help would be awesome! I'll continue working on this and I figure it out i'll be sure to post the solution.
![]()
you need to modify:
YOUR_ADMIN/includes/classes/sales_report.php
from the look of your screen shots, i'm guessing you need to modify the build_li_orders function. here is the function and i've attempted to highlight in red what i think the change would be to address this issue:
your other code should then correctly get the payment method. i hope!Code:function build_li_orders($oID, $field, $value) { $id = $this->timeframe_id; // first check to see if we even need to do anything if ($this->detail_level == 'order' || $this->detail_level == 'matrix') { // create the array if it doesn't already exist if (!is_array($this->timeframe[$id]['orders'][$oID]) ) { $this->timeframe[$id]['orders'][$oID] = array('oID' => $oID, // the $oID key will be reset when we sort the array at // display, so we store it as a part of the array as well 'goods' => 0, 'num_products' => 0, 'diff_products' => array(), 'shipping' => 0, 'goods_tax' => 0, 'order_recorded_tax' => 0, 'discount' => 0, 'discount_qty' => 0, 'gc_sold' => 0, 'gc_sold_qty' => 0, 'gc_used' => 0, 'gc_used_qty' => 0, 'grand' => 0, 'order_total_validation' => '' ); // get the customer data global $db; $c_data = $db->Execute("select c.*, o.payment_method from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS . " o where o.customers_id = c.customers_id and o.orders_id = '" . $oID . "' limit 1"); $customers_id = $c_data->fields['customers_id']; $first_name = zen_db_output($c_data->fields['customers_firstname']); $last_name = zen_db_output($c_data->fields['customers_lastname']); $this->timeframe[$id]['orders'][$oID]['customers_id'] = $customers_id; $this->timeframe[$id]['orders'][$oID]['first_name'] = $first_name; $this->timeframe[$id]['orders'][$oID]['last_name'] = $last_name; $this->timeframe[$id]['orders'][$oID]['payment_method'] = $c_data->fields['payment_method']; } // add the passed $value to the passed $field in the ['orders'] array if ($field != 'order_total_validation') { $this->timeframe[$id]['orders'][$oID][$field] += $value; } else { $this->timeframe[$id]['orders'][$oID][$field] = $value; } } }
good luck!
That was exactly it! Thanks so much, this is an awesome module and I'm glad we get to keep it.
I'm using different tax classes and I was wondering, is there a way you could see the sales separately. At this moment the system counts them all together, but I would like to able to see them separately.
Like:
I sell item thats 5,5£ (tax 10%) and other one that's 100£ (tax 24).
The systems shows total 24,50£, but I would need it to show it like 0,50£ and 24£.
I would like to add / edit to limit the sales report to certain categories.
Any ideas?
Bookmarks