MageRun Addons by Kalen Jordan
This article is part of a series covering 3rd party n98-magerun modules/extensions.
Kalen Jordan (creator and founder of MageMail) is one of our longest n98-magerun users and contributors.
He was the first who published a 3rd party module with some nice commands. That’s what i like to present you now (mostly copied from module README).
You can find the module here: https://github.com/kalenjordan/magerun-addons
Installation is really simple:
mkdir -p ~/.n98-magerun/modules/
cd ~/.n98-magerun/modules/
git clone https://github.com/kalenjordan/magerun-addons
Bust Frontend Browser Caches
$> n98-magerun.phar design:refresh
This command modifies the skin and js base URLs with a timestamp-specific URL, so that browsers will pull down fresh CSS and JS.
It’s intended to be used in conjunction with a web server rewrite rule that will rewrite, for example:
/<timestamp>/skin/...
to
/skin/...
Create dummy order
$> n98-magerun.phar order:create:dummy
This command can create some dummy orders. It’s marked as experimental but could help you to create dummy data in your shop i.e. for performance tests.
Assign order to new customer
$> n98-magerun.phar order:assign
This command can assign an order to a new customer by ID.
This is very experimental – doesn’t modify all of the places that customer data exists on the order models, such as the shipping and billing address – just the customer name, email, ID on the order entity.
Example:
$> n98-magerun.phar order:assign 10000000001 10
Assigns the order #10000000001 to customer ID 10.
Anonymize customer data
Anonymize customer data across a bunch of tables: order, order address, newsletter, quotes, newsletter subscriber.
$> n98-magerun.phar customer:anon
Core file diff / Theme diff
This command can diff core files to see if they have been modified.
The command depends the command line tool diff which should be installed on all unix based systems.
n98-magerun.phar diff:files
Same functionality for theme files:
$> n98-magerun.phar diff:theme customtheme/default default/default
See what customizations have been made in your custom theme against the base theme.
Grab mailchimp unsubscribes
Grab all of the mailchimp unsubscribes to your primary list
$> n98-magerun.phar mailchimp:unsubscribe:list
If you’re using Ebizmarts_MageMonkey to manage your Mailchimp integration, this will allow you to grab a list of all of the unsubscribed emails to your primary list.
The main purpose for doing this is if you need to import these unsubscribes somewhere. The routine will dispatch an event mailchimp_list_unsubscribe_discovered which you can observe in order to handle them.
Uninstall a module
ninstall a module by deleting all the module’s files and removing database tables.
$> n98-magerun.phar dev:module:remove Acme_Module
NOTE: This is not fully baked yet, at the moment it just deletes the main module config file and the code directory. Pretty trivial, but I’m going to add in database tables, layout files, template files, etc.
Generate gift card codes
The missing tool to generate EE gift card codes!
$> n98-magerun.phar giftcard:generate-codes --prefix=SWEET-DISCOUNTS-
0 Comments