Add picture field in Blog.

Posted: February 10, 2016 at 3:55 AM Quote #161551
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;
           }
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: February 10, 2016 at 4:06 AM Quote #161553
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.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Need help in any of these areas-Elastic search| Customization| Plugins| Themes| Upgrade| Server Setup (Hosting) |Consultancy| API? I’m just a click way!
Skype: [email protected], sohel.bs23
E: [email protected]
M: +8801719304086
W: http://nop-station.com/
Posted: February 10, 2016 at 4:25 AM Quote #161554
Yes i have use plugin that use nop.web as reference?

Any solution for that ?
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2017
Learn more