php bin/magento deploy:mode:show
php bin/magento deploy:mode:set production --skip-compilation
php bin/magento deploy:mode:set developer
php bin/magento module:disable VendorName_ModuleName | |
php bin/magento setup:upgrade |
find . -type f -exec chmod 644 {} ;
find . -type d -exec chmod 755 {} ;
find ./var -type d -exec chmod 777 {} ;
find ./pub/media -type d -exec chmod 777 {} ;
find ./pub/static -type d -exec chmod 777 {} ;
<?php | |
// yo can follow this guide to http://www.benrlodge.com/blog/post/how-to-generate-an-instagram-access-token# | |
#1 first you need to create a Client in Instgram Developer Dashboard | |
// https://www.instagram.com/developer/clients/manage/ | |
#2 after you need to retrive a oAuth code for after get access_token | |
// https://www.instagram.com/developer/authentication/ | |
// change the params with your one and open link in browser |
Open index.php in your root folder and make sure those two lines below are not commented or just add them:
Mage::setIsDeveloperMode(true);
ini_set(‘display_errors’, 1);
Then you will probably see Notice: Array to string conversion in
/Applications/MAMP/htdocs/magento/app/code/core/Mage/Core/Model/Layout.php on line 555
// JavaScript hasClass, addClass, removeClass | |
//source: http://www.avoid.org/?p=78 | |
function hasClass(el, name) { | |
return new RegExp('(\\s|^)'+name+'(\\s|$)').test(el.className); | |
} | |
function addClass(el, name) | |
{ | |
if (!hasClass(el, name)) { el.className += (el.className ? ' ' : '') +name; } |
<?php echo $this->getLayout()->createBlock('catalog/product')->getPriceHtml($_product) ?> | |
<?php echo $this->getLayout()->createBlock('catalog/product_price') | |
->setTemplate('catalog/product/product-view-price.phtml') | |
->setProduct($_product) | |
->setDisplayMinimalPrice(true) | |
->setIdSuffix($idSuffix='_product_price') | |
->toHtml(); ?> |
<?php | |
/** @var Mage_Eav_Model_Entity_Setup $installer */ | |
$installer = $this; | |
$installer->startSetup(); | |
$this->addAttribute( | |
'catalog_category', | |
'my_custom_attribute', | |
array( | |
'group' => 'General Information', |
Use this:
<?php echo $this->getLayout()->createBlock('catalog/product_price')
->setTemplate('catalog/product/customprice.phtml')
->setProduct($_product)
->setDisplayMinimalPrice(true)
->setIdSuffix($idSuffix='amit')
->toHtml(); ?>
Instead of getPriceHtml($_product, true) ?>