I am making a rent module and I want to send a price attribute "rent_price" to cart page when customer click on rent button and normal price(base/special) when they click on add to cart.
Please help.
Magento 1.9 – Custom Price Attribute on Cart Page
checkoutmagento-1.9price
Best Answer
Edited:
See Add a column to quote item table
current request Action
See how use this event http://doghouse.agency/article/magento-adding-message-product-during-purchase
a.you can use magento
event/observer
. Basically there are two events,by which you can change the cart price of that products:checkout_cart_product_add_after
checkout_cart_update_items_after
checkout_cart_product_update_after
This 3 event is need because of:
Event1:checkout_cart_product_add_after
This event is fire when
first time a product is cart for current session
of current input values from frontendEvent2:checkout_cart_product_update_after
This event is fire when
a current exiting cart item
edited from edit link of cart item.Event3:checkout_cart_update_items_after
This event is fire whenever cart items update from cart page.
As per as magento system, a
cart item price
change usingsetter
functionssetCustomPrice(), setOriginalCustomPrice
of cart item Object.Just like:
And using
events fire an observer
which iscalculate price basic of your your rend field
.![enter image description here][2]
Config.xml code like:
Observer code like this: