0

I have created some buttons in the magento2 backend : One is for the background color of the popup, the other is for the font color of the popup. I have tried everything but nothing is working, what can i do?

8
  • Please add more information to the question. Jun 18, 2018 at 9:12
  • imgur.com/a/O8e0z08 These are the backend and the frontend pics I dont know how to change the background and the font color of the newsletter popup with this buttons I need to change something in the phtml file?
    – Keeara
    Jun 18, 2018 at 9:12
  • These functionalities are already in the extension you are using? Jun 18, 2018 at 9:15
  • No.I've created them from 0.
    – Keeara
    Jun 18, 2018 at 9:16
  • Did you call the css for those font color and backgroud color in your module? Jun 18, 2018 at 9:17

1 Answer 1

1

You need to call the color and colorsample like below:

$background_color_popup_style = "style=background-color:#".$block->getConfig('color');
$color_popup_style = "style=color:#".$block->getConfig('colorsample');
10
  • I pasted the strings but the popup is still white..
    – Keeara
    Jun 18, 2018 at 9:42
  • I have updated the code. # was not there. Please check and update again. Jun 18, 2018 at 9:43
  • update: there is another mistake in the strings. It's getConfig, not, getCofig (anyway i'm trying right now if it works!).Thanks a lot for the help!!!
    – Keeara
    Jun 18, 2018 at 9:52
  • Typo mistake. It should work. I have updated my answer. Jun 18, 2018 at 9:53
  • where i have to put this strings imgur.com/JdrXR7r Because now the upper part of the page is green (i set it from the button )
    – Keeara
    Jun 18, 2018 at 10:05

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.