Categories
Videos

Magento 2 installation

Downloads all… Magento source, composer, …

Categories
Magerun

n98-magerun2 – Project Update 2015-01

n98-magerun2 Updated

After some busy days and a intermediate update of n98-magerun V1 i ha time to give the code base a little bit love.
In the meantime i got help from EliasZ who ported a lot of n98-magerun commands to V2.

Newly ported commands

This command were ported in the last 30 days:

  • cache:clean
  • cache:enable
  • cache:disable
  • cache:flush
  • cache:list
  • config:get
  • config:set
  • config:delete
  • dev:symlinks
  • dev:template-hints-blocks
  • dev:template-hints
  • sys:maintenance
  • sys:setup:compare-versions
  • sys:setup:run
  • dev:module:list
  • dev:module:observer:list
  • script
  • shell
  • self-update

Feel free to test the command in your Magento 2 installation and send us pull requests/issues if
you find a problem.

Automatic dependecy injection

As we started one of the first things was to fetch the Magento 2 ObjectManager which is needed
to create instances of Magento 2 objects.
In n98-magerun we can use the object manager (inside a command) as service locator.

Example:

Now we improved the system a little bit and implemeted a new system for automatic dependecy injection.
It’s very simple and simiar to constructor injection in Magento 2 modules.
We introduced a new magic method inject. If this method is defined in a command class we automatic
parse the arguments and try to inject all objects.
Another side effect is that Magento is initialized and no manual “initMagento” call is needed anymore.

Example:

Use the inject method if you need some Magento objects in your command. If the method is not available
the command behavior is like before.

We don’t removed the getObjcetManager method.

Statistics

As written in previous post we first try to port all commands from Version 2. The milestone progress has reached 30%.

Categories
Magerun Tips

Creating a local Magento repository for n98-magerun

Milan Simek created a blog post about creating your own local repository of sample-data and Magento installers.

http://plugin.company/blog/creating-local-magento-repository-n98-magerun/

Categories
Magerun Tips

Send all queued emails

mail_cron

Since Magento CE 1.9.1 all “new order emails” are queued. A new defined cronjob core_email_queue_send_all is now processing the queued emails.
During development it’s not very handy to run the job by a minute based scheduler. In this case you can use n98-magerun to start the cronjob manually.

Categories
Magerun

Released n98-magerun Version 1.94.0

n98-magerun-1-94-0

Today we released a new version of n98-magerun (1). This is the first stable release of 2015.
Most of the time we spent in development n98-magerun2 but this don’t mean that 1.x branch will get no new features.

Giftcard management

Steve Robbins created a list of commands to work with EE Giftcards

Before any creation of new gifcards you need a generated giftcard pool. This can be done in Magento Admin system configuration (System -> Configuration -> Giftcards -> Gift Card Account General Settings) where you can define i.e. the format of the generated codes.
If you don’t like to change the defaults or have configured the giftcard pool already a handy new command gitcard:pool:generate can be used.

If a pool is available you can create new cards with the giftcard:create command by passing the amount as argument.

Informations about an existing giftcard can be obtained with giftcard:info command.

  • #443 Create, view, and remove gift cards (by Steve Robbins)

Show Cronjobs history in your timezone

With new –timezone option it’s now possible to see the cronjob history in another timezone than UTC+0.

Examples:

  • #416 Convertstimes to local or specified timezone (by Steve Robbin)

Disable commands by config.

In some cases it’s possible to have a command conflict. One case is if you have two 3rd party modules which define the same
command name (not PHP namespace).
In such cases you are now able to disable a command by it’s fully qualified class name over any config.
This is also useful for providers which install n98-magerun and like to disable some commands.

Example:

This will disable the db:drop command.

Smaller fixes and improvements

  • #428 Add newsletter table group for db:dump command (by Christoph Aßmann)
  • #441 config:dump produces invalid xml (Andrew Stayart)
  • #452 Added .DS_Store to .gitignore (by Hervé Guétin)
  • #462 dbHost not respected #462 (by Achim Rosenhagen)
  • #463 Fixed missing sprintf when creating Exception in sys:cron:run command (by Tim Eydamos)
  • #464 SampleData in Version 1.9 are not downloading (by Rafael Corrêa Gomes)
  • #453 Add store parameter to template hints commands (by Hadrien Collongues)
  • Removed Magento 2 bootstrapping -> Moved into n98-magerun2