Close

Use the plugins in my own theme

gs1219716
9 years ago
#10015 Quote
Avatar
  • 4
How can I apply the styles from the plugins to my own theme. Nothing I do seems to work. I have tried renaming the DefaultClean theme to the name of my theme thinking this code would then apply the styles. It does not. During debug the below code doesn't even seem to execute. I have also tried adding the html.xxx() lines of code directly into _root.head of my theme and that doesn't work either. I like some of your themes, motion in particular but it doesn't have all the plugins i want. We like our site and want to use the plugins on our theme but can't seem to wire up the css and js from your plugin. We would also want to modify the css a bit. Thanks.

@model SevenSpikes.Nop.Plugins.MegaMenu.Models.MegaMenuModel
@{
    Html.AddCssFileParts("~/Plugins/SevenSpikes.Nop.Plugins.MegaMenu/Themes/" + Model.Theme + "/Content/MegaMenu.css");




    var supportRtl = this.ShouldUseRtlTheme();
    if (supportRtl)
    {
        Html.AddCssFileParts("~/Plugins/SevenSpikes.Nop.Plugins.MegaMenu/Themes/" + Model.Theme + "/Content/MegaMenu.rtl.css");
    }




    Html.AddScriptParts("~/Plugins/SevenSpikes.Nop.Plugins.MegaMenu/Scripts/jquery.lazyload.min.js");
    Html.AddScriptParts("~/Plugins/SevenSpikes.Core/Scripts/SevenSpikesExtensions.js");
    
    if(String.Compare(Model.Theme, "DefaultClean", true) == 0)
    {
        Html.AddScriptParts("~/Plugins/SevenSpikes.Nop.Plugins.MegaMenu/Scripts/MegaMenu.js");
    }
}
Deni
9 years ago
#10016 Quote
Avatar
  • Moderator
  • 389
gs1219716 wrote:
How can I apply the styles from the plugins to my own theme. Nothing I do seems to work. I have tried renaming the DefaultClean theme to the name of my theme thinking this code would then apply the styles. It does not. During debug the below code doesn't even seem to execute. I have also tried adding the html.xxx() lines of code directly into _root.head of my theme and that doesn't work either. I like some of your themes, motion in particular but it doesn't have all the plugins i want. We like our site and want to use the plugins on our theme but can't seem to wire up the css and js from your plugin. We would also want to modify the css a bit. Thanks.


Hi, 

As far as I understand, you need to style our plugins to fit your theme styling.

To do this, you have to go to the desired plugin folder > Themes.
The easiest approach is to copy the Default Clean folder, paste it and rename it with the name of your theme.
Repeat this procedure for each of our plugins.
Now you can modify the CSS specifically for your theme.


By the code you pasted here:
if(String.Compare(Model.Theme, "DefaultClean", true) == 0)
    {
        Html.AddScriptParts("~/Plugins/SevenSpikes.Nop.Plugins.MegaMenu/Scripts/MegaMenu.js");
    }


I guess that you are not using the latest version of nopCommerce or not the latest version of our plugins for 3.60.

We have removed this hard-coded check few weeks ago. The Mega Menu was the only plugin, which had it.

Our plugins are fully usable for the theme you have. Just add a folder named by your theme, with the proper CSS files inside and you can modify the plugin to fit your theme.

I hope this will help you !
Best Regards,
Mladen Staykov
Nop-Templates.com
gs1219716
9 years ago
#10028 Quote
Avatar
  • 4
Thank you for the quick reply. That worked perfect. One issue. The MegaMenu 'Menu' link, in Responsive state, only seems to work when I set the theme back to 'Default Clean'. It's not working with my theme. The Ajax Cart and Quick View work fine on my theme.
gs1219716
9 years ago
#10029 Quote
Avatar
  • 4
Forgot to mention I'm using nop 3.5 and your 3.5 trial plugins. I normally stay a version back until all the kinks are worked out of the newest version.

Thanks.
Deni
9 years ago
#10035 Quote
Avatar
  • Moderator
  • 389
gs1219716 wrote:
Thank you for the quick reply. That worked perfect. One issue. The MegaMenu 'Menu' link, in Responsive state, only seems to work when I set the theme back to 'Default Clean'. It's not working with my theme. The Ajax Cart and Quick View work fine on my theme.

Forgot to mention I'm using nop 3.5 and your 3.5 trial plugins. I normally stay a version back until all the kinks are worked out of the newest version.


Hi, 

I am not sure if staying one version behind is a good idea, because this way you miss many new features and improvements.

In this case you will miss a bug fix - the issue I was talking about was fixed in v3.60. In your version you need to modify this code to check for the name of your theme too:
if(String.Compare(Model.Theme, "DefaultClean", true) == 0)


We recommend you to upgrade to the latest version of nopCommerce.
Best Regards,
Mladen Staykov
Nop-Templates.com
gs1219716
9 years ago
#10040 Quote
Avatar
  • 4
Staying one version behind makes perfect sense. I don't want to introduce to my site nor have to worry about "bugs" or "bug fixes" that are almost always present in any new software and then have to wait for a "fix". Applying the newest version, where it may fix old bugs, introduces newer bugs that could have detrimental effects on the site. For instance moving from nop 2.65 to nop 2.8 nearly destroyed our site, performance wise, so nop could accommodate fly out menus. The performance of fly out menus may have been enhanced but for anyone that has 2500 categories and 20,000 items it was a backend nightmare. We had to pay nopCommerce $300 for support to fix the issue in 2.8 pretty much bringing 2.8 back to the way 2.65 handled categories.

I already figured out that line of code and replaced it with the name of my theme and it works. The plugins are great. I will be purchasing them shortly or possibly just buying a template and modifying that.

Thanks
Deni
9 years ago
#10044 Quote
Avatar
  • Moderator
  • 389
gs1219716 wrote:
Staying one version behind makes perfect sense. I don't want to introduce to my site nor have to worry about "bugs" or "bug fixes" that are almost always present in any new software and then have to wait for a "fix". Applying the newest version, where it may fix old bugs, introduces newer bugs that could have detrimental effects on the site. For instance moving from nop 2.65 to nop 2.8 nearly destroyed our site, performance wise, so nop could accommodate fly out menus. The performance of fly out menus may have been enhanced but for anyone that has 2500 categories and 20,000 items it was a backend nightmare. We had to pay nopCommerce $300 for support to fix the issue in 2.8 pretty much bringing 2.8 back to the way 2.65 handled categories.

I already figured out that line of code and replaced it with the name of my theme and it works. The plugins are great. I will be purchasing them shortly or possibly just buying a template and modifying that.

Thanks


Hi, 

Yes, you have your point.

I am glad that you have figured the code and you like our products !
Best Regards,
Mladen Staykov
Nop-Templates.com