Programmatically changing cart totals in Magento
I'm in the process of building a rental site based on Magnento with all of the rental o开发者_如何转开发ptions (date, duration, etc...) configured on the cart page. As all of the products are coming into the cart without pricing, once the options are set the grand and sub totals for the quote need to be updated before moving on to checkout. Any thoughts? Thanks in advance!
The site is http://replikavintage.com for the record... Just get to a 404 to advance past the splash page.
another way of acting on the product's price is listening to the catalog_product_get_final_price
event
Create a custom product type, this grants you the opportunity to set a price model. Override the model's getFinalPrice()
method to do your calculation based on the product's custom options. You can create the necessary text and date fields programmatically but it's no more convenient than carefully setting the same through admin.
精彩评论