Magento Cart, Strange behavior - magento

Hi I am getting strange behavior in Magento cart. Some random products been adding to all the customers. I think these products are from last cart sessions. Please help!

Create database backup then truncate this tables:
sales_flat_quote
sales_flat_quote_address
sales_flat_quote_address_item
sales_flat_quote_item
sales_flat_quote_item_option
sales_flat_quote_payment
sales_flat_quote_shipping_rate
NOTE: Possible to lose some statistics (best selling products, popular products etc.).

Related

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

How to change in the Magento DB the prices of the product

I've troubles to figure out how to change the prices of a product in the magento DB.
I tryed to change the prices in the catalog_product_index_price table but the price doesn't change.
There is a website here that explains it in more detail, but the short answer is that you need to change the price in the catalog_product_entity_decimal table and then reindex Product Prices in the backend (and potentially Product Flat Data as well)
Magento uses variety of indexing and caching methods that make simply changing the value directly in the database not a good idea.
If you look, you can see the prices are also defined in the Price Index tables:
catalog_product_index_price_idx
And also the flat tables (if you use them):
catalog_product_flat_1 (number 1 depends on store)
If you're trying to mass update prices, I recommend either using a tool such as Magmi or the built in Magento import methods to update prices. Directly modifying the database is generally not a good idea with Magento, given it's complex database structure.

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

Magento Stock (Configurable, Bundle)

I have a website made with Magento, and a theme by me. The problem is:
The simple product with low stock is associated to a configurable product, and when i try to add a higher quantity of that simple product, it allows, and then, after the checkout proccess, we receive a e-mail from the store that there is a failure in the proccess like:
Payment operation failed:
Reason:
Not all products are available in the requested quantity
It occurs in bundle products that have a default quanity more than 1 too.
Someone can help me?
Thanks.
EDIT:
Found this solution but i can't truncate my sales tables on database. I have all my sales records there, and there are a lot of them. I can't loose it. Magento: After ordering configurable product, its canceled because its out of stock
How many orders do you need to remove? If you got a handful that you can count by hand, you can try this solution to remove unwanted orders.
how can i delete test order from magento
It looks like it should work, but, as always, review the code and try it on one order first..

Magento: Revert price data from index. False price data saved, but not indexed

i hope i am able to describe the problem correctly here, as it is quite complex. I guess you guys are my last chance.
We have ca. 120 config products based on 600 simple products. Some days ago, we accidently overwrote all the prices of the simple products with false prices. We did not notice as in the frontend every price is still ok, they are not indexed.
So we now have the correct prices in the frontend, but the wrong prices for the simple products in the backend.
Is there any method the get the prices from the indexed frontend and write them back in the backend?
Until i reindex all proces should be ok in the frontend.
Does anyone have any idea what i could do to get the prices right again?
If you browse the database, there should be a catalog_product_flat_1 table - this is basically your product index. You should have columns for all the product attributes (including SKU and Price) so you could export this table, then do a product export from Magento, then update all the prices/SKUs accordingly and re-import. Or duplicate the flat_1 table, then write a PHP script to loop through it, updating all the prices, then re-index your data (after checking it's worked of course!)

Resources