Image from url

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Is there a way I can modify the code so that my instead of getting images from the database I can enter in a url and it will display that image?
14 years ago
nopCommerce has a special method in its code that creates the image url.  Did you know that when you save an image to your database that nopCommerce automatically creates the tumbnail of that image on disk as well?  

The method used in nopCommerce to return the URL of the image saved on disk is
PictureManager.GetPictureUrl(@PictureID, @Size);

Where @PictureID is the id of the picture you want the URL for and @Size is the size of the picture.  nopCommerce store the pictures on disk with the file name setup with the picture id and the thumb nail size making up the file name like this:

00012_80.jpg

The first number is the picture ID and the second number is the thumbnail size.

To get the default setting from your admin panel for image sizes use this:

PictureManager.GetPictureUrl(@PictureID, SettingManager.GetSettingValueInteger("Media.Product.DetailImageSize", 300));
12 years ago
I created additinal aspx page who read products records and I would like
to know which files I need to import or use a CodeBehind files to call it
so I can display the pictures url?

I use NopCommerce 1.9
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.