I want to add font-awesome.min.css to Nop.Plugin.Payments.CheckMoneyOrder. So I did:
In Nop.Plugin.Payments.CheckMoneyOrder plugin project, under Views\PaymentInfo.cshtml, I added the file like below. After that I built and gave a it a run. The css file is not loaded even though the code is executed when I debugged. What am I missing?
make sure the Content/font-awesome.min.css file exists in the content folder in your project click on the file -> properties Copy to output directory: Copy if newer
then build and check if the file exists in your plugin folder
When I verified the url below, it's there. However it's no where in the html when it's rendered. https://storeurl/plugins/payments.checkmoneyorder/content/css/font-awesome.min.css
I tried at my end as described above, and it's just working fine! [email protected] wrote:
I already tried that.
When I verified the url below, it's there. However it's no where in the html when it's rendered. https://storeurl/plugins/payments.checkmoneyorder/content/css/font-awesome.min.css
Can you please check the status of that css file in console!
It's not loaded but the url pointing to the css file is working. So what actually happened is in 3.9 we have to load the method @Html.NopCssFiles(this.Url, ResourceLocation.Head) after you add the css file or else it won't be added. Another way is to add the file into _Root.Head.cshtml if it's being used throughout the application.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.