Replacing character in magento product descriptions after import - magento

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.

Related

Extra blank records in CRM import

I am trying to import a dataset into a custom entity in Dynamics CRM 2015 on-prem, using the import template for the entity, saved as CSV.
My dataset is quite small - only 10 rows. (Yes, I know it would probably take less time to just enter them manually).
When I import the data, CRM reads it as 3,001 records. The extra records show up totally blank. I am sure I don't have any extraneous data in other rows and columns.
Has anyone seen this, or have any idea what could be going on?
I have faced the same issue once. Sometimes the csv file containing some empty rows.
I have copied only the rows which containing data to a new csv file and imported it again. This approach solved my issue.
You can try once.
Another option is to open your CSV in Notepad or some other text editor. If there are additional rows, you will see them (rows that look like ",,,,,,,". You can delete them in the text editor and save, thereby being sure that Excel won't add the blank values back.

Skip attribute if filled in Magmi

I'm working on a client site where the description is only sometimes provided in the data feed, other times the data feed has an empty value for the description and it's entered manually. Currently the issue I'm seeing is that, when importing, Magmi will replace any manually entered descriptions with the blank field provided with the data field
Is there a way to tell Magmi not to overwrite an attribute if the value in the CSV is blank so that it doesn't delete manually entered data?
In a lot of field types, Magmi will treat a blank value as a 'do not update'.
Text fields will update verbatum though, so Magmi has an answer for this - replace your blank description fields with;
__MAGMI_IGNORE__
And Magmi will treat that field as though it werent in the data for that particular line item.
Example here on the Magmi Wiki http://wiki.magmi.org/index.php?title=MAGMI_IGNORE

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.

line break in csv file content

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.

How to increase maximum size of csv field in Magento, where is this located

I have one field when importing that can contain large data, it seems that CSV has unofficial limitation of about 65000 (likely 65535*) character. as both libreoffice calc and magento truncating the data for that particular field. I have investigated well and I'm certain it is not because of a special character or quotes. the data pretty straight forward, the lines are similar in format to each other.
Question: How to increase that size? or at least where I should look to find it?
Note: I counted in libreoffice writer and it was about 65040. but probably with carriage return characters it could reach 65535
I change:
1) in table catalog_category_entity_text
type of field "value" from "text" to "longtext"
2) in file app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php
const DB_MAX_TEXT_LENGTH = 65536;
to
const DB_MAX_TEXT_LENGTH = 16777215;
and all OK
You are right, there is a limitation in Magento, because it sets texts fields as TEXT in MySQL database and, according to MySQL docs, this kind of field supports a maximum of 65535 chars.
http://dev.mysql.com/doc/refman/5.0/es/storage-requirements.html
So you could change the column type in your Magento database to use MEDIUMTEXT. I guess the correct place is in the catalog_product_entity_text table, where you should modify the 'value' field type to match your needs. But please, keep in mind this is dangerous. Make a full backup before trying. And you may even need to play with core files... not recommended!
I'm having the same issue with 8 products from a list of more than 400, and I think I'm not going to mess with Magento core and database, we can reduce the description strings for those few products.
The CSV could care less. Due to Microsoft Access allowing Memo fields which can contain quite a bit of data, I've exported 2-3k descriptions in CSV format to be imported into Magento quite successfully.
Your limitation is either because you are using a spreadsheet that has a cell limitation or export limitation on cells or because the field you are trying to import into has a maximum character limitation set in its table for that field.
You can determine the latter by using phpMyAdmin to see what the maximum character setting is for that field.

Resources