line break in csv file content - magento

Guys i need to create a very simple csv file with some product details in order to import them to an online shopping site. Each product has 3 attributes: name, description and price.
The csv file would look like this:
product 1,product description,100
product 2,product description,100
product 3,product description,100
I have 2 problems:
1) each product description has more than one line, something like
This the product's description.
This is a cool feature.
This is another feature.
Product made in the US.
How can i keep/add this formatting in the csv file?
2) second problem, most product descriptions contain a comma "," in there, like:
This product is great, reliable and also cheap.
How can i add these commas to the description without breaking the csv format?
And a final question: some product descriptions have more than 800 or even 100 characters. Is it possible to add that much characters in a field in a csv?

A workaround for the first problem is to use HTML <br/> tags instead of line breaks. That's what I'm doing, at least until I find a better solution.
So you would change:
This the product's description.
This is a cool feature.
This is another feature.
Product made in the US.
to:
This the product's description.<br/>This is a cool feature.<br/>This is another feature.<br/>Product made in the US.
As for the second problem: in my tests, Magento didn't seem to have any trouble with commas within fields. But you can always change the delimiter Magento uses. I usually use tab (\t). Make sure to use Magento's advanced import features in System > Import/Export > Dataflow-Profiles.

Related

Replacing character in magento product descriptions after import

I just imported over 20k items into magento.
The original data was from an access DB.
In the descriptions, all the " are showing as �
for example, the original description reads:
This arrangement is approx. 32" - 34" tall.
on the magento front-end it now reads:
This arrangement is approx. 32�-34� tall.
Reimporting the data is not an option.... I need to be able to either have this shown correctly in magento front-end using a hack or somehow replace all these characters with the proper characters in MySQL database, or somehow change the encoding...
Any suggestions would be appreciated.
Hi You need to save csv in utf-8 format before import
I ended up exporting all the descriptions, did a find/replace in notepad, saved it as utf-8. and re-imported them back in after other methods failed.
This wasn't what i wanted to go through again but i had no choice.

Magento quick search by SKU

When I try to search products by SKU, I get incomplete results. For example: I have products with SKU IR-CP-CH_1 and A-453-B-I_1. Both products are configurable products, both are visible for Catalog, Search. I get correct result for query IR-CP-CH_1 and no result for A-453-B-I_1.
Indexes are rebuilt. I use combined search type (like + fulltext). In advanced search everything works fine.
I suggest you take a quick look in your database at the table catalogsearch_fulltext. In the data_index column you should be able to see the SKUs as part of the full text string Magento creates for quick searching in.
See if you can either manually spot the elusive SKU 'A-453-B-I_1' or hit it with an
SELECT * FROM catalogsearch_fulltext WHERE data_index LIKE '%453%'
Maybe the SKU got entered with some strange characters or a space instead of a hyphen. You could search in the product_id column instead to see what search string Magento does have for that SKU.
If the string is in the table and the character glyphs match exactly, then I think you are looking to indexing, caching, stock, store views etc as suggested in the comments above by others
If the string is not in the table at all then I think you are looking to 'visibility'.
If you look in the table catalogsearch_query and find your search string 'A-453-B-I_1' then look to the num_results column - if that value is greater than zero then items were found but it's not displaying that product for some reason.
**EDIT following comments below
Actually I think you should remove that '0' result from the catalogsearch_query table. You could remove it using SQL or phpmyadmin. Magento will return a result from catalogsearch_query if it finds one rather that search catalogsearch_fulltext every time.
It is possible that at some point the result was '0' but now it is non-zero but Magento is stuck with the '0 results' in the catalogsearch_query table.
There is more analysis that can be done, but try that first and if it still isn't right we can look at trapping the database query to try to understand why Magento thinks the result is zero.
For information, in my case, a free module (activo_catalogsearch) was breaking the research by sku because it was not up to date and probably conflicting with magento 1.9.4.1 (worked fine before with magento 1.9.2.1)

Magmi Not Importing When CSV Files Contains Commas

I have installed and made some successful product imports in to Magento using Magmi, but as soon as I try to import any data where the spreedsheet columns have commas [,] Magmi will not perform the import.
For example when I save the data in this speadsheet as a CSV file Magmi successfully imports the data;
http://i.imgur.com/PpDt0PS.png
However, Magmi refuses to import the data in the table below, where you can see in column F I have added data that include 'commas'.
http://i.imgur.com/MtGJPCw.png
Can anyone advise. I am using an Apple Mac with OpenOffice to prepare and save my data.
Is the data not importing entirely, or is just the visibility column not being set?
Visibility is a Magento core attribute which Magmi can set by using exact numerical option id value.
Generally, the option values you want to use for the visibility field are as follows:
Not Visible Individually = 1
Catalog = 2
Search = 3
Catalog, Search = 4
So in your case, if you want to set these products to Catalog, Search, you can set the visibility column value to 4.
To double-check that the above mapping is correct for your instance of Magento, the easiest way is as follows:
Go edit any product
Look for the Visibility drop down field, and right click > inspect element
In the developer tools, take note the values associated to each label.
Below an example of the process and what to look for.
Axel is correct, you should set the data to the numerical value 4.
But I do also recommend you explore a better way to export CSV content from Open Office. You may have to start a new document because I find I only see the dialogue below once and then I never see it again. Create a new document, paste your data into it. Choose save-as, select CSV, and save it. Eventually you should see the dialogue below. Change the encoding to UTF 8, the text delimiter to " and tick the 'Quote all text cells' box.
Then you should be able to have any cells with commas or other things in them. Always ensure you CSV files are quoted. "like","this","so you, can","have commas, in them". It is worth inspecting your CSV file in a text editor to see the format is as expected before uploading it to MAGMI.

importing csv (magento)

I have a certain attribute dealer_country in my website, which is a dropdown attribute containing a list of all countries. However, in my csv file, the dealer_country attribute will be containing country codes(in 2-letter format). Would it be possible to import with this condition?
Yes. There is an easy way and a hard way.
If programming is your bag then you can get your attribute hooked up to the Magento country codes and have it return country names on the front end.
It would take a while to write such an ideal solution. However you can use a 3rd party import tool like 'Magmi' to get your products in without having to define your attribute values first.
Once in you can edit your attribute entries for country and, in the second column put the country names to be shown on the front end. e.g. for 'GB' in column one you have 'United Kingdom of Great Britain and Northern Ireland' in column two. Or for 'LY' you can add 'The Great Socialist People's Libyan Arab Jamahiriya' for column two... Oops!
http://sourceforge.net/apps/mediawiki/magmi/index.php?title=Main_Page

magento - import configurable product with magmi

Before posting this question, I've tried ways to make this work but it doesn't.
This is the csv structure:
|model - map to sku
|name
|price
|category - map to categories
|loc
|image - use image plugin - works fine
|description
|weight
|option_type
|option_value
|suggested_retail
|special_handling
|manufacturer
|manufacturer_code
|packaging
|in_stock
|last_updated
|active
|visibility : default mapper plugin, value: 'Catalog, Search'
|configurable_attributes : default mapper plugin, value: 'manufacturer,color'
example csv file: http://pastebin.com/kRW2vQrY.
All simple products are imported fine but the configurable ones don't. I already activate the configurable items with these settings:
Perform simples/configurable link Yes
auto match simples skus before configurable Yes
Force simples visibility No
I want to know why it doesn't work and solution for this problem ?
Thanks for reading :)
Since I solve the problem by writing my own parser to map some specifics column from original csv to magmi's csv structure. And I also create another file for configurable product with new two columns :
type : 'configurable'
simples_skus: list of simple skus
Thanks for reading and discussing :)
As I understand the automatic mapping, it is based on the attributes you specify for configurable_attributes (in your case manufacturer,colour). However, your csv structure does not seem to include values for the colour attribute

Resources