I have imported 16990 products to my website via Import All products Profile
Its divided info 9 files
8 files contains 2000 products
and 1 file contains 990 products
All files imported successfully with no error messages
After checking the total number of records from catalog, about 1500 products are Missing
I have double check the CSVs files its correct with no issues
Could you please help me to explorer the issue?
Well, I have prepared a workaround for this problem. First of all, check if your missing products are showing in the database. If yes, try to do the following:
Sign in to Magento Admin Panel
Go to Catalog > Manage Products
Your current URL will look like this:
yourdomain.com/index.php/admin/catalog_product/index/key/[your_key]/
Change your URL to:
yourdomain.com/index.php/admin/catalog_product/edit/id/[product_id]/key/[your_key]/
You can find the product_id in the database. When you enter this URL, you will be able to edit the product. Now, check product attributes and make sure that you check all the values which are empty or not filled properly. In this way, you can clearly see all little mistakes by the Values in the CSV.
Related
When I'm generating a report of the most viewed products there are a lot of empty rows. So from some day's I cant get any data of the most viewed products. There is reasonable traffic on the site and I know for sure that every day products are viewed.
It is a Magento 1.6 webshops. Other reports are working correctly.
Does anyone know what the problem could be?
The issue is most likely coming from the DB which is used to generate this report.
Browse the table generating reports for Most Viewed Product and if you find “store_id” empty, edit and select the correct store_id for your store.
I run the following query to update all order items:
UPDATE table_name SET store_id=1 WHERE store_id =null;
This is assuming you only have 1 store and its store id = 1.
Also, take backup before running.
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.
I have a lot of products which need to be uploaded via csv in Magento. I have for example two attributes with values:
url_key
mypage
url_path
mypage.html
I have also tried the values the same, but when I upload them the products exist but always leads to an 404 error when trying to view their product page.
Is there somethig I'm missing out in the csv?
I'm using Magento 1.7
Thanks in advance.
Are you trying to have a different URL that the Product Name?
EG Product ABC, Magento would make the URL key product-abc and URL Path product-abc.html by default.
If that is your goal then you can leave those 2 columns blank on your import and Magento will apply this rule. Also be sure to re-index after you import.
Step 1 : Leave both column (url_key and url_path) empty and upload csv file
Step 2 : After succesful importing csv file, go to System -> Index Management :
Click on Select All and click on Submit.
It is very simple way. I tried and got result.
I would like to display the number of downloads being done for any downloadable links of a downloadable product in Magento.
I don't think there is such feature in Magento.
Seems we need to program it.
Any help please?
Look at the number_of_downloads_bought and number_of_downloads_used in downloadable_link_purchased_item table (Mage_Downloadable_Model_Link_Purchased_Item model)
Magento uses those fields to define how many times user can download file:
$linkPurchased = Mage::getModel('downloadable/link_purchased')->load($linkPurchasedItem->getPurchasedId());
$downloadsLeft = $linkPurchasedItem->getNumberOfDownloadsBought()
- $linkPurchasedItem->getNumberOfDownloadsUsed();
So you can use $linkPurchasedItem->getNumberOfDownloadsUsed() as number of downloads in selected order. If you count number of doewnloads for every order you can get total number of downloads.
Or you can make your own counter for calling Mage_Downloadable_DownloadController::_processDownload()
Isn't it the field 'number_of_downloads' in the table 'downloadable_link'?
I'm trying to transfer prodcuts from Magento 1.4.0.2 (Site-A) into Mangeto 1.7.0.1 (Site-B).
I've configured an export profile in Site-A with these field mappings:
sku | name | short_description | weight | price | type | description | attribute_set | tax_class_id
After running this profile I've got an export_all_products.csv file. I imported it into Site-B. (I had setup Site-B with an Import All Products Dataflow Profile which maps the filed the same way.)
After importing, I refreshed all the indexes, but there are still no products under "Catalog → Manage Products".
Why are the products not appearing?
(I suspect this is because store B has two websites and store A has only one. Neither one of the websites has the same name.)
Does the store name information need to be added to each product in the exported CSV?
Apparently it was a matter of having the required columns + a few extras.
Magento requires these 10 columns to be present in the CSV file, otherwise the import won't be valid:
type
attribute_set
tax_class_id
status
weight
sku
name
price
description
short_description
From here
If you want the product to be order-able you have to add:
website
category_ids
is_in_stock
To see if the problem is not setting the correct store/website you can do this:
1) Login to Magento admin, and goto product listing.
2) click select all
3) click update attributes - Select websites / stores from the left hand side and apply.
this will help narrow down the issue, if not solve it.
We ran into a similar problem like this recently and found a problem with special character in this case the Registered Trademark Symbol "®" placed into the .csv
Not sure if this is contributing to the issue but removing the special characters solved the issue. Hope this helps.
On an unrelated note, ensure that when you are running a dataflow profile, you have selected "Import product stocks" and not "Import all products" in the dataflow profiles.
Had this problem exporting from OpenOffice Calc, needed to set to export in UTF-8, probably also because of special characters.