0

I want to show the Product price and Add to Cart in product listing page when only we set custom attribute value as Approved. So, I have overridden the ListProduct block and written a function for getting the attribute value but in frontend the changes is not visible with cache enabled.

I tried make the cache disabled by cacheable="false" for a block but its not working too.

Can you anyone please guide?

1 Answer 1

0

You should never use cacheable=false because it disables FPC for the page, and disabling FPC for product list pages is very bad.

What you describe should work. Of course, after changing the product value, you have to clear the cache; also , if you're using flat indexes, you have to reindex.

If this doesn't solve the problem, it always helps when you share your code.

Your Answer

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

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