nopCommerce
  • Product
    • Store demo
    • Showcase
    • Features
    • Why for developers
    • Why for store owners
  • Downloads
    • Download nopCommerce
    • Marketplace
    • Translations
    • Copyright removal key
  • Support & services
    • Documentation
    • Community forums
    • Premium support services
    • Request a quote
    • Contact us
  • Partners
Back
  • Product
    • Store demo
    • Showcase
    • Features
    • Why for developers
    • Why for store owners
  • Downloads
    • Download nopCommerce
    • Marketplace
    • Translations
    • Copyright removal key
  • Support & services
    • Documentation
    • Community forums
    • Premium support services
    • Request a quote
    • Contact us
  • Partners
  • 0
    • Log in
    • Register
Get started

Profile: bestofelectricals

  • Profile Info
  • Latest Posts
bestofelectricals
Statistics
India
9
55
Thursday, April 27, 2017 3:07 AM
Send private message
4.2, website gets down after every app pool recycle.
My website is getting down after every Apppool recycle, do anyone have any idea how to resolve this issue.
Thanks
2 months ago
DataTables warning: table id=plugins-local-grid - Ajax error. For more information about this error, please see http://datatables.net/tn/7
Website is getting down as I restart the application using admin panel and getting following error

DataTables warning: table id=plugins-local-grid - Ajax error. For more information about this error, please see http://datatables.net/tn/7
4 months ago
how can i add the manufacturer logo in manufacturer template page
Mariann wrote:
Hi,

first you should populate PictureModel for manufacturer model. To do this add the following code to the Manufacturer method of the CatalogController:

            
//prepare picture model
            int pictureSize = 100;
            var categoryPictureCacheKey = string.Format(ModelCacheEventConsumer.MANUFACTURER_PICTURE_MODEL_KEY, manufacturer.Id, pictureSize, true, _workContext.WorkingLanguage.Id, _webHelper.IsCurrentConnectionSecured(), _storeContext.CurrentStore.Id);
            model.PictureModel = _cacheManager.Get(categoryPictureCacheKey, () =>
            {
                var pictureModel = new PictureModel()
                {
                    FullSizeImageUrl = _pictureService.GetPictureUrl(manufacturer.PictureId),
                    ImageUrl = _pictureService.GetPictureUrl(manufacturer.PictureId, pictureSize),
                    Title = string.Format(_localizationService.GetResource("Media.Category.ImageLinkTitleFormat"), manufacturer.Name),
                    AlternateText = string.Format(_localizationService.GetResource("Media.Category.ImageAlternateTextFormat"), manufacturer.Name)
                };
                return pictureModel;
            });



And then you can use

<img alt="@Model.PictureModel.AlternateText" src="@Model.PictureModel.ImageUrl" title="@Model.PictureModel.Title" />

in the ManufacturerTemplate.ProductsInGridOrLines.cshtml


Hi,
Could you please let me know what changes has to be done to use your code in Version 4.2 Beta.

Thanks in Advance
6 months ago
Displaying manufacturer logo on the product page...
sohel wrote:
hello

Thanks for your answer...
I get this error :

Compiler Error Message: CS0103: The name 'item' does not exist in the current context

Try like bellow===>
DefaultClean File:~\Views\Product\_ProductManufacturers.cshtml


@model IList<ManufacturerModel>
@using Nop.Web.Models.Catalog;
   @{
        var pictureService = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Services.Media.IPictureService>();
        var manufacturerService = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Services.Catalog.IManufacturerService>();
    }

@if (Model.Count > 0)
{
    <div class="manufacturers">
        @if (Model.Count == 1)
        {
            <span class="label">@T("Products.Manufacturer"):</span>
        }
        else
        {
            <span class="label">@T("Products.Manufacturers"):</span>
        }
        <span class="value">
            @for (int i = 0; i < Model.Count; i++)
            {
                var item = Model[i];

                var manufacturer = manufacturerService.GetManufacturerById(item.Id);
                var pictureUrl = pictureService.GetPictureUrl(manufacturer.PictureId, 100);

                <a href="@Url.RouteUrl("Manufacturer", new {SeName = item.SeName})">
                    <img src="@pictureUrl" alt="@item.Name" title="@item.Name" />
                </a>
                if (i != Model.Count - 1)
                {
                <span class="separator">,</span>
                }
            }
        </span>
    </div>
}


Hi SOHEL,

I tried your code in ver 4.2 Beta but got the following error can you help in this regard.

The model item passed into the ViewDataDictionary is of type 'System.Collections.Generic.List`1[Nop.Web.Models.Catalog.ManufacturerBriefInfoModel]', but this ViewDataDictionary instance requires a model item of type 'System.Collections.Generic.IList`1[Nop.Web.Models.Catalog.ManufacturerModel]'.

Thanks in advance
6 months ago
nopCommerce 4.20 BETA released. Please share your impressions
Congratulation for the beta release.
However I need a help,
How can i use / in category URLs to create Breadcrumb URL structure like
www.example.com/category/sub-category
earlier in version 3.9 it was done using some code like this which is available on following URL
https://www.nopcommerce.com/boards/t/36902/nopcommerce-360-url-breadcrum.aspx

But it would be more helpful if nopcommerce just allow to use / in URL

change is to be implemented in Ver. 4.2 as Seoextentions.cs and GenericURLRouteProvider.cs has been removed from the source.
7 months ago
  • 1
  • 2
  • Next
Product
  • Get started
  • Store demo
  • Showcase
  • Case studies
  • Features
  • Why for developers
  • Why for store owners
Download
  • Download nopCommerce
  • Marketplace
  • Translations
  • Release notes
  • Copyright removal key
  • License
Support & services
  • Documentation
  • Community forums
  • Premium support services
  • Request a quote
Community
  • Contribute
  • Certified developer program
  • MVP program
  • Blog
Partners
  • Solution partners
  • Technology partners
  • Recommended hosting
  • Become a partner
Company
  • Advertise with us
  • About us
  • Contact us
  • Facebook
  • Twitter
  • LinkedIn
  • YouTube
  • Instagram
Copyright © 2008-2019 nopCommerce. All rights reserved. Privacy policy