I have a module in which admin can assign discount to any product from backend. The discount would be in percentage
. There is a custom listing page where all the products will be listed having discount applied. My Magento version is 1.8
For example:
Product Price = 299
Discount Percent = 20%
Discounted Price = 239.20
I need to do the following:
- Show Discounted Price instead of Regular price on listing page for all the products
- Show Discounted Price instead of Regular price on product detail page
- When user add that product, discounted price should be shown in cart, checkout and elsewhere
- Pass discount percent i.e. 20 in hidden value from listing page to my observer
I have followed few tutorials below but no luck.
http://magentotutorial.org/programmatically-add-product-cart-price-change-magento/ https://stackoverflow.com/questions/22657041/get-a-value-of-a-custom-input-in-magento
Also, $item->getOriginalPrice()
does not return anything here on Magento CE 1.8
Moreover, which event to be used in order to get the Quote ID, as I am getting null
checkout_cart_add_product_complete
OR
checkout_cart_product_add_after
Please Help.
Thanks.
$item->getPrice()