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.
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.
Price: 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With