I am creating a module. I have create one custom product attribute which value is YES/NO.

if product attribute value is Yes then Add to Cart Button hide And Show Custom Button

if product attribute value is NO then Add to Cart Button show And hide Custom Button

Note: code works everywhere when Add To Cart Button show in Website Not for Specific Page.

Please Help Me.

  • Can you please explain a bit more? Aug 10 '20 at 7:13
  • if product attribute value is yes then hide add to cart and show custom button. If product attibute value is No then show add to cart and hide custom button.
    – Msquare
    Aug 10 '20 at 7:15
  • on which specific page you want to display. Sep 14 '20 at 5:11
  • @RohanHapani everywhere in site and when button hide then show custom button.
    – Msquare
    Sep 14 '20 at 5:12
  • You can't able to do this functionality using single file. You need to add code where this add to cart button display. Sep 14 '20 at 5:13

Your Answer

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

Browse other questions tagged or ask your own question.