Importing to store using Magento dataflow profile - magento

I'm importing multiple products to Magento. I have two stores where I want to import products. I have created two stores in System / Manage Stores, but when I use store name in my csv-file in store column, it will return error "Skipping import row, store "mynewstorename" field does not exist.". If I use admin as store name, then products are imported successfully to Magento.
Version: Magento ver. 1.5.1.0

I found answer myself. When you create new store, you enter value code, and you must enter that code value to store column, not store value.

Related

Not able to get the orders under respective store view in multi store magento setup

I have a multistore Magento setup with separate website for each store. When I place an order from different store/website it ends up under default store (I see Default store view under Purchased from column in Sales>>Orders).
How can I set the respective store view context while saving the order in respective website/store? I check the database table to order master I see default store id which is 1 under column storeid.

How To move All Product One Domain to another Domain in Magento

Hello guys,
i develop magento site, all site done but we put product in another domain inside magento site, so how can all product would be transfer in one domain to another domain. like ex. 2000 product would be live one domain i need all product woulde be transfer in another domain.
You can create export, and import product to magento new instance, for last you can use magmi this fastly.
If you have one instance magento, but several storage for market, and domine for him. You can create simple shell and set all products all store for example
foreach(Mage::getModel('catalog/product') as $_product) {
$_product->setStore(1); // set store for product
$_product->setWebsiteIds(array(1)); // set array id's sites for product
$_product->save();
}
if you can't create export file. You can try create dump database product tables and, uply this dump to new system. If you don't have products in new instance.
see this answer for detail
Import magento category and product table only
but remember in last varient you need create full dump databases target systems.
p.s. sorry for my English.

Magmi import doesn't remove the products

I have been using Magmi to import products by adding items to the file " export_all_products.csv" without any problems
But when I have products that need to be remove,what I did was by removing the whole row in that product line in the csv file and upload it using magmi, but the products that I want to delete is still there and sometimes duplicated, is there a way to get it done or can I empty some tables in the database in phpmyadmin before I do the import?
Thanks so much
You need to use the Product Deleter plugin to delete products with Magmi.
Use the column name magmi:delete with the value of 1 on the rows you want removed from Magento.
Example CSV:
"sku","magmi:delete"
"00001","1"
"00004","1"

Products are not displaying in Frontend after import in Magento

I have imported products using System - Import/Export - Import option.
I can see my products in Admin panel, but not in Frontend.
I tried Re-indexing, cache clear, cache refresh, physical cache remove.
also checked product stock status, availability etc. Everything is ok.
But they are not displaying in frontend. I marked onething, If I open product that I imported using csv, just saved without any change, it starts displaying. But I have 100s of products. So I can't use this solution.
So please help me where I am going wrong in csv. below is my csv screenshot.
You need to ensure that the products are attached to a website.
This can be done via a bulk update:
Access the product listm select all
Alter attribute
Products information -> websites
It can also be done in the csv by using a "_product_websites" field and setting it to the website name or 'base'.
I forgot which CSV columns are mandatory but I do remember that if some are missing the importer does not tell you that but instead you get the behaviour that you are describing.
The simplest way to find out what is mandatory is to:
Fix bugs in Magento ImportExport module
Create a new product in admin
Check that the new product is visible on front-end
Export the new product with Magento ImportExport exporter
Delete created product
Import the previously exported product csv
Clear cache and reindex data
Check that product is visible on front-end (it should be)
Compare your CSV with the exported one and try to figure out what is missing from it
Try to import your CSV with added/fixed columns and add data untill the product is imported so that it is visible on front-end
This requires allot of trial and error...
The missing columns in my case had always the same value so if this will be the case with your problem as well you can simply extend CSV importer and hard code those values in there instead of fixing your CSV manually.
Since your product gets saved correctly if you open it in admin and save it you can also:
Import a product
Export that product
Open that product in admin and save it
Export newly saved product
Compare exported CSV-s where they differ
Fixing Magento ImportExport bugs:
First bug is that if you import multiple products the quantity informatino from the first product is used for all the products. To fix this you have to add $row = array(); right before $row['product_id'] = $this->_newSku[$rowData[self::COL_SKU]]['entity_id']; in Mage_ImportExport_Model_Import_Entity_Product::_saveStockItem() function.
The second bug causes Magento ImportExport module to return a foreign key constraint error when importing multiple products. Error happens because magento splits products data into multiple segments and if one product is located in two segments importer will delete data that was imported for the product in first segment before importing the second segment thereby causing database corruption (see this link for detailed explanation - this is where I got the solution below).
Note that removing foreign key constraint will not fix the problem but will instead make it worse since the database will contain corrupt data.
To fix it you have to change the code in Mage_ImportExport_Model_Import_Entity_Abstract::_saveValidatedBunches() function:
After if ($startNewBunch || !$source->valid()) { add
if ($startNewBunch && count($bunchRows) > 1) {
$arrKeys = array_keys($bunchRows);
$arrNew = array();
while(($tRow = array_pop($bunchRows))) {
$tKey = array_pop($arrKeys);
$arrNew[$tKey] = $tRow;
if ($tRow['sku']) {
break;
}
}
$nextRowBackup = array_reverse($arrNew, TRUE) + $nextRowBackup;
}
Hope this helps.
I had the same problem recently and I spent some time tring to figure it out...
Looks like magento needs a status flag for every product otherwise magento will not show it in the dashboard.
Solution : add a "status" column to your CSV file and set all the statuses to "Enabled"
(yes it's not a boolean. Just use the string inside the quotes as it is :)
I was stuck with the same problem, i then visited my var/export/export_all_products file, downloaded it again and uploaded the same back through import, logged out of my account and logged-in back, all products were back. This worked as a backup for me and i could see all the products back at the back-end.
Import as you have. If they are enabled, but not showing...
then you can fix this by clicking "select all" products in the "manage products" table and then "change status" and then select "enabled." This process might take a minute.
Visit your store and you should see your frontend with products.
Some kind of bug with the status/enabled setting.
You must have next fields in CSV
sku
_attribute_set
_type
_category
description
image
name
price
short_description
status
tax_class_id
thumbnail
visibility
weight
qty
_product_websites
is_in_stock
Please note that field is_in_stock is mandatory even if qty more then 1
In magento 2 we need to reindex in index management to display the products in frontend.
We can reindex through cmd.like the given example we need to enter magento file directory after that cmd php -f bin/magento indexer:reindex to reindex .
When I first started importing products via csv although I set the product to enabled, I figured out that even though it shows in the magento back end as enabled, it actually isnt - think its to do with setting the field contents as "1" or "0" rather than "enabled" or "disabled/null".
To get around this, after a import I simply selected all the products in the back end and change status to enabled - it fixes issue.
But, I do think if I simply changed the data in the csv import it would save me this minor in-convenience.

magento import unique key

when exporting and importing data in Magento via import/export profile, products are not being updated. We selected only mapped fields. I have some idea. But am unsure.
When you export and import, do you use the same profile? (or does the standard import function understand and import the mapped fields)
What does Magento use as the INDEX to update the correct record. We are updating SKU, but maybe this is used as key?
Thanks, appreciate the help
SKU is unique for every product. As imported product does not have id so magento can not understand that you are updating product if SKU is changed.

Resources