Reset products purchased and sales

Issues when installing or upgrading AlegroCart
fruitbat
Posts: 23
Joined: Mon Oct 07, 2013 11:21 pm
Location: Australia

Reset products purchased and sales

Post by fruitbat » Fri Dec 18, 2015 4:38 pm

I would like to reset both the "Products Purchased" and the "Sales" data to zero. I have used the SQL query in another topic (UPDATE `product` SET `viewed` = '0';) to reset the "Products Viewed" data and was wondering if I can also do the same to the other two using a SQL query please? One reason for doing this is that the data now looks to be incorrect, possibly due to the upgrade.

Additionally, I set the product availability date to a few weeks in the future to allow time to send out a newsletter to notify my customers that new products will be available on a certain date. I have done this before with V1.2.8 and the website made those products available immediately after the time passes midnight at the server location. I did this with V1.2.9 recently and found that the products did not become active and I had to go through Admin and manually change the "date available" to a date in the past to have them become available. I believe the problem lay with the server time in this instance but it would be better if I could specify the available "time" as well. Is this possible in a future update please?

Overall, 1.2.9 is doing great and I really appreciate the min/max setting as this has saved me heaps of headaches ;)

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Reset products purchased and sales

Post by leo » Sat Dec 19, 2015 5:04 am

Product purchased and the sales report are based on your orders. So, if you delete your orders, your reports will be reset.
Anyway the upgrade couldn't have influence on these data.

As for your second issue, will you check it please that the product will be active in 24 hours (so, the date you set in admin + 1 day) at all?

fruitbat
Posts: 23
Joined: Mon Oct 07, 2013 11:21 pm
Location: Australia

Re: Reset products purchased and sales

Post by fruitbat » Sat Dec 19, 2015 3:31 pm

Thanks Leo. I'm not keen on deleting all my sales figures but may do that to start fresh. I rechecked the figures and noticed that the data was from two years instead of two months so after changing the dates and doing another search, it seemed to then be correct. I will keep an eye on it though and perhaps delete orders as mentioned.

I have set one product to update today (midnight at the server) and will check it at 4:30pm local time as we are 16.5 hours ahead of the server. I'm starting to wonder if the server was being adjusted for daylight saving time when the products were to be updated. Anyway, I will see what happens this afternoon and if there is still a problem I'll let you know.

Thanks for the quick reply, as usual. :D

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Reset products purchased and sales

Post by Brent » Tue Dec 22, 2015 9:31 am

Have you set time zone in admin settings to your location.

fruitbat
Posts: 23
Joined: Mon Oct 07, 2013 11:21 pm
Location: Australia

Re: Reset products purchased and sales

Post by fruitbat » Tue Dec 22, 2015 5:29 pm

Hi Brent. Yes, the time zone is correct. I changed one product to update "today" and after calculating the time difference between the server and locally, I determined that a 00:00 server time update would be at 16:30 here. Although I was not able to check the product at exactly 16:30, it had become available when I did check it at 17:15 that day. (there is a 16.5 hour difference in time) I suspect that the reason it did not update is that the server had a time issue, something that I have no control over.

I will doing another major update to my products sometime in January so I will be able to give it a robust test at that time :!: I'm pretty sure that it is working fine though.

Regarding the resetting "sales" and "products purchased" to zero, I have decided to delete all current orders before the next update so that I can see this function in action easily.

Thanks again for the great support you blokes give. Merry Christmas and a Happy New Year to both you and Leo :D

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Reset products purchased and sales

Post by leo » Wed Dec 30, 2015 10:47 am

What is the time zone you have set?

fruitbat
Posts: 23
Joined: Mon Oct 07, 2013 11:21 pm
Location: Australia

Re: Reset products purchased and sales

Post by fruitbat » Wed Dec 30, 2015 2:26 pm

Hi Leo.

I have set the time zone to my local time, UTC +9:30 hours, South Australia.
The server is in Dallas, Texas, which is UTC -6:00 hours (currently) which means that at midnight Dallas, Texas, it will be 15:30 hours later here or 15:30 local time. (Daylight saving is now in effect in Dallas otherwise it would have been 16:30 hours later here)

I may just update the products and leave them "turned off" until the day I want them to be available and then simply go into Admin and turn them on manually as there are only around 46 new products to turn on.

Cheers and Happy New year, Eric.

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Reset products purchased and sales

Post by leo » Thu Dec 31, 2015 3:20 am

What have you entered literally?

fruitbat
Posts: 23
Joined: Mon Oct 07, 2013 11:21 pm
Location: Australia

Re: Reset products purchased and sales

Post by fruitbat » Fri Jan 01, 2016 3:04 am

Hi Leo

I have discovered the problem when you asked "what have you entered literally" as I couldn't remember off the top of my head and went to check. Here's what I did - I had all the default country/region/etc set for here but I had the "Time Zone" with just "UTC" in it!! :oops: I've tried making that "UTC +9:30" but I get an error saying that is invalid. Can you please tell me what the correct format should be, thanks.

Cheers, Eric.

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Reset products purchased and sales

Post by leo » Fri Jan 01, 2016 5:50 am


Post Reply