Developers of Amasty Team, who have already passed Magento Certification continue to highlight the most difficult and tricky questions included in the examination. This week we asked Ruslan to explain what types of prices exist and how price rules work.
By the way, we’ve got some more good news for you. Another Amasty developer has successfully passed Magento certification. We take the chance to congratulate Nikolay with this professional success. Now our team can boast of 5 certified Magento developers, which one more time confirms high the high quality of the extensions offered.
But let’s get back to the point. Last time we discussed how the amount of products in the shopping cart is calculated. And this time we will talk about prices. Prices in Magento are one of the key elements of the platform. No wonder Magento price rules are paid a lot of attention to in Magento Certification.
How Magento rules are stored?
First and foremost one should admit that in Magento price is always stored in 2 fields, which are price (price in Magento store currency) and base_price (price in the default currency of the entire Magento installation). Let’s see how product price is formed.
What are the types of prices in Magento?
All the types of prices existing in Magento can be organized in the following table.
As you can see, besides the major price Price a product has an additional attribute Special Price, which enables setting a special price for a certain period of time. This special price will be displayed above the crossed major price of the product.
Besides that, we can set Tier Price, which will define the price for the product depending on 2 factors: how many products are in the cart and what group of customers one belongs to at the moment.
Here is how the price for the product is calculated.
And this is the way it is displayed for a not logged in user. In this case Special Price worked (one sees the regular price crossed and new price displayed), since there are no rules for not logged in users.
At the same time in the cart regular Price is not displayed. One sees only Special Price.
Here one sees price $530 since the user is logged in, so he belongs to the group General, for which Price $530 is set.
In case there is more than one price set for the product and in Tier Price or Price and (or) Special Price other values are set, the cheapest price is chosen. This is how the Group Price worked.
And this is how the Tier Price worked.
How do price rules work?
Besides, price can be influenced through price rules, which are set in the menu section Catalog Rules. They allow to change the product’s price in accordance with the preset rules instead of changing the product’s attributes. This way the rules are applied at the price received from attributes.
Catalog Rules have a wide set of conditions that can be set.
One should mention that the discount (60%) is taken from the regular Price, not from the Special Price.
The highest level is applying Magento shopping cart rules that deduct the product’s price and are displayed as a discount on the cart page.
Another option is using price rules for adding taxes.One can adjust in the settings whether taxes will be added before or after discount, which lets take or not take into account various actions in the product’s taxation system.
This is how Shopping Cart Rule works. Pay attention that 60% is discounted from the current (!) price in the cart.
Please write a discount strategy for the goods according to the following plan.
- The product costs $1000, the discount between Christmas and New Year is 30%, it should not be displayed in the cart.
- If a customer belongs to a group of wholesale buyers, the price for him is $800 per unit for the orders of 10 units or more. Any customer who buys 30 units of the product or more, no matter what group he belongs to, pays $800 per unit as well.
- Besides, one should provide a 10% discount from the final cost to anyone, who orders delivery to California.
- In the last day of the year one needs to set a special price $600 per unit.
If you’re looking for a way to extend price rule functionality, have a look at Special Promotions from Amasty.