Can anyone clarify the difference and purpose of all the different pricing rules in Magento?
For example there's setPrice, setOriginalPrice, setCustomPrice, setOriginalCustomPrice, setSpecialPrice, setFinalPrice etc. but without guessing it's not entirely clear each one's purpose and usage.
preguntado el 28 de agosto de 12 a las 11:08
The different fields are required due to the way the rule/quote system works.
A product/quote will be passed through each matching rule, which in turn could modify the price the customer is going to pay. The system still need to know the original prices so it can report correctly on % savings etc.
Precio: this is the price you enter in the magento admin for the product
originalPrice: keeps an unmodified version, as price may be changed during the process.
customPrice: this can be set when you make an order in the backend, you may want to give a special one off price to someone, this would override the price
originalSpecialPrice: unmodifed version, as it could be changed/ affected by rules etc along the way as the price does
specialPrice: is a price used to allow you to show discounts, this will be used against the price, and then percentage saving etc is calculated from the difference.
You wouldn't really need to set any of those values programmatically though, maybe if you're creating some custom rules etc.