Close

Profile: iliyan.tanev

Avatar

User posts

Custom Rules
9 years ago

Hi,

This is your code and its ok if you are using nopCommerce below 3.4


public virtual void Register(ContainerBuilder builder, ITypeFinder typeFinder)
{
     builder.RegisterType<Reminder1Service>().As<IReminderRule>().InstancePerHttpRequest();
     builder.RegisterType<Reminder2Service>().As<IReminderRule>().InstancePerHttpRequest();
}


If you are using 3.4 or above the types are registered nop per http request but per lifetime scope.


public virtual void Register(ContainerBuilder builder, ITypeFinder typeFinder)
{
     builder.RegisterType<Reminder1Service>().As<IReminderRule>().InstancePerLifetimeScope();
     builder.RegisterType<Reminder2Service>().As<IReminderRule>().InstancePerLifetimeScope();
}


The difference is minor, but it could become reason for some unexpected behaviour.

Custom Rules
9 years ago

Hi,

Yes, you need to register it in the DependencyRegister.
Maybe it should be InstancePerLifetimeScope.

Regarding your plugin. No, this should be enough.

Hi,

Out of the box, No. 
But you can go to Plugins \ SevenSpikes.Nop.Plugins.ProductRibbons \ Views \ BasePageRibbonHtml.cshtml view and replace it with the following:

@model SevenSpikes.Nop.Plugins.ProductRibbons.Models.BasePageRibbonModel


    @if (!String.IsNullOrEmpty(Model.RibbonPictureModel.PictureUrl))
    {
        <img id="[email protected]@[email protected]" style="@Model.ImageStyle" src="@Model.RibbonPictureModel.PictureUrl" alt="@Model.Text"/>
    }
    else if (!String.IsNullOrEmpty(Model.Text))
    {
        if (String.IsNullOrEmpty(Model.RibbonPictureModel.PictureUrl))
        {
            <label class="ribbon-text" style="@Model.TextStyle">@Model.Text</label>
        }
        else
        {
            <label class="ribbon-image-text" style="@Model.TextStyle">@Model.Text</label>
        }
    }

With this you will be able to use the Text as Alt. This way you will be able to add custom text for your Alt for every ribbon.

Hi,

Maybe our Customer Reminders Documentation will be of help to your.

10 years ago

Hi,

We have fixed this problem in 3.4 and we've merged them to 3.2, as well.
The fix is just a setting - Highlight first element, which you could select if you want to highlight the first element or deselect if you don't.

If you update your theme package you will be able to use it.

Hi,

Yes, the New Products use special views but they are embedded thats's why you can not find them in the Traction Plugin folder.

They shouldn't be embedded, it is our mistake. Thanks for your feedback we will fix it and you will be able to update after we deploy.

10 years ago

Hi,

Thank you for reporting this!

Could you tell as which version of the NopCommerce are you using ?

P.S.
It would be better to submit a ticket about the problem.

10 years ago

Hi,

It would be best to submit a ticket so we could send you the packages while we are investigating the problem.

Bugs
10 years ago

Hi,

We've deployed a new version of InstantSearch in which the issue is fixed. You should update - here is our plugin update guide and this is our theme update guide.

10 years ago

Hi,

Attachments plugin by itself does not restrict the file size, but the IIS server does. Its default max file size is 4 MB if you want to increase it you will have to go to the primary web config and set this two settings in it.

<system.web>
        .....
        <httpRuntime targetFramework="4.5.1" maxRequestLength="30000" />
        .....
</system.web>

and

<system.webServer>
....
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="3840000" />
      </requestFiltering>
    </security>
....
</system.webServer>

Note that if you have those items (system.web, system.webServer) already  defined (by default you do) you will have to set the security and httpRuntime (by default you have httpRuntime but without maxRequestLength) in them. If you dublicate them it will throw an error which tells you that your configuration is invalid.

Hope this helps!