Magento Catalog Price Rule not calculating properly for some products - magento

One order has an issue during our Black friday promotion (Catalog price rule 20%). The product original price is $198 but went through for $167 (around 15.6%). I checked the logs, order details etc but don't see any issues. The sale price is fine on front end and other orders were fine too.
Any thoughts how it happened? We are using Magento ver. 1.9.3.2.
Product order amount
Product original amount
The sale amount should have been $158.4

It seems like the rule which was applied is different. Please see the rule details assigned to the corresponding order.
You can see the rule by running the below SQL.
SELECT applied_rule_ids FROM sales_flat_order WHERE entity_id=[MAGNETO_ORDER_ID]
And then see the rule details corresponding to that applied_rule_id

Related

Magento shopwide price reduction without needing to add a catalog price rule

I have added a shopwide catalog price rule of 20% on all products. This seems to work. However, for some reason after a re-index I have to reset this price rule time and time again. As most of my shop runs with automatic imports and cron jobs - I would somehow like to hardcode this rule in. So I don't need to reset the rule every time.
Also the fact that my price is tagged as special price is something I would like to get rid of. The price is just the initial price minus 20%. This is not a special offer - it's just the price how I want to offer it to my customers.
Up till now I haven't found a solution to my problem - or where to start. Suggestions would very welcome!
Use shopping cart price rules
admin/promo_quote/
And set the discount of 20% there. It will apply to the cart and you won't have to the catalog price rules every time.
If you need more fine-grain control, check out:
http://www.amasty.com ( unaffiliated but happy with dozens of their extensions )

How do I find a Magento products primary category

I am using Magento 1.6.2.
I need to find an easy way of checking which category is the "default" category for any given product, where multiple categories have been assigned to that product.
The reason for this is as follows:
I have different discount amounts available on different categories in my store.
Where a product falls into two categories with different discounts applied, the highest discount should be applied to that product, but if that product has been added to the system (created) with a default category that has a lower discount, and then afterwards added into the higher discount category as well, the higher discount level is not being applied when that product is purchased.
If, however, I add the product to the higher discount category first, and then to the lower discount category afterwards (so the product appears on my website in all the right places), the correct (higher) discount level applies to that product.
I can only assume, therefore, that the default (or primary, or first, however you want to label it) category is the one that determines the outcome of the discount level to be applied to it. If this is wrong, then I need a lesson in understanding the mechanics behind this to see where I have gone wrong in the overall setup of this system...
If my assumption is correct, then I need a way to determine which category any given product (using the SKU) has been assigned to first, to ensure that the correct discount can be applied to that product.
I hope I have explained that clearly enough!
Does anyone have any suggestions. I have been unable to find information on this regardless of guessing specific search terms. The only things I can find are related to general category retrieval, and not this very specific task I need.
Cheers!
Im afraid your assumption is incorrect. Magento has no concept of a 'primary' category for a product. It only knows the product is in category id(s);
1, 12, 234
etc. The id's are stored numercially with no idea of which category might be more important than another.
What you could do instead is create a custom attribute and enter the id of the category you want to treat as 'primary' and retreive this attribute value when working out whether to give more discount or not.

Price rules in Magento

I have a problem with the price rules in magento version 1.5.1. I have a rule that defines the discount according to an attribute of the product , called fascia_sconto . I had a series of products that had an attribute that defined a discount of 20 % , but now I need to change the discount to be able to cancel it and put another on the same products .
I changed that attribute using store manager for magento , changing all the products concerned , putting the attribute in the rule that defines a discount to 0 , and then I applied this rule , thinking now that the discount was applied . But I have not noticed any change. Then I emptied the cache, reindexed everything, but nothing yet , there is always the old discount. But the mystery of all mysteries: if I go to a product of which I have modified the attribute, and save it , magically the rule, for that product, of course, is applied , then the item on the frontend has no discount . I have to resave 1,600 products , so I can’t certainly lose a whole day one by one to save all the products to make the rule active .
I also tried to make a rule for it , which should overwrite the previous one. I set a rule that defined a discount of 18 % on those products , putting between actions, “Stop processing more rules “ to “ yes”, so that the previous rule was no longer calculated , but that this was directly applied . But nothing , magento continues to calculate the discount starting with the rule of 20 (which no longer exists all over for those products , since I changed the attribute ) and then apply an additional discount of 18% on discount price! I’m not understanding anything, would you be able to kindly give me a hand ? Where was I wrong?
I hope I was clear enough, and I really hope you grow to be of help .
PS: I’m sorry for my bad English, but it’s not my primary language
Applying price rules based on product attribute changes can be very difficult. I am sypmathetic to your cause.
It might not work but you are welcome to follow carefully my (paranoid) process for applying sale promotion rules:
(change any product attributes relating to the sales rules)
Re-index everything
Refresh the caches
'Save and apply' the rule to apply it to the fresh indexes
Re-index again
Refresh the caches again

Magento Discount ANd Tax Calculation

Kindly have a look the image showing the checkout details on my magento store. The subtotal price of 6929.82 is correct - to which a discount of 10% is to be applied. The discount amount of 692.98 is also correct. However I cannot figure out how in the world could magento calculate the difference of 6929.82 and 692.98 as 6321.94 .
Though I am using a custom theme but I have tried restoring to default theme and the result remains the same which tells that the problem is either in the backend settings or in the core magento files. Further into the calculations - application of 14% tax after discount is calculated correctly and added to the figure.
Can anybody help me out in locating the setting that is leading to this strange behaviour from Magento.
Looks like its a bug. See https://magento.stackexchange.com/questions/2900/completely-incorrect-tax-calculation
Try the following solution
app/code/local/Mage/Tax/Model/Sales/Total/Quote/Tax.php
Line 144
if('cart' == Mage::app()->getRequest()->getControllerName()){
$address->setGrandTotal($address->getGrandTotal() + $address->getTaxAmount());
$address->setBaseGrandTotal($address->getBaseGrandTotal() + $address->getBaseTaxAmount());
} // if
Maybe there is Shipping&handling total is not displayed (amount 85.1). You can check all totals and their value through database, review sales_flat_quote_address table.
After a lot of searching for possible solutions I could not come across any full proof solution to my problem. Modifying the Core Magento files is also something I would not recommend unless and until you are very sure what all areas of your website it will affect.
The solution I have implemented is to set the catalog prices as "excluding tax" in Tax Settings and thereafter manually changing all product prices by deducting the tax applicable on them.
e.g Before Implementing the solution:
Tax Setting - Catalog prices include tax
Price of Item (as entered in product specification)- 100 {subtotal 86 + 14#14% tax}
After Solution
Tax Setting - Catalog prices exclude tax
Price of Item (as entered in product specification)- 86
After implementing this I found the discount totals and everything was being calculated correctly. Since I had only 400 odd products I did it manually over the week just to be sure. However for larger number of products you can also run a query through phpmyadmin(etc) to change the values directly in the database. Do remember to backup your DB before doing so.

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..

Resources