Bulk operations for Magento.
Copy config.php.sample to config.php and edit it.
./attr-list.php./attr-list.php -uOn a blank Magento installation this will list only 3 attributes: color, cost, and manufacturer.
./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 --normalNote: --normal switch is optional (it’s the default).
./attr-add.php --code branding --label 'Branding' --type data --datatype varchar --configurable./attr-add.php --code material --label Bahan --type select --normal --opts Katun,Sutra,Rayon,SpandexNote: --normal switch is optional (it’s the default).
./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./attr-del.php item_colorMultiple arguments are supported to delete several attributes at once.
./attr-del.php item_color item_size material length local_sku local_price./attr-import.php ~/git/bippo-models/commerce/berbatik-attr-01.xml ./attrset-list.php./attrset-add.php --name 'Women Clothing' --attrs item_color,item_size./attrset-del.php 'Women Clothing'Multiple arguments are supported to delete several attribute sets at once.
./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./cat-list.php
Loading Magento... OK.
List categories
1 -- Root Catalog
2 A- . Default Category
3 AC tas . . Tas./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).
./cat-del.php tasThis will delete all categories with level 2 and below (i.e. user-created categories).
./cat-clear.php ./product-list.phpFor all websites, omit the --webs parameter:
./product-add-simple.php --sku zibalabel_t6 --name 'Tas Batik TX5' --price 125400 --qty 123 --cats tas,handbagSpecific website(s) only:
./product-add-simple.php --sku zibalabel_t62 --name 'Tas Batik TX5' --price 125400 --qty 123 --cats tas,handbag --webs tuneecaFor 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,handbagSpecific 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 tuneecaStock quantity is also specified per variant.
./product-del.php zibalabel_t4
./product-delid.php 123./product-clear.phpTo delete 832 simple products on i7-2630QM, takes about ~ real 3m38.357s.
./product-import.php ~/git/bippo-models/commerce/berbatik-product-01.xml./product-import-img2.php ~/git/bippo-models/commerce/berbatik-product-02.xmlImporting 832 simple products on i7-2630QM takes about 30 minutes.