Add picture field in Blog.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
I have add a picture field in Blog. I have success fully upload picture in blog.

When i am getting picture to show in blog show picture with blog. but after some time it show error


Method not found: 'nop.web.models.media.picturemodel nop.web.models.blogs.blogpostmodel.get_picture() in nopcommerce

My code is

int? productThumbPictureSize = null;
           int pictureSize = productThumbPictureSize.HasValue ? productThumbPictureSize.Value : _mediaSettings.ProductThumbPictureSize;

           if (blogPost.Picture != null)
           {
               var picture = _pictureService.GetPictureById(blogPost.Picture.Id);


               PictureModel pictureModel = new PictureModel();

               pictureModel.ImageUrl = _pictureService.GetPictureUrl(picture, pictureSize);
               pictureModel.FullSizeImageUrl = _pictureService.GetPictureUrl(picture);
               model.PictureModel = pictureModel;
           }
8 years ago
dalbeersandhu89 wrote:
I have add a picture field in Blog. I have success fully upload picture in blog.

When i am getting picture to show in blog show picture with blog. but after some time it show error


Method not found: 'nop.web.models.media.picturemodel nop.web.models.blogs.blogpostmodel.get_picture() in nopcommerce

My code is

int? productThumbPictureSize = null;
           int pictureSize = productThumbPictureSize.HasValue ? productThumbPictureSize.Value : _mediaSettings.ProductThumbPictureSize;

           if (blogPost.Picture != null)
           {
               var picture = _pictureService.GetPictureById(blogPost.Picture.Id);


               PictureModel pictureModel = new PictureModel();

               pictureModel.ImageUrl = _pictureService.GetPictureUrl(picture, pictureSize);
               pictureModel.FullSizeImageUrl = _pictureService.GetPictureUrl(picture);
               model.PictureModel = pictureModel;
           }


Did you use any plugin that use nop.web as reference? If have and if it contains old contains nop.web.dll .

It may replace your new nop.web.dll if have any.
8 years ago
Yes i have use plugin that use nop.web as reference?

Any solution for that ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.