If you’ve tried installing the Magento 2 sample data using the CLI tool, you may get the following message:
# sudo bin/magento sampledata:deploy
./composer.json has been updated
Loading composer repositories with package information
The 'https://repo.magento.com/packages.json' URL required authentication.
You must be using the interactive console to authenticate
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [packages1] ... [packagesN]
There is an error during sample data deployment.
The solution documented on the Magento 2 Developer hub is to switch to your Magento 2 base directory and run
composer update, which will ask for your Magento Connect authentication keys and then store them for you in your
What happens, however, when you’ve already done that and you still get the same error? Well then you have to start doing your research, which will bring you to this bug report.
Since I cloned from master and the bug has only been fixed in develop (as of this writing), the only solution if you want to install the sample data is to manually apply the patch referenced in the bug report yourself.
Once that was done, sample data installation proceeded with no problems.
Just export the XDEBUG_CONFIG variable:
To format a currency amount using the current store settings:
echo Mage::helper('core')->currency($amount, true, false);
This will output the correct currency symbol for the given store.
Recently I had to use Prototype JS to listen to an onchange event on a select box and toggle the display of some other elements on the page accordingly.
The code worked fine in Firebugs’ console, but I was getting this error when I had added my code to the HTML:
TypeError: $(...) is null
Usually this error means that the library hasn’t been included, so the $() function doesn’t exist, but the library definitely was included on the page.
A short note – Remember that if you have Developer Mode enabled, FPC placeholders are not rendered.
See line 388 of
Enterprise_PageCache_Model_Observer::renderBlockPlaceholder() (in EE 188.8.131.52)
/** @var Mage_Catalog_Model_Resource_Setup $this */
$installer = $this;
$installer->addAttribute('catalog_product', 'delivery_cutoff_date', array(
'type' => 'datetime',
'input' => 'date',
'class' => 'validate-date',
'backend' => 'eav/entity_attribute_backend_datetime',
'label' => 'Delivery Cut-off Date',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'visible_on_front' => false,
'used_for_price_rules' => false,
'group' => 'General',
'attribute_set' => array('Accessories', 'caps', 'Clearance', 'Curtains', 'Default', 'Electrical',
'Electronics', 'Parts', 'Seats', 'Swivels', 'Trim', 'Window fitting kit',