Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi guys :)
We are in the process where we are looking after a shop system which supports changing prices after which user is logged in :)
So if we have Customer A, B, C they are showed three different prices
Customer A sees a price of 10€ because he is a standard user
Customer B sees a price of 5€ because he is in a "Big customer" group
Customer C sees a price of 7,5 because he is in a "No tax" group :)
I think this might be achievable by overriding the default IProductAdapter https://vendr.net/docs/core/1-3-0/key-concepts/product-adapters/ This is what is used to extract product information from Umbraco and convert it into a format Vendr can handle.
I think you could override this, and more specifically the Price property on the ProductSnapshot such that it returns the price relative to the current member. For this to work you'd probably store multiple prices on the product node and then in your overridden product adapter return the price relevant to the current logged in member.
I think the only potential downfall here would be this wouldn't affect prices of items already in their basket so say Anonymous person A goes to the site and adds an item to the cart at Price A, but then proceeds to log in and now is able to have that product at Price B, the price of the item in the cart wouldn't update. I think you could get around this though by "Thawing" the frozen prices for an active order when this happens https://vendr.net/docs/core/1-3-0/key-concepts/price-freezing/
Hope this helps
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted