Temporary override of a product price in the shopping cart

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
I'm currently integrating a service into nopCommerce and was wondering if anyone has a suggestion on the best way to temporarily override the price of a product in a person's shopping cart - just long enough for them to checkout. The discount model isn't practical for this purpose since this is essentially a discount for a specific user, for a specific session. If there is a way to leverage the discount model to behave in this manner, however, that may be an acceptable approach. I'd prefer to leave the existing code as untouched as possible to make upgrades to future nopCommerce releases as simple as possible.

My company has launched an automated e-commerce price negotiation service called Make an Offer ( http://www.eneksis.com/services/mao/ ) that we'd like to integrate with nopCommerce and provide as a complete package to our subscribers.

Any suggestions are greatly appreciated!

Thanks,

Jason
14 years ago
You should be able to just create a discount by SKU, assigned to customer role, with a coupon code and provide it to the customer.

Or you can make them check out with a cash on delivery or Purchase order and then edit the order in the database.

Otherwise you would have to cut some code and persist the order sub total to the database and edit it in the database.
14 years ago
Thanks for the quick response!

I suppose programmatically creating a coupon and displaying it on the page for the user to enter at checkout is one approach. However, I'm really trying to keep the process fully automated, in which the application automatically applies the discounted price when calculating the customer's cart totals.

I'm not completely clear on the data access process that currently populates the cart, but I'm guessing one strategy might be to add an offer table to the database which stores the discounted price and links to the product variant or cart item table by ID, and modify the stored proc that returns the cart data. I think the stored proc could return the accepted offer price if a related row exists, or the regular price if not. The layer of abstraction provided by the stored proc probably offers the best capability to integrate without disturbing the application's code too much.

Has anyone else attempted anything similar? Any thoughts?

Thanks again!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.