Dirty Butter Posted November 19, 2019 Share Posted November 19, 2019 I have created an order with the stock test site, and I see the same wrong behavior I am getting on my live store. The Sales Report page has the Order Number as a link. But that link no longer leads to the actual order. I use the Incremental Order Number format. This is the url given for the Order Number on the Sales Report page: XXX.php?_g=orders&action=edit&order_id= And here is the url given for the Order Number on the Orders page: XXX.php?_g=orders&sort%5Border_date%5D=DESC&action=edit&order_id=191119-085129-7493 I have no idea how long it's been that way, but I compared 6.2.6 and 6.2.8 admin files for reports in source and skin - and they are identical that far back. I don't have a clue which files to compare that actually create the link. Can someone please check your install and see what happens for you? It's likely a problem with the Incremental code somewhere, but it would help to know if it works correctly with Traditional numbers. Hopefully someone using Incremental can check theirs, too. Link to comment Share on other sites More sharing options...
bsmither Posted November 19, 2019 Share Posted November 19, 2019 On the Sales Report page for you, which order number type is shown in the Order Number column? Incremental or Standard/Traditional? (You have shown us what the link URL points to.) Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 19, 2019 Author Share Posted November 19, 2019 It shows my Incremental Order Number as a link in both the Orders and Reports pages. Link to comment Share on other sites More sharing options...
bsmither Posted November 19, 2019 Share Posted November 19, 2019 This is from CC626 - admin skin template reports.index.php, near line 34: <td nowrap="nowrap"><a href="?_g=orders&action=edit&order_id={$data.cart_order_id}">{if $CONFIG.oid_mode=='i'}{$data.{$CONFIG.oid_col}}{else}{$data.cart_order_id}{/if}</a></td> Note that the table displays the value in the oid column of the database table if that mode is "i" for incremental. But the URL actually uses the standard cart_order_id type. The problem is in the admin sources/reports.index.inc.php, lines 85-86. Here, only the order number type being used (Incremental or Traditional) is retrieved from the database. So, if Incremental, the Standard is not retrieved. The Standard type value found in the cart_order_id column needs to be added such that it is always available to the skin, or the URL in the link needs to be enhanced to use the Incremental order number. For the latter: <td nowrap="nowrap"><a href="?_g=orders&action=edit&order_id={if $CONFIG.oid_mode=='i'}{$data.{$CONFIG.oid_col}}{else}{$data.cart_order_id}{/if}">{if $CONFIG.oid_mode=='i'}{$data.{$CONFIG.oid_col}}{else}{$data.cart_order_id}{/if}</a></td> There is code that will get the correct record when viewing the order details, having specified the Incremental type. Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 19, 2019 Author Share Posted November 19, 2019 That fixes it Bsmither! The edit is in admin/skins/ reports.index.php replacing line 34. THANKS!! I will report on GitHub if you haven't already. Link to comment Share on other sites More sharing options...
Al Brookbanks Posted February 25, 2020 Share Posted February 25, 2020 I fixed slightly differently. https://github.com/cubecart/v6/commit/4f198bc60f27ecfc963cf67c0085c65001f50aa0 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.