├── .gitignore ├── README.md ├── app ├── Wiz.php ├── lib │ ├── Archive │ │ └── Tar.php │ ├── PEAR.php │ └── Wiz │ │ └── SimpleXmlElement.php └── plugins │ ├── 301.php │ ├── Admin.php │ ├── Cache.php │ ├── Config.php │ ├── Cron.php │ ├── Devel.php │ ├── Encrypt.php │ ├── Indexer.php │ ├── Log.php │ ├── MC.php │ ├── Magento.php │ ├── Module.php │ ├── Sql.php │ ├── Store.php │ └── enterprise │ └── Enterprise.php ├── wiz ├── wiz.bash_completion.sh └── wiz.php /.gitignore: -------------------------------------------------------------------------------- 1 | .sloccount 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IMPORTANT NOTICE 2 | Wiz is no longer maintained and may or may not work with current versions of Magento. There are also no plans on porting it to work with Magento 2. It is reccomended that you use [n98-magerun](http://magerun.net/installation/) as an alternative. 3 | 4 | # Wiz 5 | 6 | Wiz is a CLI interface for Magento. It aims to provide useful functionality for developers and administrators in a powerful and scriptable CLI format. 7 | 8 | ## How do I use it? 9 | 10 | 1. Install it (instructions below). 11 | 2. Navigate to a Magento directory. 12 | 3. Run the program by calling wiz. 13 | 4. Optionally, you can set the WIZ\_MAGE\_ROOT environment variable to always point Wiz to a specific location. If you have multiple sites and want to be able to manipulate multiple sites without having to navigate through directories, you can do this: 14 |
alias wiz1="WIZ\_MAGE\_ROOT=/path/to/site1 ~/bin/Wiz/wiz" 15 | alias wiz2="WIZ\_MAGE\_ROOT=/path/to/site2 ~/bin/Wiz/wiz"
16 | Now you can run wiz1 from any location and it will run inside the context of the site1. 17 | 18 | ### Setup instructions (for the less technical) 19 | 20 | 1. Download Wiz and uncompress it somewhere (probably your Downloads folder) 21 | 2. Open up a shell, type this in: mkdir -p ~/bin/Wiz; open ~/bin/Wiz 22 | 3. Copy all of the files from the folder that was uncompressed into ~/bin/Wiz. It should be the readme, the app directory, wiz and wiz.php. 23 | 4. Using a text editor, add the following to the .bash_profile in your home directory: 24 |
alias wiz="~/bin/Wiz/wiz" 25 | 5. If you are using Zend Server, you will also need to add the path to PHP 5.2 (since Wiz requires PHP 5.2 at the moment). On OSX, you would add this to your .bash_profile: 26 |
export WIZ\_PHP\_PATH="/usr/local/zend/bin/php" 27 | 28 | ## Bash Completion 29 | 30 | To enable bash shell command/TAB completion, put/append the following in `~/.bash_completion` file: 31 | 32 | source $WIZ_HOME/wiz.bash_completion.sh 33 | 34 | (replace `$WIZ_HOME` above with the folder location where you extracted Wiz) 35 | 36 | Now you can type: `wiz ` to get a list of commands. Futher 37 | 38 | ## Magento Scope Code 39 | 40 | By default, Wiz runs inside of the admin scope. This is great for most operations. However, you may require running Wiz inside of a particular scope. 41 | 42 | You can specify the scope Wiz initializes Magento with by specifying the following options: 43 | 44 | \--store [id|code] 45 | 46 | \--website [id|code] 47 | 48 | By leaving off the id or scope, Wiz will use the default store or website (passing in a blank code). 49 | 50 | ## Output Mode 51 | 52 | Wiz now supports the ability to change the table output for batch handling: 53 | 54 | \--batch [csv|pipe|tab] 55 | 56 | If passed without a parameter, csv is the default. Examples: 57 | 58 | $ wiz devel-config \--batch
59 | Path,Value
60 | dev/debug/profiler,No
61 | dev/js/merge\_files,No
62 | .../code> 63 | 64 | $ wiz devel-config \--batch pipe
65 | Path|Value
66 | dev/debug/profiler|No
67 | dev/js/merge_files|No
68 | ...
69 | 70 | $ wiz devel-config \--batch tab
71 | Path Value
72 | dev/debug/profiler No
73 | dev/js/merge_files No
74 | ...
75 | 76 | You get the idea. Internally, it uses [fgetcsv()](http://php.net/fputcsv), so it should treat your data well. 77 | 78 | ## What can it do? 79 | 80 | Functionality is being added to Wiz as time allows. Currently, Wiz has the following commands. Please understand that not all of these commands have been tested on every version. Commands that have not been tested or are in beta are noted as such. 81 | 82 | ### 301-urlskumap 83 | 84 | Dumps a CSV of all SKUs in the catalog in the first column and the link to the product in the second column. Useful for generating redirects or just plain exporting all product URLs. 85 | 86 | ### 301-urlcatmap (BETA) 87 | 88 | Dumps a CSV of all Categories in the catalog in the first column and a link to the product in the second column. 89 | 90 | ### 301-htgen (BETA) 91 | 92 | Generates .htaccess compatible 301 redirects. Takes a path to a CSV file as parameter. CSV file will have the old URL and the SKU as column. The command will cycle through each SKU and create redirects from the old URL to the new URL using the SKU. 93 | 94 | ### 301-xmlsm2csv (*UNSTABLE*) 95 | 96 | Takes an XML Sitemap and converts it to CSV. _This functionality is not quite finished yet._ 97 | 98 | ### admin-createadmin <username> <firstname> <lastname> <email> <password> 99 | 100 | Creates an Administrative user in the backend. Has been tested in both CE, PE, and EE. If you don't pass the argument, you will be promtped for them. 101 | 102 | ### admin-disable <username> 103 | 104 | Disables an administrative user. 105 | 106 | ### admin-enable <username> 107 | 108 | Enables an administrative user. 109 | 110 | ### admin-list 111 | 112 | Lists the name, e-mail address, and status of every admin in the system. 113 | 114 | ### admin-resetpass 115 | 116 | Resets the password of an admin user. 117 | 118 | ### admin-timeout