Introduction to CSV Product Management
Hey, this is Ori from Astro Web and I'm going to show you how to manage attributes and then make an import and export via CSV for your product management. So in some cases, you may not want to use the back end in order to import your products or update products, etc. So what you want to do is you want to make some modifications to the back end and then continue to use CSV.
So here I'm going to show you how to do a quick change of your attributes in the back end first. Okay, so first of all, we have a test category called shoes and I want to make a new attribute called laces. I want to specify which shoes have laces and which do not, for example. Okay, these have laces. So what I want to do first of all, I want to go to the actual attributes themselves. Okay, so I'm going to go to stores and I'm going to go to product attributes and I'm going to add a new attribute.
Defining a New Dropdown Attribute
Called laces. I'm clicking on add new and I'm going to add one called laces. Laces. And I'm going to specify what kind of field it is. Can the admin input just freehand, just write whatever they want? Can they select from a drop-down? Is that a radio button, etc.?
So in this case, we're just going to do it, use a drop-down and specify the values of it does have laces or does not. So I'm going to add, and I'm not going to require the admin to fill out this information. Okay, so I'm going to type in 'yes' is the first option, and then 'no'. And here you can specify if you have different store views or different languages, maybe French, Chinese, etc. you can specify what the translation will be here, but in this case, I'm just going to keep everything default. If you don't specify, they'll use the default admin ones.
Okay, so here I specified for laces, I can either fill up yes or no, and it is not required. Okay, so now I'm going to use the internal code. Just do a basically lower cases as the same thing right here. This is just the unique system.
Configuring Attribute Scope and Storefront Properties
Do I want to specify if this attribute is for a global, is it changeable based on store view, based on my languages, based on my website, etc? So typically, this I want to do store view, but this will kind of depend on how your store is set up. Okay and let's move on to the next thing. Okay, it is definitely not a unique value, it could be, you know, different for every product. Right?
So manage labels again, this is the same thing, if I do have different languages, I want to fill this up. Okay, so here I'm just going to call it laces. Now, storefront properties, we're not going to get too much in detail, but what this does is that allows you to specify how the attribute will be used in the system. Can this attribute be used when someone searches? So if someone searches for something, will this be in consideration for results? Okay. Will it be used in the layered navigation, actual filters on a category page? So typically when you're on a category page, you can sometimes filter by color, by size, by laces, things like that. Okay, and can you use it inside promotions, which is also a very good one. Okay, so pretty straightforward. Do I want to show it on my product page, things like that? So you can ask me questions if you have any questions about these specific ones.
Adding the Attribute to an Attribute Set
So now I'm going to click on save and now I need to add it to my attribute set because if I don't add it to the attribute set when I manage my product, that field is not going to be there. So I'll show you for a second. Okay, so if I click on products and I go let's say to this Converse shoe, right this one for example, I don't have in my attributes, I don't have laces right here. Okay.
So what I need to do is add it to the attributes that work to the set of defined attributes. So right now we only have one attribute set called default. So now I'm going to have to go here to stores, attributes, and attribute sets. I'm going to have to drag it in to make sure that all of my products that use that attribute set, in case all of the products will have it. Okay, so laces, I'm going to drag it into the specific area I want in the specific folder, right? So if I want it in, let's say the content section, I can add it there, but in this case, I just added it to the product details, which is the top one right here, laces. I'm going to click on save.
Creating and Exporting a CSV Template
Okay. So let's go here, I clicked on save, let's manage the product right here. Okay, right there. Okay, perfect. So if you remember, I added it right here to the top, but again, you can add it to any folder you want right here. So in this case, what I'm going to do is I'm going to click on yes, and I'm going to save it.
Now, the reason why I'm doing this back-end work is I want to set up a correct template. I want to set up a correct template so I can easily use that as a master CSV, a master excel sheet, and then work with that. And if I don't do that, it's going to be hard for me to figure out what Magento wants. So I'm creating at least one product, I'm setting the attribute sets, I'm filling the information for the product, and then I'm going to export it. So now we're good to go to the export. Okay, so now I'm going to go to system and I'm going to click on export, and I'm going to take the products, and I can filter. I can export all of my products or I can use this to actually filter some of the products. So let's go here and click on continue. So I'm showing all the products, and now right here I have my excel sheet. Okay, so I'm going to go to... let's delete this second... I'm going to actually put it into Google Drive where you can put it in Excel, right? And I upload it and now I'm going to open this file and now I can see the template.
Analyzing the Exported CSV Structure
So now that you can see, I have all of my products right here and most importantly, I have sample products and I have the correct columns. So I have the SKU, the store view code, the product type, categories, names, pricing, inventory, etc. So if you do have questions about any of these attributes, please let me know, I'll be happy to help, but they're pretty self-explanatory, most of them. What you can basically do if you're not sure is go and edit a product right here. Go go into edit a product. Let's go to the product we are interested in right here and then you can kind of match one by one, one by one for the attributes here. Okay, so product name, for example right here or attribute set, excuse me, wrong one. Okay, so attribute set default, this is attribute set product name, right here product name is called name, description. Okay, so a lot of them are very, very close.
Now a few other tips that are very important, and let's actually delete all of the products and keep one product to show. Okay, so let's do this right here. Okay, so now a few things. So SKU has to be unique. Okay, it cannot be shared. If you're uploading multiple products, you need SKU to be unique. So should a URL right, you don't want to have the same URL or you cannot have the same URL key for products. Now other things that are very important, okay, product type: simple, configurable, things like that. Categories, right, you can see here it's in the default category/shoes. Okay, and let's see. So we have here weight and price and tax. Now, some of the things will just have a digit. So for example, a zero or a one, and not not weight because it could be different, but let's give you an example right here. Okay, so for example this. So if you look at the quantity right here, there's a lot of zeros in one. So typically zeros and ones mean either a yes or a no. So let's show an example for here. So is it quantity decimal? So if I go here to advanced inventory, I can see quantity uses decimal, yes or no. So if it's a no, it's a zero right here, and if it's a yes, it's a one. So you can flip those on and off with a zero and a one, but in most cases, a lot of these zeros and ones you're probably going to want to keep the same settings. So that's why I like to have one existing file, basically copy or one existing product, excuse me, copy everything and start working with it in that way.
Adding a New Product via CSV
Okay, so what I'm basically doing right here, I'm going to set up a new product. Okay, and I'm going to give you a few more tips about the actual images. So let's set up a new product called 'test shoe'. Okay, so that's the unique. I'm going to delete this actually, okay, and I'm going to keep everything the same. In the same category, same type of product, I'm actually going to keep everything really the same right now. Which is 'shoe test' and then 'test description' and etc. I'm going to keep the price, so everything is kind of the same. It's taxable goods. I can view it, it's enabled.
Now images. So if you notice here based on the template, the existing product, you can see that image files are represented here. And basically Magento, once you upload the image, they'll put them in a specific folder. So they'll basically take the first character of the file name, this JPEG in this example, and the second character, a second number of the image file, and they'll put it in the folder. So 1 is in the 1 folder, and then in that folder there's a 5 folder, just to make things more organized and more optimized. So if your images are not on the system beforehand, you're not going to use this type of folders. What you're going to do is you're going to specify that the file name may be filename.png for example and then when you upload it, you're going to upload using FTP or SFTP to a specific folder and you're going to tell the system, Magento system, which folder it is. And I'll show you that in a second. Okay.
So let's see other things that may be important. Okay, so here's the laces. Here's the where we put laces equals yes. Okay, so you really want to use this correct. So let's say this is the laces equals to none. Okay, so the attribute we added before now is in additional attributes right here. Okay, great. So here's the quantity for stock and I think that's basically additional images. So if you again, if you have any questions, please let me know. Most of them you can just compare the product edit a product management, but I'll be happy to help. Okay, great.
Importing the CSV File into Magento
Once you finish this, you're going to go file, download as CSV, comma separated value, and now you have it right here. Great. So now we're going to go to the system and we're going to import. Okay, because we made a change. And let me just make sure one more thing is that we have a unique SKU and we have a unique URL. Let's change the URL to test-1-2. Okay, let's export again and comma separated values. Now I have my export, that's great, and now we're going to import the products.
So now we made changes. We're going to specify, do we want to add, replace or delete? Let's add a new one because we just specified. And you want to specify what is this system going to do if it encounters any errors and how many errors do you allow it to encounter. You can also specify to upload all the products that went correctly, upload correctly, and skip the ones with errors. But in many cases you want to completely fix everything before you do everything. This is up to you. Okay, let's click on stop on error and this the comma separated here is fine so you can use the default, that's fine. And now we're going to specify the actual file. So let's go to downloads and let the system refresh. And so once in this folder refreshes and I can select the file, here's in the bottom. Let's click here. Here's where you can specify where you put your images. So if we did upload images that exist, you're going to put them typically in a folder, something like var/import or any one you want on the system and then you're going to specify to Magento where are those images. And that's it. So again if you're uploading new images you do not need to specify the slash folder 1 slash folder 2, just put the filename correctly and then specify where you put it in. Okay. So let's click on check data right now, before it uploads. And you can see that it checked one row and everything was fine. So let's click on import.
Troubleshooting and Verifying the Import
So I've validated correctly, now import. Okay now the next one is it found an error with the images that we created right here. So the reason for that, let's go here, is this image, I did not upload the image to the system, so it could not find. So I'm going to delete it and let's try to upload again. Okay, so I made a mistake, I saw the error, and now I can work with it again. Okay, great. So let's go here and it did upload, but it did try to update, they try to download the file and it could not find that. So let's go here and go to products, go to catalog, let's view the product that it was uploaded correctly. Okay and this is the product right here, test product, right? Let's see here just to verify. Okay so it's called 'test shoe' and we called it 'test shoe... ok so let's search, and this is the product it was uploaded correctly and you can see laces is equal to no. Okay so laces equals to no, and we have all of the information here. Here's our correct SKU, here's the correct the product name. So that's basically it. I hope that makes sense. There are no images uploaded because we did not specify that it did not work. And so let me know if you have any questions, we'll be very happy to help. Hope this makes sense. Thank you.