I've done this to export all attributes and their options (if it is a dropdown attribute) from the source website:
exportAttributes.php in root directory of source website:
require_once MAGENTO . '/app/Mage.php';
$entity_type_id = Mage::getModel('catalog/product')->getResource()->...
In your controller file that $postUrl points to:
public function __construct(
$this->csv = $csv;
//The function name should match your controller path
public function import($file)
throw new \Magento\Framework\Exception\LocalizedException(__('...
You could write this one pretty easily. Create a PHP file called something like export.php.
require("app/Mage.php"); // load the main Mage file
Mage::app(); // not run() because you just want to load Magento, not run it.
// load all of the active categories in the system and include all attributes
$categories = Mage::getModel('...
note: I get crystal clear explanation of custom import option from this link
Please first download the whole zip file from this github link then change the module name as per your requirement. Just alter the two files is enough to import your custom CSV to custom table.
step1: alter app/code/vendor/module_name/etc/import.xml from your download github ...
In short: Don't use Dataflow for anything, it's deprecated. Yoav Kutner once (2011) said that Dataflow is not usable, and that was the reason they added ImportExport in Magento 1.5. The main disadvantage of Dataflow is its very low speed.
ImportExport is much faster. It's not perfect as its CSV format is not too intuitive (I have summarized it at http://...
First you have to upload alll the images you want to import in the media/import/yourimagesfolder/
The in the CSV columns for image, thumbnail and small_image your image path should look like this
That looks like they tried to make sure to destroy the image resource, but instead introduced a memory leak. I cannot think of a valid reason for this code, to be honest, but I can explain what has been changed:
Originally, imagedestroy() would have been called in the desctructor __destruct()
You have to run cron by command line as mentioned here: php bin/magento cron:run
Then refresh the export page and you should see the file at the bottom.
First, unfortunately Magento doesn't import the files generated by it's export. AFAIK, this is true for both import/export module and default out-of-box dataflow profiles.
Second, I'll try to bring more light on images question as I see for many it's unclear how it works:
When you import, it expects that images are placed in media/import.
So if you have a ...
There are two options for this. It's more comfortable to use nested arrays (see http://avstudnitz.github.io/AvS_FastSimpleImport/options.html: "Support Nested Arrays for Import"), you can then use arrays inside the media* attributes like this:
'_media_attribute_id' => array(77, 77, 77),
'_media_image' => array('img1.jpg', 'img2.jpg', 'img3.jpg',
I would suggest to extend the Magento 2's default import functionality.
To do that register a new module (lets say "Custom Import" for now)
Create a module.xml file at app/code/Foo/CustomImport/etc/module.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
The problem is that $order is not set or it's no object (of type Mage_Sales_Model_Order).
Also order with downloadable products have no shipping address.
For the updated questions ... make sure loaded $order is valid. It seems the order you're are trying to load isn't correct.^
$order = Mage::getModel('sales/order')->load(19);
Make sure you have reindexed all the indexes or your customer grid would not show imported customers. Use following command.
php bin/magento indexer:reindex
Note that if you're only not able to see the customer in admin you can also run;
php bin/magento indexer:reindex customer_grid
this will reindex corresponding to customer grid only and ...
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->setPage(1,1); //set a limit to 1 so the query would be faster
I'm not 100 sure but I think it has something to do with the status or visibility or the product.
In the products grid, when retrieving the collection there are 2 inner joins for selecting the status and visibility. (actually there is a third one, for the name but I doubt this is the problem).
If there are no values for visibility and status the product does ...
Having the same problems with my Magento 184.108.40.206...
I only get this to work by changing Varien_Image_Adapter_Gd2 in /lib/Varien/Image/Adapter/Gd2.php as follows:
public function __construct()
// Initialize shutdown function
// register_shutdown_function(array($this, 'destruct'));
* Destroy object image on shutdown
public function ...
Admin > catalog > products
select all products
select action as update attributes
you have to check short description checkbox with empty text there.
please select short description as not required attribute.
re-index and clear cache after remove.
You can use this trick for any admin product mass Field update.
I hope this will help ...
All custom attributes get appeared under "additional_attributes" header in the export separated by a comma (,). I am using Magento 2.0.7.
To make these attributes occupy a separate cell, we can add more columns to the CSV.
I found a free Magento 2 extension from BSS Commerce which helped me work around this:
It provides some override code for the Model\Export\Product core class which breaks out the ...
This is possible by following the below steps;
Include export.xml in your module etc directory with a content similar to the below;
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/import.xsd">
In Admin Panel,
i) Goto Manage Products
ii) Then Select the products which are not displaying in the frontend
iii) Then Select the Update Attributes in the Action
iv) Then Add those products to correct websites.
Re-index the catalog products.
Hope this will help you.
It was part of fixing security issues with unserialize. Magic methods like __destruct have inherent issues with serialization.
We have seen exploits proposed that were using serialization and __destruct to create files in the file system - and this change (you will see more similar changes in other places) was done to avoid this.
Does it cause memory ...
So I did raise a bug with Magento including a "solution" that should deal with the memory usage issues in the image import process.
The solution can be found on github under https://github.com/sitewards/import_image_memory_leak_fix but the basic idea is.
Fixing the Mage_Catalog_Helper_Image::validateUploadFile to actually call the destruct method on the ...
For this Need to do some changes in vendor\magento\module-catalog-import-export\Model\Export\Product.php file or override same model file in your custom module .
In vendor\magento\module-catalog-import-export\Model\Export\Product.php file add custom_attributes code those you want in separate cell ( not in additional_attributes cell) in $...
You can used below code to update product attributes for all store
Added $ for obj
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $objectManager->create('\Magento\Store\Model\StoreManagerInterface');
$storeIds = array_keys($storeManager->getStores());
$action = $objectManager->create('\Magento\Catalog\Model\...