Magento-bulk - Bulk Import/Export helper scripts and CLI utilities for Magento Commerce

Overview

Magento Bulk

Bulk operations for Magento.

Configuration

Copy config.php.sample to config.php and edit it.

Product Attribute Management

List All Attributes

./attr-list.php

List All User-defined Attributes

./attr-list.php -u

On a blank Magento installation this will list only 3 attributes: color, cost, and manufacturer.

Create Normal Data Attribute

./attr-add.php --code length --label 'Panjang (cm)' --type data --datatype decimal --normal
./attr-add.php --code shop_id --label 'Shop ID' --type data --datatype varchar --normal
./attr-add.php --code local_sku --label 'Local SKU' --type data --datatype varchar --normal
./attr-add.php --code local_price --label 'Local Price' --type data --datatype currency --normal

Note: --normal switch is optional (it’s the default).

Create Configurable Data Attribute

./attr-add.php --code branding --label 'Branding' --type data --datatype varchar --configurable

Create Normal Select Attribute

./attr-add.php --code material --label Bahan --type select --normal --opts Katun,Sutra,Rayon,Spandex

Note: --normal switch is optional (it’s the default).

Create Configurable Select Attribute

./attr-add.php --code item_color --label Warna --type select --configurable --opts Biru,Hijau,Merah,Putih,Hitam,Kuning,Ungu,Abu-abu
./attr-add.php --code item_size --label Ukuran --type select --configurable --opts SS,S,M,L,XL,XXL

Delete Attribute

./attr-del.php item_color

Multiple arguments are supported to delete several attributes at once.

./attr-del.php item_color item_size material length local_sku local_price

Import Attributes from XML

./attr-import.php ~/git/bippo-models/commerce/berbatik-attr-01.xml 

Product Attribute Set Management

List All Attribute Sets

./attrset-list.php

Create Attribute Set

./attrset-add.php --name 'Women Clothing' --attrs item_color,item_size

Delete Attribute Set

./attrset-del.php 'Women Clothing'

Multiple arguments are supported to delete several attribute sets at once.

Website, Store, Store View Management

List Websites, Stores, Store Views

./web-list.php 
Loading Magento... OK.
List websites
ID CODE       NAME
 0 admin      Admin                         
 1 base       Main Website                  
   1 Main Website Store   1:default:Default Store View 3:fb:Facebook 2:m:Mobile
 2 tuneeca    Tuneeca                       
   2 Tuneeca Store        4:tuneecadefault:Tuneeca Default 5:tuneecafb:Tuneeca Facebook 6:tuneecam:Tuneeca Mobile

Category Management

List Categories

./cat-list.php 
Loading Magento... OK.
List categories
 1 --                      Root Catalog
 2 A-                      . Default Category
 3 AC tas                  . . Tas

Add Category

./cat-add.php --urlkey tas --name Tas --desc 'Tas yang trendy.'
./cat-add.php --parent tas --urlkey handbag --name Handbag --desc 'Mudah dijinjing dan praktis.'

Note: A category depends on the available attributes for sorting. (i.e. available_sort_by, which
by default contains position,name,price but can add other custom attributes like item_color, item_size).

Delete Category (by URL Key)

./cat-del.php tas

Delete All User Categories (WARNING! DANGEROUS)

This will delete all categories with level 2 and below (i.e. user-created categories).

./cat-clear.php 

Product Management

List All Products with Stock Info

./product-list.php

Create Simple Product

For all websites, omit the --webs parameter:

./product-add-simple.php --sku zibalabel_t6 --name 'Tas Batik TX5' --price 125400 --qty 123 --cats tas,handbag

Specific website(s) only:

./product-add-simple.php --sku zibalabel_t62 --name 'Tas Batik TX5' --price 125400 --qty 123 --cats tas,handbag --webs tuneeca

Create Configurable Product with item_color and item_size configurable attributes

For all websites, omit the --webs parameter:

./product-add-conf.php --sku zibalabel_t01 --name 'Tas Batik 01' --price 19500 --variants Merah/S:5,Merah/M:7,Merah/L:9,Hijau/S:12,Hijau/M:8,Hijau/L:2 --set 'Women Clothing' --summary 'Tas batik yang keren' --desc 'Cocok untuk dibawa ke mana saja' --cats tas,handbag

Specific website(s) only:

./product-add-conf.php --sku zibalabel_t01 --name 'Tas Batik 01' --price 19500 --variants Merah/S:5,Merah/M:7,Merah/L:9,Hijau/S:12,Hijau/M:8,Hijau/L:2 --set 'Women Clothing' --summary 'Tas batik yang keren' --desc 'Cocok untuk dibawa ke mana saja' --cats tas,handbag --webs tuneeca

Stock quantity is also specified per variant.

Delete Product

./product-del.php zibalabel_t4
./product-delid.php 123

Delete All Products (WARNING! DANGEROUS)

./product-clear.php

To delete 832 simple products on i7-2630QM, takes about ~ real 3m38.357s.

Import Products from XML

./product-import.php ~/git/bippo-models/commerce/berbatik-product-01.xml

Import Products with Images from XML

./product-import-img2.php ~/git/bippo-models/commerce/berbatik-product-02.xml

Importing 832 simple products on i7-2630QM takes about 30 minutes.

You might also like...
Migration Tool for Magento Commerce (EE) to Magento OpenSource (CE)

Migration Tool for Magento Commerce to Magento OpenSource Also known as Magento Enterprise (EE) to Magento Community (CE). This migrating tool allows

Magento Deployment Scripts

Magento Deployment Scripts Author: Fabrizio Branca This is a collection of scripts used to build/package, deploy and install Magento projects. Import

Utilities to scan PHP code and generate class maps.

composer/class-map-generator Utilities to generate class maps and scan PHP code. Installation Install the latest version with: $ composer require comp

A collection of useful codes and utilities for WordPress plugin development..

WordPress Utils A collection of useful codes and utilities for WordPress plugin development. These simplifies common tasks and promote code reusabilit

Provide CSV, JSON, XML and YAML files as an Import Source for the Icinga Director and optionally ship hand-crafted additional Icinga2 config files
Provide CSV, JSON, XML and YAML files as an Import Source for the Icinga Director and optionally ship hand-crafted additional Icinga2 config files

Icinga Web 2 Fileshipper module The main purpose of this module is to extend Icinga Director using some of it's exported hooks. Based on them it offer

A set of utilities for working with vk api!

vk-utils Документация на русском языке Installation composer require labile/vk-utils How to use it? Simple example use Astaroth\VkUtils\Client; $api

Open-source library used in Gigadrive projects with common PHP utilities

PHP Commons This library provides PHP utilities used in Gigadrive projects, provided for the open-source community. Functions are registered globally

This is php utilities

PHP-UTILITY This is php utilities. Requirements PHP = 7.4 Curl extension for PHP7 must be enabled. Download Using Composer From your project director

This library provides a collection of native enum utilities (traits) which you almost always need in every PHP project.

This library provides a collection of native enum utilities (traits) which you almost always need in every PHP project.

Comments
  • Support 7 additional configuration for product attributes

    Support 7 additional configuration for product attributes

    1.      <isSearchable>false</isSearchable>
    2.      <isVisibleInAdvancedSearch>false</isVisibleInAdvancedSearch>
    3.      <isComparable>false</isComparable>
    4.      <isFilterableInSearch>false</isFilterableInSearch>
    5.      <isVisibleOnFront>false</isVisibleOnFront>
    6.      <usedInProductListing>false</usedInProductListing>
    7.      <usedForSortBy>false</usedForSortBy>
    
    enhancement 
    opened by ceefour 0
  • Script cat-import.php from XML

    Script cat-import.php from XML

    Example:

    <categories>
        <category>
            <urlKey>kain</urlKey>
            <parentUrlKey/>
            <name>Kain / Fabric</name>
            <description>Kain tradisional asli Indonesia</description>
            <!-- empty value means either default or none -->
            <metaTitle/>
            <metaDescription/>
            <image/>
            <!-- Support nested subcategories for future importer version -->
            <children></children>
        </category>
        <category>
            <urlKey>batik</urlKey>
            <parentUrlKey>kain</parentUrlKey>
            <name>Batik</name>
            <description>Kain batik tulis asli Indonesia</description>
            <!-- empty value means either default or none -->
            <metaTitle/>
            <metaDescription/>
            <image/>
            <!-- Support nested subcategories for future importer version -->
            <children></children>
        </category>
        <category>
            <urlKey>tenun</urlKey>
            <parentUrlKey>kain</parentUrlKey>
            <name>Tenun</name>
            <description>Kain tenun asli Indonesia</description>
            <!-- empty value means either default or none -->
            <metaTitle/>
            <metaDescription/>
            <image/>
            <!-- Support nested subcategories for future importer version -->
            <children></children>
        </category>
    </categories>
    
    enhancement 
    opened by ceefour 0
  • Script product-import.php from XML

    Script product-import.php from XML

    Input File Format:

    <!--
    Configurable products only. Untuk sekedar testing,
    dengan item_color dan item_size ala Tuneeca
    
    Before you import this, make sure you create dependencies:
    
    1. Attributes
    ./attr-add.php --code item_color --label Warna --opts Biru,Hijau,Merah,Putih,Hitam,Kuning,Ungu,Abu-abu
    ./attr-add.php --code item_size --label Ukuran --opts SS,S,M,L,XL,XXL
    
    2. Attribute Set
    ./attrset-add.php --name 'Women Clothing' --attrs item_color,item_size
    
    3. Categories
    ./cat-add.php --urlkey tas --name Tas --desc 'Tas yang trendy.'
    ./cat-add.php --parent tas --urlkey handbag --name Handbag --desc 'Mudah dijinjing dan praktis.'
    
    -->
    <products>
        <product>
            <type>configurable</type>
            <sku>zibalabel_t03</sku>
            <set>Women Clothing</set>
            <!-- store is optional. default is 1 (usually the base website, default store view) -->
            <store>1</store> 
            <name>Tas Batik T-03</name>
            <price>38200.00</price>
            <categories>tas,handbag</categories>
            <!-- webs is optional -->
            <webs>base</webs>
            <weight>1.0</weight>
            <summary>Tas Trendy Banyak Gaya</summary>
            <description>Tas yang sangat praktis dipakai ke mana-mana.</description>
            <variants>Hijau/S:43,Hijau/M:20,Merah/S:12,Merah/M:15</variants>
        </product>
    </products>
    

    Untuk contohnya silakan lihat script product-add-conf.php, itu script create product configurable beserta anak2nya dan juga data stock yang murni pakai PHP (tanpa SOAP).

    Juga script product-add-simple.php untuk yang simple product.

    Di sini juga ada README.textile untuk contoh2nya.

    enhancement 
    opened by ceefour 0
  • Support images in product-import.php

    Support images in product-import.php

    add another sub-element: images (optional)

    <products>
        <product>
            <type>configurable</type>
            <sku>zibalabel_t03</sku>
            <set>Women Clothing</set>
            <!-- store is optional. default is 1 (usually the base website, default store view) -->
            <store>1</store> 
            <name>Tas Batik T-03</name>
            <price>38200.00</price>
            <categories>tas,handbag</categories>
            <!-- webs is optional -->
            <webs>base</webs>
            <weight>1.0</weight>
            <summary>Tas Trendy Banyak Gaya</summary>
            <description>Tas yang sangat praktis dipakai ke mana-mana.</description>
            <variants>Hijau/S:43,Hijau/M:20,Merah/S:12,Merah/M:15</variants>
            <images>img/zibalabel_t03_a.jpg,img/zibalabel_t03_b.jpg</images>
        </product>
    </products>
    
    enhancement 
    opened by ceefour 0
Owner
Bippo Indonesia
Bippo Indonesia
Import/Export configuration data in Magento 2 via CLI.

ConfigImportExport This module provides new CLI commands for Magento 2 to import/export data in/from core_config_data. This module is inspired by the

semaio 117 Mar 23, 2022
A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2

Simple Import / Export tool A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2. Table data

EcomDev B.V. 51 Dec 5, 2022
A collection of command line scripts for Magento 2 code generation, and a PHP module system for organizing command line scripts.

What is Pestle? Pestle is A PHP Framework for creating and organizing command line programs An experiment in implementing python style module imports

Alan Storm 526 Dec 5, 2022
Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel

Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel , mapping of any format, Google Sheet, data and price modification, improved speed and a lot more!

Firebear Studio 173 Dec 17, 2022
Magento 2 - Improved Import / Export extension

Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel , mapping of any format, Google Sheet, data and price modification, improved speed and a lot more!

Firebear Studio 173 Dec 17, 2022
Import data from and export data to a range of different file formats and media

Ddeboer Data Import library This library has been renamed to PortPHP and will be deprecated. Please use PortPHP instead. Introduction This PHP library

David de Boer 570 Dec 27, 2022
Q2A plugin that allows users to import and export Q2A configuration

Configuration Manager [by Gabriel Zanetti] Description Configuration Manager is a Question2Answer plugin that allows users to import and export Q2A co

Gabriel Zanetti 1 Nov 22, 2021
Gettext is a PHP (^7.2) library to import/export/edit gettext from PO, MO, PHP, JS files, etc.

Gettext Note: this is the documentation of the new 5.x version. Go to 4.x branch if you're looking for the old 4.x version Created by Oscar Otero http

Gettext 651 Dec 29, 2022
Multi-language field export/import tool for ProcessWire

Language field export/import for ProcessWire Typically the way you translate page field values in ProcessWire is to edit a page, view the text in one

Ryan Cramer 3 Aug 19, 2022
Magento Quickorder module, enables bulk order creation by inputting SKUs & quantities.

Extension User Guide This extension was developed to enable merchants to allow customers to place multiple orders of various quanities quickly, in an

Popesites 30 Apr 24, 2022