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?
-
Please add more information to the question. – Sukumar Gorai Jun 18 '18 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 '18 at 9:12
-
These functionalities are already in the extension you are using? – Sukumar Gorai Jun 18 '18 at 9:15
-
No.I've created them from 0. – Keeara Jun 18 '18 at 9:16
-
Did you call the css for those font color and backgroud color in your module? – Sukumar Gorai Jun 18 '18 at 9:17
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');
-
-
I have updated the code. # was not there. Please check and update again. – Sukumar Gorai Jun 18 '18 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 '18 at 9:52
-
-
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 '18 at 10:05