Jump to content

6.2.8 Bug? Sales Report Order Number url ISSUE


Dirty Butter

Recommended Posts

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

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

  • 3 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...