Magento removed orders from table sales_flat_order - magento

Magento sent a customer a receipt with the order number but I cannot find that order number in Magento. I investigated that table sales_flat_order and noticed that the entity_id column is not sequential (an auto increment column) that indicates some records were deleted. Before I start doubting it's an intrusion, is there anything like that Magento does? I.E. removing orders from sales_flat_order ?

Within a standard magento installation it is not possible to delete an order.
You can only do it by hand in the database or install an extension.

Related

Magento 2 different prices on page product and search results

For some reason I have for some,different prices on page product and search results.
The correct one is on the product page.
For example product page is 1.60 and search result page 1.20.
What I have done:
I have Magento 2.4.4
Change the product price in admin,I check the catalog_product_entity_decimal table to see the changes and it is update, then I see that I have to reindex the catalog_product_price index.
Once that is done the price is updated in the catalog_product_index_price table, but when I check the _replica one (catalog_product_index_price_replica) it is not updated.
This only happends to some products.Not sure what is happening
Because this is a search result page, I am using Amasty Elastic Search
I figured it out,it seems that in my case , when I updated a specific third party module, there was some sort of update on the table catalog_product_index_price_tmp.
I deleted the table and created it manually, bad mistake, this table is used for updating the catalog product index (not sure if others), it stores the information on that table and then copies its values to the _replica one, this table is always emptied when reindexing the price.
Solution was to delele the table
DROP TABLE `catalog_product_index_price_tmp`;
And then run the setup:upgrade , this table is created by magentos db_schema.xml in this file vendor/magento/module-catalog/etc/db_schema.xml
Hope this helps others

Sales_flat_order missing data magento

my sales_flat_order_table is recording customer_firstname and customer_lastname from amazon and ebay orders but for magento site orders its leaving these fields blank. Though i can see the names in admin order details.
I need it for a custom grid, found names in sales_flat_order_address so joined the two to get names that were missing in sales_flat_order table.

Magento track cart

Is it possible to track the magento cart through the Form_key parameter in the #product_addtocart_form ?
Which table in the magento database holds this parameter. I need to track orders and confirm if they have been successfully paid.
I just found all the information I need in sales_flat_order_item under product_options column

Does changing Magento SKU affect the Order History

I have a request to change the SKU for an existing product, so I am wondering if changing the SKU will affect the order history of this product. Since SKU is a global Identifier in Magento I am not sure what would be the effect of changing it. This is Magento 1.7 CE
Thanks
Order data is stored in the sales_flat_order_item and sales_flat_order tables. If you change the SKU of a product in your catalog, it will not affect the SKU of the product on already existing orders.
Regards,
Changing the SKU of an active product, and or the flat product's afterword will NOT retroactively update the sales order history.
100% sure on this.
Sales Order History
Referencing the old SKU to the "New" Sku will result in some broken behavior that must be accounted for, this especially is true in Configurable products.
Cheers,
-J
http://www.magentocommerce.com/wiki/2_-_magento_concepts_and_architecture/catalog_database_tables

Where is Magento order data stored?

I am running Magento 1.6.2 and have an intermittent error cropping up with some sales orders. The customer is being charged correctly, but the Magento admin page when viewing the sale reports incorrect values. I understand why it is doing it incorrectly - I have a 10% discount off a full section of products on my website, and it is because of this that something is going wrong.
Again, the customer is paying the correct (discounted) amount, but the data must be being stored incorrectly in the magento database because looking at it in the admin system doesn't total the values correctly. The Catalog Price Rule that applies the 10% discount is not accounted for in the displayed totals.
To add to my woes, we use Zynk to bring data in from Magento to our Sage 200 backoffice system, and the data getting imported into that system is also missing the 10% discount, making reconciliation of order payments and Sage invoices a complete pain.
The only thing I can think is that somewhere somehow the data is being stored in the magento database incorrectly (not having had the 10% discount applied to it) so when Zynk collects the data, it is incorrect.
Can anyone help me understand where I can find the order data in the Magento database so I can see what was stored for a specific Magento order number - I can at least begin to debug this then, maybe?
If someone has details of where to find the code used by Magento to perform the order database transactions, specifically where the discounts should be applied before storing the data, that would be a big help too.
Cheers!
Orders data are saved in database tables sales_flat_order and sales_flat_order_item
Discounts are applied in Mage_SalesRule_Model_Validator
You can find orders and order items data in your (tables prefix)_sales_flat_order and (tables prefix)_sales_flat_order_item respectively. but remember that when an order is placed Magento simply copies the data from its respective quote. so in my opinion you should be checking (table prefix)_sales_flat_quote and (table prefix)_sales_flat_quote_item first.

Resources