Hi guys
Is this a bug i done a test run bought the product checked out and then done a return. The return seems ok but my dashboard still says 1 sale and my stock was 12 before buy went to 11 when bought and even though i have done the return it still says 11. Do i have to manually edit the product and put it back to 12 ? Plus do i have to edit my database etc.
Please help because its the only thing i need to do before making my site live.
Is this a bug i done a test run bought the product checked out and then done a return. The return seems ok but my dashboard still says 1 sale and my stock was 12 before buy went to 11 when bought and even though i have done the return it still says 11. Do i have to manually edit the product and put it back to 12 ? Plus do i have to edit my database etc.
Please help because its the only thing i need to do before making my site live.
I think this is the correct way to d it because the return could have been faulty and you wouldn't want to re-sell a faulty product.
So, you have to manually check the item when it is returned and if it is ok, manually add it back to stock.
Seems the correct way to do it to me.
--
Might be nice if there was a button against each item on the return to be able to add it back to stock from there though
So, you have to manually check the item when it is returned and if it is ok, manually add it back to stock.
Seems the correct way to do it to me.
--
Might be nice if there was a button against each item on the return to be able to add it back to stock from there though
I thought that too, but the system has no way of knowing what order statuses do what, they are not fixed and can be edited/deleted.
However, as long as you know that you arent going to edit a certain order status then
edit admin/controller/common/home.php
find:
replace with:
find:
replace with:
find:
replace with:
find:
replace with:
This will mean only orders with the status of the following are counted:
Pending
Processing
Processed
Shipped
Complete
Alas nothing can be done about the customer count, well not unless a whole bunch of new functions are needed to check that they have ordered and that their orders are of a required status. (Over Kill)
vQmod file here if it helps:
However, as long as you know that you arent going to edit a certain order status then
edit admin/controller/common/home.php
find:
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND (DATE(date_added) = DATE(NOW()) AND HOUR(date_added) = '" . (int)$i . "') GROUP BY HOUR(date_added) ORDER BY date_added ASC");
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND order_status_id < '6' AND (DATE(date_added) = DATE(NOW()) AND HOUR(date_added) = '" . (int)$i . "') OR order_status_id = '15' AND (DATE(date_added) = DATE(NOW()) AND HOUR(date_added) = '" . (int)$i . "') GROUP BY HOUR(date_added) ORDER BY date_added ASC");
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND DATE(date_added) = '" . $this->db->escape($date) . "' GROUP BY DATE(date_added)");
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND order_status_id < '6' AND DATE(date_added) = '" . $this->db->escape($date) . "' OR order_status_id = '15' AND DATE(date_added) = '" . $this->db->escape($date) . "' GROUP BY DATE(date_added)");
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND (DATE(date_added) = '" . $this->db->escape($date) . "') GROUP BY DAY(date_added)");
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND order_status_id < '6' AND (DATE(date_added) = '" . $this->db->escape($date) . "') OR order_status_id = '15' AND (DATE(date_added) = '" . $this->db->escape($date) . "') GROUP BY DAY(date_added)");
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND YEAR(date_added) = '" . date('Y') . "' AND MONTH(date_added) = '" . $i . "' GROUP BY MONTH(date_added)");
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND order_status_id < '6' AND YEAR(date_added) = '" . date('Y') . "' AND MONTH(date_added) = '" . $i . "' OR order_status_id = '15' AND YEAR(date_added) = '" . date('Y') . "' AND MONTH(date_added) = '" . $i . "' GROUP BY MONTH(date_added)");
Pending
Processing
Processed
Shipped
Complete
Alas nothing can be done about the customer count, well not unless a whole bunch of new functions are needed to check that they have ordered and that their orders are of a required status. (Over Kill)
vQmod file here if it helps:
I uploaded your vQmod but my dashboard is still counting orders towards total sales that fall outside of the 0-6 and 15 order status ID... I checked my order status IDs in phpMyAdmin to verify.uksitebuilder wrote:
vQmod file here if it helps:
Is this vQmod supposed to stop orders that fall outside of order status 0-6 and 15 from showing up in total sales on the dashboard page? And if not what exactly does this vQmod do?
That is exactly wha it is supposed to do
Only test on OC 1.5.x though
Check your vQmod/vqcache folder to make sure the file is being written
Only test on OC 1.5.x though
Check your vQmod/vqcache folder to make sure the file is being written
I'm using OC 1.5.1.1 so maybe that's it.uksitebuilder wrote:That is exactly wha it is supposed to do
Only test on OC 1.5.x though
Check your vQmod/vqcache folder to make sure the file is being written
However the file is being written to my vqcache folder and there is no error generated on the vqmod.log file. And I checked the cache file and verified the code was replaced with your code.
Maybe something changed in OC 1.5.1.1 that is causing this vQmod not to work...
people, be careful what you are doing!
please do not bind the code to specific status ID's
rather give the statuses logical and configurable properties (is done, is cancelled, is in progress)
And while doing, think about that also order_products could have a status, so i dont have to delete an order_product a customer has ordered. I would rather cancel it!
please do not bind the code to specific status ID's
rather give the statuses logical and configurable properties (is done, is cancelled, is in progress)
And while doing, think about that also order_products could have a status, so i dont have to delete an order_product a customer has ordered. I would rather cancel it!
Not sure what you mean.
Please read the whole thread as this is a quick fix only for people who don't edit the default order statuses
For this to be a complete fix, then yes, the order statuses as are would need to be grouped into as you say, completed, cancelled etc and any new statuses added by the user would go into one of these groups.
However, the affected code is purely for the dashboard chart which currently doesn't work exactly by default unless you delete all non-live/non-complete orders
Please read the whole thread as this is a quick fix only for people who don't edit the default order statuses
For this to be a complete fix, then yes, the order statuses as are would need to be grouped into as you say, completed, cancelled etc and any new statuses added by the user would go into one of these groups.
However, the affected code is purely for the dashboard chart which currently doesn't work exactly by default unless you delete all non-live/non-complete orders
alright, as a fix this will work out alright.
in general, this is one of the largest problem i see with opencart....
Adding new features all the time is nice, but for a business application, some things might need a little more thinking.
in general, this is one of the largest problem i see with opencart....
Adding new features all the time is nice, but for a business application, some things might need a little more thinking.
Still not working even with your new vQmod file.
I'm not getting any errors in vqmod log file, the file is being written in my vqcache correctly, the lines of code are actually being replaced with your code, and my order status id's in mypHpAdmin are all correct.
All of my sales that fall outside of the 0-6 and 15 order ID status are still showing on my dashboard in the total sales figures. I refreshed my browser numerous times, cleared cache, F5, and all that jazz...
I'm not getting any errors in vqmod log file, the file is being written in my vqcache correctly, the lines of code are actually being replaced with your code, and my order status id's in mypHpAdmin are all correct.
All of my sales that fall outside of the 0-6 and 15 order ID status are still showing on my dashboard in the total sales figures. I refreshed my browser numerous times, cleared cache, F5, and all that jazz...
Leave it with me to fully test in 1.5.1.1
Seems really weird though.
Please check back tomorrow
I just re-read this thread over.
My vQmod only affects the chart display.
A lot more code is required to sort out the actual totals.
I have quickly looked in to it, but a lot of the methods/functions are used elsewhere within the admin.
It will take some work and if I'm going to do it, I will bear in mind the grouping of statuses mentioned above and do it properly.
My vQmod only affects the chart display.
A lot more code is required to sort out the actual totals.
I have quickly looked in to it, but a lot of the methods/functions are used elsewhere within the admin.
It will take some work and if I'm going to do it, I will bear in mind the grouping of statuses mentioned above and do it properly.
Well, if you decide you would like to take the time to develop this and turn it into a commercial mod I would totally buy it (provided it wasn't out of my budget ).
Who is online
Users browsing this forum: No registered users and 52 guests