This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dl class="sp-methods"> | |
<?php $shippingCodePrice = array(); ?> | |
<?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?> | |
<?php echo Mage::helper('your_module/shipping')->getShippingRatesHtml($code, $_rates, $_sole); ?> | |
<?php endforeach; ?> | |
</dl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################### | |
# Magento .gitignore # | |
###################### | |
# Magento Core unnecessary files # | |
################################## | |
/errors/local.xml | |
/index.php | |
/install.php | |
/mage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class My_Module_Model_Observer { | |
/** | |
* Update admin menu with dynamic items | |
*/ | |
public function updateAdminMenu() | |
{ | |
$menu = Mage::getSingleton('admin/config')->getAdminhtmlConfig()->getNode('menu/MAIN_MENU_ITEM/children/MENU_ITEMS_CONTAINER/children'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SomeClass | |
{ | |
/** | |
* @var \Magento\Framework\App\Config\ScopeConfigInterface | |
*/ | |
private $configInterface; | |
/** | |
* @var \Magento\Framework\App\Config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SomeClass | |
{ | |
/** | |
* @var \Magento\Catalog\Model\ResourceModel\Product | |
*/ | |
private $productResource; | |
/** | |
* @var \Magento\Catalog\Model\ProductFactory | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeClass | |
{ | |
public function __construct( | |
\Magento\Framework\Filter\Template $templateFilter | |
) | |
{ | |
$this->templateFilter = $templateFilter; | |
} | |
public function getDirectiveContent() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// For billing address | |
$order->getBillingAddress()->getCountryModel()->getName() | |
// For shipping address | |
$order->getShippingAddress()->getCountryModel()->getName() | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 1) Make sure to display a correct date or datetime input field in admin forms | |
* | |
* Code below is in a _prepareForm() method of an admin form | |
*/ | |
$dateOutputFormat = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); | |
$fieldset->addField('my_date_field', 'date', array( | |
'name' => 'my_date_field', | |
'label' => $this->__('My Date Field'), |
NewerOlder