Close

Profile: Stefan

Avatar

User posts

10 years ago

Hi lftalero,

I am curious to see why the approach I mentioned in my last post did not work, because when placing your css file right after the NopCssFile files, your css will be placed after these files. The same as if you place your css before the closing <head> tag as you did. So if you can send us a link to see this scenario will be great.

As both approaches are very similar it is absolutely fine and correct to place your css in the head section after all nop css files, so that you can override any css rules and styles in your file.

Hope that helps!

10 years ago

Hi LFTALERO,

When you use Html.AppendCSSFileParts this will insert the css file in the beginning of all css files already added. So that is why when you use Html.AppendCssFilePart after the the line for the Alfresco styles, it gets added in the beginning before the styles.css. So you should either place your line of code in the before all other files in the Head view or use Html.AddCssParts which will add it at the end.

The best way to add your css file and be sure that is rendered always at the end you can follow the approach from below:

In your _Root.Head.cshtml view:

@Html.NopCssFiles(this.Url, ResourceLocation.Head)
<link type="text/css" rel="Stylesheet" href="@Url.Content("~/Themes/Alfresco/Content/css/custom-user-styles.css")" />
@Html.Widget("head_html_tag_after_css_files_alfresco")  


Thus your css will be added after all nop css files and before the styles entered in the Custom Head Styles textbox.

Can you please try the following approach and let us know if the css order is correct.

Hope that helps!

10 years ago

Hi Tredegar,

In order to restore your database to a certain time, you need to have a backup created at that time.

If you let us know what is exactly the issue you are having after installing the theme we will be able to help. If you need to hide the bestsellers from the home page, you only need to go to admin -> configuration -> setting -> catalog setting and uncheck the "Show bestsellers on home page" option. You can also change the categories image size from admin -> configuration -> settings -> media settings. There is really no need to restore your database, but just adjust the settings.

Looking forward to your reply!

10 years ago

Hi ezzat2k,

Can you try the following approach using the js method. Just change the js function as shown below:

<script type="text/javascript">
        $(document).ready(function () {
            if ($.isMobile())
            {
                $('.html-widget').remove();
            }
        })
    </script>


Please let us how it goes!

Thanks!

Hi godinamo,

You are right that the check is missing. But I think it will be best to use the Model.BlogEnabled as the rss is for the blog. We will add a check in our themes about that.

Thanks for the feedback!

10 years ago

Hi ezzat2k,

You see the html widget because when you turn the tablet in landscape mode, the viewport gets bigger than 768px and according to the media query it will be displayed.

So you have two options in general:

1. Remove the html widgets on mobile devices regardless the width of the display. Just open the _Root.Head.cshtml from your theme or from the general Views folder of nopCommerce and add the following:

in the <head>

Html.AddScriptParts("~/Plugins/SevenSpikes.Core/Scripts/SevenSpikesExtensions.js");


and then in the <body> the following js

<script type="text/javascript">
        $(document).ready(function () {
            if ($.isMobile())
            {
                $('.html-widget').hide();
            }
        })
    </script>



2. If you want to hide the html widgets depending on the width of the viewport just change the 768 from the media query from my previous post.

Hope that helps! 

mihailo82 wrote:
Thanks, I got it solved. It was some style problem, few modifications in CSS and now it looks like it was meant to be.

Again, thanks for help!


Hi mihailo82,

I am glad you managed to fix this by yourselves. We have also fixed this and uploaded on our site. If you want you can download the theme again and replace the following files with the one from your downloaded package:

Themes/Smart/Content/css/980.css
Themes/Smart/Content/css/forum.css
Themes/Smart/Content/css/styles.css


and add the following file
Themes/Smart/Content/img/multipad.png

If you want to preserve your fix, you do not need to do the above steps.

Again thank you for your feedback!

10 years ago

ezzat2k wrote:
Greetings Gentlemen,

Just purchased the HTML Widgets Plugin, Works really great on desktop, but is there any way we can eliminate the widgets from showing on the mobile version?!  Perhaps a CSS code to add?!


Thank you


Hi ezzat2k,

Thank you for the kind words.

You can do the following:

Open the Plugins\SevenSpikes.Nop.Plugins.HtmlWidgets\Views\HtmlWidget\_HtmlWidget.cshtml view and add a class to the div, i.e. 

<div class="html-widget">
                @Html.Raw(htmlwidget.HtmlContent)
            </div>


Then you can add a css media query to hide the widget under a specific view port, i.e.

@media all and (max-width: 768px) {
    .html-widget {display: none;}
}


Thus all html widgets will be hidden under 768px viewport which is the view port of a tablet in portrait mode.

Hope that helps!

10 years ago

Hi NOPMSTR2014,

The favicon used in nopCommerce is the one in the root folder. We do not replace it in any way in our theme. I suppose that you should clear your browser's cache and hard reload your site,so that the new favicon gets loaded.

Please let us know if the issue still exists.

Bugs
10 years ago

Hi BlueMed,

I have replied to you in the following forum post.

Please do not duplicate forum posts.

Thanks!