Picture Manager

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 14 ans
Hi,
I have 3 questions about problems I am facing with "Picture Manager"
I like to display New Products, Best Sellers, Featured Products and Featured Categories.
To do that I will be using DataList or maybe Spry or Flash.


Problem 1:
I used DataList + SqlConnection to call Featured Categories based on a separate table called "FeaturedCategories" where I specified CategoryID which is joined with the CategoryID on Category Table. This way I managed to call all data except the Image URL. Even tried Object Data Source to call the "Picture Manager" within the datalist to display images ... still no clue how to do this :(

Problem 2:
To display New Products & Best Sellers etc I plan to use Spry or Flash. To do so I will be needing XML database. Again the problem is with Image URL. I have no Idea how to work with "Picture Manager". Please guide and provide info. for me to understand this way of working.

Problem 3:
I already have a huge database which will be imported to NOP Database. The images in my database have different names. They are based in ISBN or bar Code numbers i.e. ISBN.jpg or Bar Code.jpg
Changing file names of 4000 images is nearly impossible. I have no idea what to do.

I am really new to codes and with my past bad experiences I only feel satisfied with NOP. With some guidance I will be able to reach my goal of having a great online store based on NOP.
Il y a 14 ans
Guys I am really stuck with this problem.. :(
Need guidance
Il y a 14 ans
To begin with you should use the data access methods already available in nopCommerce. If you are adding a new feature, follow the same architecture, otherwise you will run into problems.

Regarding pictures

In nopCommerce pictures are just objects. Since a product can have many pictures, you need away of retrieving images for a specific product. Much of this work and image manipulation (resizing etc.) is managed by the PictureManager.

Essentially you should call the PictureManager.GetPictureUrl() methods in your scripts. There are a number of overloads for this method.

Basically you pass it your picture data object (say from a ProductPictures collection) and a size and it will generate the image (if it does not already exist), cache it on disk and return you the URL.

Regarding Flash, do you mean you need to call an XML web service. You can easily create a web service to return your objects and again pass the product url (PictureManager.GetPictureUrl) in your XML data.

HTH

Ben
Il y a 14 ans
Thanks Ben,
I went to "data access Methods" i.e. Bin/Nop.DataAccess.SqlServer.XML  & Bin/Nop.DataAccess.XML  (hope I was at the right place)
I tried to follow the same structure, by copy paste most of the whats there, unfortunately I am not that smart :(

Here is what I am string as my first step;
1. I created a Table in Database called "FeaturedCategories"
2. This table have only one column "FCategoryID" as Int
3. Created a stored Procedure also Called "FeaturedCategories".
    Here is the Procedure:
-------------------------------
  
ALTER PROCEDURE [dbo].[Nop_FeaturedCategories]

AS
SELECT Nop_Category.*
  FROM Nop_Category INNER JOIN
                         Nop_FeaturedCategories ON Nop_Category.CategoryID = Nop_FeaturedCategories.FCategoryID


-------------------------------
Can u guide me the nest steps required to display Featured Categories at home page.
If this can be done then I might follow the same steps to display Featured Products, New Products & Best Sellers.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.