Just wondering how I would go about implementing upgrade options in Merchello dynamically based on existing customer purchases.
Basically, we are going to sell our product licenses through Merchello, which is fine for new licesnes, however if a user is already a license holder we will want to offer optional upgrades of which the price will be dynamically calculated depending on the users current license and time-left etc.
How could I feed this into Merchello at runtime? Is it possible? If so is it a lot of work?
We have thought of a scenario very similar (ours was wholesale pricing) and while I have yet to setup a store that implements the front facing logic the underlying code is in place. Merchello looks at things from a line item perspective with respects to the checkout workflow (not a product perspective).
In your scenario, assuming your using MVC, you'd have a Controller/SurfaceController that would add items to the "Basket". We have a few examples of these and are happy to share. The Basket object (Merchello.Web.Workflow.Basket) has quite a few overloads of AddItem - my guess is you would use this one:
public void AddItem(string name, string sku, int quantity, decimal price, ExtendedDataCollection extendedData)
You would grab the name, sku, maybe default the quantity to 1 and dynamically set your price. You would then set the extendedData values you needed for checkout -
There's also an AddItem method to add the product/product variant directly - in which case you could find the line item and adjust the extended data values as you see fit.
Please let me know how it goes and if you need more explanation I'd be happy to chat with you over Skype. Having an actual implementation rather than concept always helps flush things out and I'll make sure we knock off any roadblocks if we find them.
Selling software licenses / upgrades etc.
Hi guys
Just wondering how I would go about implementing upgrade options in Merchello dynamically based on existing customer purchases.
Basically, we are going to sell our product licenses through Merchello, which is fine for new licesnes, however if a user is already a license holder we will want to offer optional upgrades of which the price will be dynamically calculated depending on the users current license and time-left etc.
How could I feed this into Merchello at runtime? Is it possible? If so is it a lot of work?
Thanks guys, and keep up the good work :-)
Kev
Hi Kevin,
We have thought of a scenario very similar (ours was wholesale pricing) and while I have yet to setup a store that implements the front facing logic the underlying code is in place. Merchello looks at things from a line item perspective with respects to the checkout workflow (not a product perspective).
In your scenario, assuming your using MVC, you'd have a Controller/SurfaceController that would add items to the "Basket". We have a few examples of these and are happy to share. The Basket object (Merchello.Web.Workflow.Basket) has quite a few overloads of AddItem - my guess is you would use this one:
You would grab the name, sku, maybe default the quantity to 1 and dynamically set your price. You would then set the extendedData values you needed for checkout -
maybe:
There's also an AddItem method to add the product/product variant directly - in which case you could find the line item and adjust the extended data values as you see fit.
Please let me know how it goes and if you need more explanation I'd be happy to chat with you over Skype. Having an actual implementation rather than concept always helps flush things out and I'll make sure we knock off any roadblocks if we find them.
Thanks!
Hi Rusty
Thanks very much, that looks extremely straight forward, I will give you a shout if I hit any issues but this looks good to me.
Cheers
Kev
is working on a reply...