0

I am setting cookie in customer system's browser when customer comes from google ads, for that I had done some code for detecting that he/she is coming from google ads or not. In addition, when customer comes from google ads at that time I am setting some cookie in customer's browser.

I have created catalog price rule in admin and that rule is already activated, but I want to apply that rule if and only if customer's browser has some cookie value.

Does any one have any idea how to validate catalog price rules based on customer's browser cookie?

0

I think you can override this observer - Magento\CatalogRule\Observer\ProcessFrontFinalPriceObserver - its sets the final price of the product based on the applicable catalog rules, you can override it and add a code that checks if the cookie is set, if not - don't set the special price.

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.