0

I know how Price Adjustment through the AdjustmentInterface (e.g. 10% off prices) work. (Magento\Framework\Pricing\Adjustment) (docs: https://developer.adobe.com/commerce/php/development/components/price-adjustments/)

I know how to add a Cache Context so a a new context is created to cache for. (Magento\Framework\App\Http\Context)

Question: Is it possible to combine those two mechanisms, since I cannot get it working. I confirmed both working individually.

The usecase is as follows. I want to apply a discount percentage based on a customer attribiute value which can differ per customer. So each discount value (10, 20 etc) should become a Cache Context so each first time it is cached for the next time.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.