2

I need to update product price on Product detail page based upon the quantity selected by the user.

When the user ADD an item to the cart, scaled price should be reflected according to the quantity they select (qnty: "1-to-3", Price="$30", qnty: "4-to-6",Price ="$25") and it should get reflected on MiniCart also.

I tried by overriding AddCartLineBlock pipeline (in Sitecore.Commerce.PlugIn.Carts.dll) to update the price, but it didn't work.

Is there any other way I could update the Cart price on AddToCart action and proceed to checkout flow with the updated price ?

1

What you're describing is called a price card. Price cards allow you to specify discounts for quantities added to the cart, and also dates that the prices apply. You can add/modify price cards from the pricing section in biztools. I would recommend using price cards rather than implementing custom functionality. In the Habitat environment, you can get to the price cards by going to Pricing > (Price Books) Habitat_PriceBook and you'll find the price card section there.

  • Hi Sandy, that information was really helpful. Thank you. – Jijo Viswanathan Oct 12 '18 at 15:13
  • Price card is having only [currency and unit-price]. How to calculate price, if we need to calculate price by considering 1 more factor( say, unit of scale, eg. : an item or a package of 100 items). How can we achieve this ? – Jijo Viswanathan Oct 18 '18 at 14:30
  • Can you elaborate? A discount for 100 items sounds like exactly what a price card is for. If it's a package, maybe it should have a different SKU. – Sandy Oct 21 '18 at 10:39
  • For me, the product details come from an external system. Which we sync with sitecore Catalog to generate the Catalog items. Every Product have 3 properties - Currency(eg: dollar), Quantity, and UnitOfMeasure(eg: 1 item, a package containing 100 items, etc.). Price has to be calculated based upon "UnitOfMeasure" field value. Can we achieve this using Price book ya need to go with extending any pipeline ? – Jijo Viswanathan Oct 22 '18 at 10:18
  • Maybe you mean a variant? e.g. 1 coke can individually, or a package of 24 coke cans together? Similar to t-shirt size or colour, where the product is the same but the colour/size/quantity is different. Sorry if I'm way off. – Sandy Oct 23 '18 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.