Jump to content

Item info missing from order


lyndsiesal
 Share

Recommended Posts

First, I could have sworn I saw this same issue and a solution but I've been combing the forum for a while and can't locate it.

I have the occasional order that gets stuck in pending status.  I noticed in the order inventory that the item info is totally missing and just says NULL.  Many times there are multiples of this item, as if the customer hit "add to basket" over and over.  Screen shot attached.

Thanks!

null.jpg

Link to comment
Share on other sites

We have seen this happen with another forum member.

I best I know, there is no comprehensive solution. There is a tweak to the code, but I have not yet proven to myself that is a legitimate solution.

In this other case, items that become ghosts seem to all have had a stock level of 1, and that the stock level is set to be reduced when the order goes to Pending.

CubeCart uses data from the Order Inventory table, but then augments it with data from the Inventory table. The problem, as I see it, is that the code that fetches product data filters the query for in-stock items only. That data (which is a boolean false), is merged onto the data from the Order Inventory data, and that is not a proper merge and the result is a mess.

Please confirm that this item (best guess as to what it was) was at a stock level of 1 before the transaction, and is now at 0.

 

Link to comment
Share on other sites

Ok, that's an interesting twist.

Working on the same premise as bad data in the Inventory table, please use an external utility such as phpMyAdmin to examine the CubeCart_inventory record for the product that this item is supposed to be. Let us know if there is anything unusual about the data in that record.

Link to comment
Share on other sites

I am in phpMyAdmin right now sorting to see if I have any products that are accidentally set to use stock level but I don't see anything.  Problem is, I have 1,500 products so I would not even know where to start trying to figure out that the mystery product might be!

This is all I see in order_inventory.  I've sorted all of my columns in CubeCart_inventory to see if I have an oddball but I don't see anything different.   

null2.jpg

Link to comment
Share on other sites

For this order, as an admin, did you receive an email notifying you or this order had been placed?

If so, do you still have that email?

If so, does it list what items were in the order?

If no, then look in CubeCart_order_summary in the 'basket' column. The order details will be in a compacted format. The items (or item ID numbers) should be there.

 

Link to comment
Share on other sites

I did receive an email.  It shows 2 items, one looks totally normal and the other has no name, qty 1 and cost 0.

The order details in the database only show the normal item.  No sign of the ghost item at all.  

Many times when I see these orders come through, the qty is a larger number, like the customer tried to add the product over and over.  

Link to comment
Share on other sites

"The order details in the database only show the normal item.  No sign of the ghost item at all."

This from the 'basket' column?

Let's have phpMyAdmin look in CubeCart_order_inventory, filtered where 'cart_order_id' is that specific Order Number. Maybe the ghost item will be in this table.

Link to comment
Share on other sites

Interesting.

My next check would be to find all the web access records from Dec 12, filter for the IP address of the customer's computer who made this purchase, and trace what everything was done. (You may or may not have those records available in your Cpanel log archives.) I'm wondering if this is, in fact, a case of the customer starting to checkout, going back (browser back button), removing the item, checking out, going back, adding the item, checking out, going back, deleting the item, etc.

Well, we now know where the ghost item is coming from -- the Order Inventory table having a ghost record.

But how it could have gotten into the table in the first place? I do not (yet) know.

Link to comment
Share on other sites

I reported this issue about a year ago.

We don't use stock levels either, so i quickly ruled that out.

I rarely get to see whats happening with sales, so I'm not sure if this is still happening, I'm sure if it were, then the sales team would tell me, which makes me think that we may have applied some fix or attempted fix.

I found the following post from May last year.

Looking at my order.class.php file, I see two versions, one of which is renamed 'order.class.php-before fix for order over writing thing' which suggests to me that the fix Bsmither suggested at the time is at least still in place on my site.

However, I have done a few other things to discourage customers from using the back button, so it could be a combination of both.

Link to comment
Share on other sites

  • 2 months later...

@lyndsiesal What version are you on.

 

We are still seeing this, and it's killing us too... so frustrating and has been ongoing for 14 months or more.

 

They say that this is fixed with 6.1.5, so I'm about to embark on updating to 6.1.7, maybe this evening.

Although being told the scenario which is supposed to create the error, i'm not entirly convinced.

If I see further occurances, then I guess I'll have to log a support ticket and hope that Al and his team can figure out what's causing it.

Link to comment
Share on other sites

Maybe related, may be not, but i'll document it for future cross ref.

The IP address asscociated with this mornings occurance generated a mod security warning in apache error logs. However, this was 5 days ago, and may not neccesarily be the same PC.

 

[Mon Apr 24 07:24:28.761134 2017] [:error] [pid 7471:tid 140356395943680] [client xx.xx.xx.xxx] ModSecurity: Access denied with code 403 (phase 2). String match within "/Proxy-Connection/ /Lock-Token/ /Content-Range/ /Translate/ /via/ /if/" at TX:header_name_via. [file "/etc/apache2/conf.d/modsec_vendor_configs/OWASP3/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "463"] [id "920450"] [rev "2"] [msg "HTTP header is restricted by policy (/via/)"] [data " Restricted header detected: /via/"] [severity "CRITICAL"] [ver "OWASP_CRS/3.0.0"] [maturity "9"] [accuracy "9"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-protocol"] [tag "OWASP_CRS/POLICY/HEADER_RESTRICTED"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag "PCI/12.1"] [tag "WASCTC/WASC-15"] [tag "OWASP_TOP_10/A7"] [tag "PCI/12.1"] [hostname "www.domain.co.uk"] [uri "/"] [unique_id "[email protected]"]

Link to comment
Share on other sites

Could clearing the cache cause this.

 

At the same time this customers order was wiped, I was updating a few admin folder files, and I performed a clear cache to have the chages take effect.

I know for certain that this has not been the cause of the previous occurances, unless of course, there may be something in the background which performs a clear cache.

 

Just a thought.

 

Link to comment
Share on other sites

I cannot see how order details could be affected when clearing cache (but stranger things have happened I suppose) but as every single action done by an admin currently clears cache (each and every single time - see https://github.com/cubecart/v6/issues/1536) I think you would have no correct orders if that was the case !

Link to comment
Share on other sites

24 minutes ago, havenswift-hosting said:

I cannot see how order details could be affected when clearing cache (but stranger things have happened I suppose) but as every single action done by an admin currently clears cache (each and every single time - see https://github.com/cubecart/v6/issues/1536) I think you would have no correct orders if that was the case !

Are  you saying that any and all changes made in 6.1.7 admin currently clears the cache in the storefront?????

Link to comment
Share on other sites

4 minutes ago, Dirty Butter said:

Are  you saying that any and all changes made in 6.1.7 admin currently clears the cache in the storefront?????

It isn't just 6.1.7 it has always been this way !  @Al Brookbanks has said he is going to try to implement the changes I have suggested in that issue ASAP which will be very welcome as it will make the cache MUCH more effective

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...