Post by ianhaney » Thu May 18, 2017 5:01 pm

Hi

I am using opencart 2.0.3.1 in a clients store and noticed that order ids are skipped for example a order is placed with number 38 and then the next one could be order 45 so know in between it's missing orders but is there a way the order id could be only generated when payment is made or a way to reuse the order id if someone has items in the cart and closes the site just before payment is made or is truncating the database table a good idea

I found this extension but will still get missing order ids I think with it but just not as many

I am only asking as I do a test order on a daily basis

viewtopic.php?t=9192

Thank you in advance

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by uksitebuilder » Thu May 18, 2017 6:50 pm

Unfortunately it is not the way OC works, nor should work that way.

Missing orders should be chased up if a subsequent order is not completed by the user.

Orders are required to be logged prior to the order being fired off to a payment provider or payment taken on the website. It is after payment has been completed (either successfully or not) that a valid order status > 0 is given to the order.

As long as your client's Invoice numbers are sequential, that should be fine for their accountant.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by paulfeakins » Thu May 18, 2017 6:57 pm

It seems to be a common concern, but no answers here on StackOverflow:
http://stackoverflow.com/questions/1379 ... e-opencart

And it does indeed break the rules for VAT invoices:
"What details must I include on a VAT invoice?
You must show the following details on any VAT invoices you issue:
* a sequential number based on one or more series which uniquely identifies the document"
https://www.gov.uk/government/publicati ... at-records

If we developed an extension to show VAT compliant sequential numbers, how much demand would there be?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by uksitebuilder » Thu May 18, 2017 6:59 pm

Missing orders / Orders in general are not VAT Invoices though.

Invoices in OC are generated manually or by using an extension that will create them automatically based on order status (eg processing or complete etc)

So should not be a problem regarding Invoice sequences

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by ianhaney » Thu May 18, 2017 7:20 pm

I am not sure if the client is using invoices for his accountant, think he is just going to print the orders off from the admin side and give them to the accountant as the client has not said anything about invoices

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by MrPhil » Thu May 18, 2017 8:39 pm

OK, so you get a completed order 38, and then the next completed order is 45. That means that in-between those two there were 6 orders that did not go to completion for some reason. It would not be good to try to force 39-44 to be reused (for other customers), because they would then be out of temporal order, which could raise eyebrows. Not assigning an order ID until the last possible moment might reduce this, but with several customers active at any given moment, trying to force a sequential order could be a problem.

I would be more concerned about finding out why 6 orders did not complete, than worrying about gaps in the sequence. If your accountant or auditor is getting his panties tied in a knot over this, could a report be generated showing the missing orders and where in the process they were abandoned? This could provide a valuable clue as to where there are problems/breakdowns in the ordering process, while accounting for all order numbers to keep the bean counters happy. The referenced mod or extension seems to be involved with not generating a new order ID if a certain page is reloaded for whatever reason, which seems reasonable.

I don't think that any government regulation is trying to force all numbers to be used in sequence -- just that they should not repeat and preferably should be in ever-increasing order. As long as you have a report in hand accounting for unused numbers, including test orders, the regulators should be happy.

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by ianhaney » Fri May 19, 2017 4:12 pm

Hi MrPhil

Thank you for the reply and the info, is really appreciated

I am going to look at integrating this abandon cart extension so can email the customers and offer a discount or something, I must admit majority of the missing orders are me testing as I do on a daily basis just to make sure it's all working ok from adding the product to the cart to checkout

I have been trying to add a print button using html and javascript on the sale/order page in the admin side showing the missing orders when I do the filter on the order status but it don't seem to be working, when I try to print in firefox, I just get 2 lines and it is cut off half way through the lines or sometimes I get a blank page

Do you any extension that adds a print button on the sale/order page to print off the report, I noticed there is a print icon to print off the individual invoices but that don't even work in firefox

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by MrPhil » Fri May 19, 2017 8:25 pm

I would be careful about automatically offering discounts or coupons to those who have abandoned their cart. You're assuming that it's because the prices (or shipping) are too high, and not that they had a problem or got lost in the checkout sequence. You don't want to get a reputation "all you have to do is abandon your cart, and they'll give you a big discount!". Used judiciously, a coupon or discount can be a valuable marketing tool, but be careful about being too liberal with them. Maybe give a small discount in exchange for information on why they bailed out. You also don't want to tick off your regular customers when they find others are getting big discounts simply for being difficult. Just some things to consider.

I'm afraid I don't have any insights on how to add buttons or why you're having trouble with printing your report, as I'm still pretty new to the product. I was just suggesting that such reports would be valuable for figuring out why a cart was abandoned at some stage. I'm assuming that the necessary information has been gathered and stored somewhere -- if it isn't, that's an additional step that's needed. Does the browser's regular "print" button not fully print what's displayed? Are you using an application "print" button that either applies different CSS (media = print) to the page, or generates a whole new page to print? There are plenty of things that can go wrong there.

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by ianhaney » Fri May 19, 2017 9:23 pm

Thank you, I will keep that in mind regarding the coupons

The browsers regular print button in landscape view does not fit all the columns in on one page, it only shows order id, customer name and that's it and it a;so prints the url of the filter order status for some reason and it does the same in portrait view

I was just using the following code to make a print button

<input type="button" value="Print Div" onclick="PrintElem('#myDiv')" />

the above code is even worse, it just prints out two lines with the two lines cut through

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB
Who is online

Users browsing this forum: Bing [Bot] and 147 guests