Top Banner
Using NopAdm Images, Catego min Import to Upload and A ories and Manufacturers I Assign In Excel
14
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • Using NopAdmin Import to Upload and Assign Images, Categories and Manufacturers In Excel

    Using NopAdmin Import to Upload and Assign Images, Categories and Manufacturers In Excel

    Using NopAdmin Import to Upload and Assign Images, Categories and Manufacturers In Excel

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 2 |

    Table of Contents

    Overview ................................................................................................................................................... 3

    Operating Systems Supported .................................................................................................................. 3

    NopCommerce Versions Supported ......................................................................................................... 3

    Getting Started .......................................................................................................................................... 3

    Generating a Sample NopAdmin Import Format in Excel ......................................................................... 5

    Populating the Excel Import File With Your Data ..................................................................................... 6

    Running Tests/Simulation ......................................................................................................................... 7

    Uploading Your Data to the Database ...................................................................................................... 8

    Utilities .................................................................................................................................................... 10

    Image Processing .................................................................................................................................... 10

    Storing Images in the File System ........................................................................................................... 11

    Understanding Each Field ....................................................................................................................... 11

    Licensing .................................................................................................................................................. 13

    How to Get Help ...................................................................................................................................... 13

    About NopAdmin .................................................................................................................................... 14

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 3 |

    Overview

    NopAdmin Import was developed to provide NopCommerce integrators and developers with an

    effective tool to load images, categories and manufacturers as well as the NopCommerce product and

    variant data in an Excel upload. It offers the ability to upload and assign multiple images, assign

    multiple categories and a manufacturer on a per product basis. It supports image creation in databases

    or the file system as well as allows the user to select to process images, manufacturers and categories

    individually on a per product basis.

    Operating Systems Supported

    Windows 2000, XP, Vista, Windows 7, Server 2003 and Server 2007

    NopCommerce Versions Supported

    NopCommerce 1.60, 1.70, 1.80, and 1.90

    Getting Started

    Visit http://www.nopadmin.com/category/1-nopadmin-for-nopcommerce.aspx and download the

    NopAdmin/NopAdmin Import version that you need to manage your NopCommerce store.

    Install NopAdmin/NopAdmin Import while taking all of the defaults during the installation. NopAdmin

    will place icons on your desktop and in the start menu called NopAdmin for NopCommerce or

    NopAdmin Import for NopCommerce depending on the product downloaded.

    Database Configuration

    NopAdmin Import can be configured to work on local databases (on your computer or local network) or

    remote (outside of your network) databases however, that being said as with anything you will

    experience MUCH faster results if you develop and configure your NopCommerce store locally. This is

    especially important if you have many images to store and/or many products to load. So, whenever

    possible please develop locally, then upload your NopCommerce store once it is developed to the

    remote hosting server.

    If this is absolutely not possible and you must load a remote site you should optimize your images down

    to a small size, for example less than 100kb, as uploading images will take a majority of the import

    process time.

    Upon initial startup, NopAdmin Import will display a series of initialization screens that loads the

    program as well as checks to see if you have configured your database settings. If you have not, you

    will be brought to the screen shown in Figure 1 below.

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 4 |

    Figure 1. Initial startup screen

    Here you will need to enter your server name, the database name you wish to load, and the method of

    authentication. If you are configuring a local database (i.e. one on your machine or network), most

    often you can select Connect using Windows Authentication. If you are connecting to a SQL Server

    that is remote you may use Connect Using SQL Authentication, then provide a valid SQL User Name

    and password that has read/write permissions to the database you entered in the Database Name.

    Click the Test Connection button. If you see a message that says TEST Complete! You are able to

    open this database, the Save Settings button becomes enabled. Click the Save Settings button and

    allow NopAdmin to restart to use the new settings.

    Important Note: Always be sure to click the Save Settings button when you get a Test Complete

    message!

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 5 |

    You also need to make sure you are using the proper NopAdmin Import version for your NopCommerce

    store. NopAdmins version numbers follow NopCommerce version numbers, so use NopAdmin Import

    1.80 with NopCommerce 1.80, NopAdmin Import 1.70/1.60 with NopCommerce 1.70 or 1.60, and so on.

    If you try to connect to a database of the wrong version you will get an error message when you click

    the Test Settings button.

    Generating a Sample NopAdmin Import Format in Excel

    NopAdmin Import is based upon the NopCommerce Product Excel Export, however because of the

    added functionality to import images, categories and manufacturers, Nopadmin Import requires several

    fields that are not present in the NopCommerce Product Excel Export. For more information on each

    field, please see the section titled Understanding Each Field.

    However, weve made it easy for you to get started. To generate a sample, click Import XLS in the

    menu bar to get to the Import Excel Spreadsheet as shown in Figure 2.

    Figure 2. The Import Excel Spreadsheet screen

    Now click the Generate NopAdmin Import Sample button to generate and view an Excel spreadsheet

    that is populated with NopCommerce demo store data is in the format that NopAdmin requires. See

    example below in Figure 3. You must have Excel, either the full version or the free Excel Viewer

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 6 |

    available at http://www.microsoft.com/downloads/en/details.aspx?familyid=1cd6acf9-ce06-4e1c-8dcf-

    f33f669dbc3a&displaylang=en installed on your machine to view the spreadsheet.

    Now save this Excel file somewhere on your machine in a place that you will be able to locate and

    change it. You will be spending some time in this file.

    Figure 3. Example NopAdmin Import Excel Spreadsheet with NopCommerce sample data

    and NopAdmin Import fields displayed

    Populating the Excel Import File With Your Data

    Theres not much to say here depending on the number of records you have, you will need to copy

    and paste a lot of data from your various spreadsheets into this sample format - however it will be

    worth it in the end by being able to configure most or all of the critical elements of your store in Excel.

    You will need to replace the changing fields in the spreadsheet with your data like name, short

    description, long description, sku, manufacturer part number, price, weight, height, length and so on.

    Other fields that have common values such as AllowCustomerRatings, Published and so on in the

    spreadsheet you will need to copy and make sure you include in your own data rows.

    WARNING: Never, ever, ever change the column names or the case sensitivity found in the first row

    the column names are needed exactly as they are in the sample for NopAdmin Import. Changing the

    column names or deleting one will result in an error in NopAdmin Import.

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 7 |

    You may already have a spreadsheet that is formatted for the NopCommerce Excel import, which has no

    capability to upload images or assign categories and manufacturers. If this is the case, please see the

    section titled Understanding Each Field to see how to add the NopAdmin Import fields to your existing

    spreadsheet.

    Running Tests/Simulation

    The NopAdmin Import will perform data validation by default before it uploads and updates the

    information in the spreadsheet. To perform the validation, just check Run Test as shown below and

    click the Import XLS button. This will simulate the uploading of your data but will not actually create

    or update any products, upload images or perform any mapping.

    Figure 4. Run Test checkbox

    NopAdmin Import will perform these basic validations:

    - SKU field is not blank

    - Name field is not blank

    - Price is numeric

    - If you have the ProcessImages field set to TRUE it will check to make sure each image name in the

    ImageName column and image path you specified in that rows ImagePath column both exists and

    that there are no permissions issues.

    - If you have the ProcessCategories field set to TRUE, it will validate the Category IDs that you have

    specified in the Categories column to make sure the ID exists in your NopCommerce database

    - If you have the ProcessManufacturers field set to TRUE, it will validate the Manufacturer IDs that

    you have specified in the Manufacturers column to make sure the ID exists in your NopCommerce

    database

    What it wont do as a basic validation:

    - NopAdmin Import will not read the database to see if the addition of the product and variants

    records violates any database record constraints such as a duplicate ID or an ID not existing in

    another table.

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 8 |

    All exceptions that are found will be reported in the Import Results window as shown below. The

    exception type as well as the SKU the exception is on will be displayed. You can also open the results

    of the test in a text editor by using the View Results button above the progress bar.

    Figure 5. You can view the status of all record operations in the Import Results window

    Uploading Your Data to the Database

    A suggested best practice is to Run Test, fix the exceptions, then Run Test repeatedly until you no

    longer get any Exception warning messages this means that your data passes basic data validations.

    Another best practice suggestion is to break your data up into small, manageable pieces. For example, if

    you have 50,000 records to upload, you may wish to create 10 files of 5,000 records each. This will allow

    you validate and upload one file at a time and this may be especially important when uploading to the

    live database. If, for example, your database upload failed at record 48,000 because of a data constraint

    violation you would need to wipe out the entire database and start over or remove all but the offending

    records in the Excel sheet and upload again.

    When you no longer receive exceptions, now its time to begin loading your data. I would create

    another spreadsheet that is a subset of your data say, of 100-500 records then upload that liveso

    you can see if your data will be inserted properly and most importantly, look and behave the way you

    want in the NopCommerce store before uploading all your data to the database. Dont worry, you can

    remove all uploaded data easily without opening SQL Manager in the Utilities menu as described in

    the next section.

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 9 |

    Figure 6. The results window displays successful category mappings, manufacturer mappings, and image uploads when you

    run without the Run Test checkbox selected

    WARNING: If you have selected to process images and your upload fails at any time, you MUST select

    Remove DB images and Remove Image Mappings before uploading again or you could get duplicate

    images for each product. This is to is to help conserve space taken up by images in the database.

    NopAdmin Import does not track the successful image uploads in this version, so the same images will

    be processed again if you an upload fails and you need to do it again.

    You do not need to remove the manufacturer and/or category mappings manually as the program will

    remove all existing mappings before processing the IDs that you have specified.

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 10 |

    Utilities

    When you are satisfied that your test uploads are working as expected, go ahead and clear out what

    you have uploaded. You can also use these steps to clear out and prepare the database for new uploads

    if the uploads fail at any time:

    1. Click Utilities in the menu bar.

    2. Select Remove Image Mappings. Confirm it twice to remove all the image to product

    associations.

    3. Select Remove DB Images. Confirm it twice to remove all the images in the database. If you

    store your images in the file system, clear out c:\program files\nopadmin\webSiteImages.

    4. Remove All Products. Confirm twice to remove all products.

    WARNING: If you have selected to process images and your upload fails at any time, you MUST

    select Remove DB images and Remove Image Mappings before uploading again or you could

    get duplicate images for each product. This is to is to help conserve space taken up by images

    in the database. NopAdmin Import does not track the successful image uploads in this version,

    so the same images will be processed again if you an upload fails and you need to do it again.

    You do not have to remove the manufacturer and/or category mappings manually as the

    program will remove all existing mappings before processing the IDs that you have specified.

    Image Processing

    Lets face it, uploading your images to NopCommerce can take time, and a lot of it if you have

    hundreds, thousands or even tens of thousands of products as I know some of you do. Heres where

    NopAdmin Imports rubber meets the road.

    The number one rule to image uploads is RESIZE and OPTIMIZE your images before uploading them. This

    will benefit you in so many ways it will save database size or file system size depending on where you

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 11 |

    store your images, the pictures will render faster on the web site as the server will not have to work to

    resize an image dynamically from 3MB to 60KB, and obviously your uploads will be much faster.

    A free and reasonably good resizing tool is Googles Picasa. You can download it at

    http://www.google.com/picasa. A good tutorial on image resizing with Picasa can be found at

    http://www.latech.edu/tech/rural/website%20project/web_tutorial/articles/resize_pictures_picasa.htm

    You should resize your jpgs as jpgsand unless your site needs larger images you should set the

    maximum width to be around 800 pixels. This will keep the file sizes small as well. So, do yourself a

    favor and resize your images before uploading them, no matter what tool you use!

    Storing Images in the File System

    There has been a lot of discussion and debate about the best place to store images which were not

    going to get into here. There are valid arguments for both methods. By default, NopCommerce stores

    its images in the database, and this may be fine for most stores. However, more than a few folks weve

    talked to have very specific needs for storing their images as files in the file system - such as database

    size limitations as set by their ISP so how does NopAdmin Import handle this?

    If you have the name Media.Images.StoreInDB in the table Nop_Setting set to TRUE, your

    NopCommerce store will look for its images in the ~/Images folder, just off the web root.

    NopAdmin Import reads this value and can process images as files if this is set to TRUE. As each Excel

    row is read and the image names in the ImageName column are processed, NopAdmin Import will

    store that image in the NopAdmin WebSiteImages folder, usually at c:\program

    files\nopadmin\WebSiteImages. The image name will contain the proper PictureID from nop_Picture ,

    so your NopCommerce site will recognize and display that image from the picture key in the sites image

    rendering logic.

    You will need to copy or FTP those images to the ~/images folder for the site to render them properly

    and you dont get the dreaded No Image Available graphic in place of the image when you view your

    NopCommerce site.

    If the Media.Images.StoreInDB in the table Nop_Setting set to FALSE, the image will be uploaded and

    stored in the database and no further action is required.

    Understanding Each Field

    The fields that NopAdmin Import requires and are not part of the NopCommerce Excel Import are

    highlighted in blue on the spreadsheet. If you have an existing spreadsheet you need to add these to,

    simply copy and paste these copied cells into your existing spreadsheet.

    Comments for each field can also be displayed by mousing over each column header.

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 12 |

    Image Processing Fields

    ProcessImages A toggle to tell NopAdmin Import to perform image uploads and associations. You can

    set this to TRUE or FALSE on a per product basis. Note: Excel requires an apostrophe in front of the

    TRUE or FALSE to make this a character, not a boolean field. If your images are not being processed ,

    make sure you have TRUE and not TRUE entered.

    Valid values are TRUE and FALSE or blank. Only when TRUE will images be processed.

    ImagePath the path name where the images that are defined in the ImageName column are located.

    You can only specify one path name here. If you have more than one image name they all must exist in

    the specified path. Example: C:\Users\Public\Pictures\Sample Pictures

    ImageName - the image name or names that you wish to upload and assign to the product level on the

    same row. If you have just one image to display, simply enter the full file name in the cell such as

    img001.jpg. If you have more than one image to upload and assign, separate each full image name with

    semicolon, such as img001.jpg; img002.jpg; img003.jpg. You do not need to include a trailing semicolon.

    NopAdmin Import will process each image name in the cell individually. You can also specify an

    unlimited number of images. The ImageName must reside in the folder specified in the ImagePath cell

    or you will get an exception as file not found that will appear in the Run Test results.

    Categories Fields

    ProcessCategories A toggle to tell NopAdmin Import to assign the category IDs as listed in the

    Categories column. You can set this to TRUE or FALSE on a per product basis. Note: Excel requires an

    apostrophe in front of the TRUE or FALSE to make this a character, not a boolean field. If your images

    are not being processed , make sure you have TRUE and not TRUE entered.

    Valid values are TRUE and FALSE or blank. Only when TRUE will images be processed.

    Categories - the category ID or IDs, that you wish to map to the product level on the same row. If you

    have just one category to map, simply enter ID in the cell, such as 31. If you have more than one

    category to assign, separate each full image name with semicolon, such as 31; 32; 33. You do not need

    to include a trailing semicolon.

    NopAdmin Import will process each category in the cell individually. You can also specify an unlimited

    number of categories. The categoryID must be a valid category as defined in nop_category. You can

    view a list of Categories and subcategories and their IDs by clicking Categories in the menu bar.

    Manufacturers Fields

    ProcessManufacturers A toggle to tell NopAdmin Import to assign the manufacturer ID as listed in the

    Manufacturers column. You can set this to TRUE or FALSE on a per product basis. Note: Excel

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 13 |

    requires an apostrophe in front of the TRUE or FALSE to make this a character, not a boolean field. If

    your images are not being processed , make sure you have TRUE and not TRUE entered.

    Valid values are TRUE and FALSE or blank. Only when TRUE will images be processed.

    Manufacturers - the manufacturer ID that you wish to map to the product level on the same row.

    You can only enter one manufacturer ID in this cell, such as 4.

    The ManufacturerID must be a valid manufacturerID as defined in nop_Manufacturer. You can view a

    list of Manufacturers under Manufacturers in the menu bar.

    Product Variant Image Fields (in version 1.90 only as of 12/10/2010, support for versions 1.60-1.80

    will be forthcoming)

    ProcessVariantImage A toggle to tell NopAdmin Import to create and assign the image specified in the

    VariantImageName field to the product variant. You can set this to TRUE or FALSE on a per product

    basis. Note: Excel requires an apostrophe in front of the TRUE or FALSE to make this a character, not

    a boolean field. If your images are not being processed , make sure you have TRUE and not TRUE

    entered.

    VariantImageName - the image name that you wish to upload and assign to the product variant level on

    the same row. You can only enter one image name here as the product variant only supports a single

    image. You do not need to include a trailing semicolon.

    The VariantImageName must reside in the folder specified in the ImagePath cell or you will get an

    exception as file not found that will appear in the Run Test results.

    Licensing

    The free trial version allows processing for up to 50 products, enough to allow you to become

    acquainted with the functionality of the software. To license your product, please visit

    www.nopadmin.com to purchase your copy. Instructions for activating your license will be sent in you

    in the license request confirmation.

    How to Get Help

    Although we strive to create the best product possible to help you load and configure your

    NopCommerce store, all the testing in the world we do on our development machines will not match

    the wide variety of data and mistakes the real world will present.

  • Using NopAdmin Import to Upload Assign Images,

    Categories and Manufacturers in Excel

    Copyright 2010 NopAdmin.com Page 14 |

    If you experience problems or have questions, please visit our NopAdmin forums at

    http://www.nopadmin.com/boards/. Please feel free to post your own questions or bug reports there

    and well do our absolute best to make sure you are taken care of.

    You can also email [email protected] if you like.

    About NopAdmin

    NopAdmin was developed in 2010 by Ique Inc. to help NopCommerce storefront owners as well as

    NopCommerce Solution Providers quickly and easily maintain their NopCommerce storefronts.

    We specialize in .NET Technologies and can help you design, customize and implement your

    NopCommerce storefronts - and we can host them for you too. We also take on other .NET Windows or

    Web-based programming projects on a case by case basis. Let us help you with your project today. No

    obligation quotes are always provided at no charge.

    Learn more about our services at http://www.nopadmin.com/topic/13-nopcommerce-solutions.aspx

    Want more information? Contact Us