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 Namespace_Module_Helper_Data extends Mage_Core_Helper_Abstract { | |
/** | |
* Retrieve args node of observer config | |
* | |
* @param Varien_Event_Observer $observer | |
* @return array $observerArgs | |
*/ | |
public function getObserverArgs(Varien_Event_Observer $observer, $callingClass, $callingMethod) { |
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 | |
/** | |
* Données à renseigner | |
*/ | |
$attributeCode = 'pack_main_color'; // Le code de l'attribut dont on veut modifier les options | |
$optionId = 4; // option_id dont on veut modifier la valeur | |
$newValueForOption = 'Nouvelle valeur'; // La nouvelle valeur pour cette option_id | |
/** |
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
<?php | |
class Your_Module_Model_Catalog_Attribute_Source_Product_[Attribute] extends Mage_Eav_Model_Entity_Attribute_Source_Table | |
{ | |
public function getAllOptions() | |
{ | |
if (!$this->_options) { | |
$this->_options = array( | |
'option_1' => array('value' => 'value_1', 'label' => Mage::helper('adminhtml')->__('-- Not Selected --')), | |
'option_2' => array('value' => 'value_2', 'label' => 'Label 2'), |
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
SET FOREIGN_KEY_CHECKS=0; | |
TRUNCATE `catalogsearch_fulltext`; | |
TRUNCATE `catalogsearch_query`; | |
TRUNCATE `catalogsearch_result`; | |
-- | |
-- Enterprise Edition | |
-- |
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 | |
$title = ($this->getTotal()->getCode() == 'discount') ? preg_replace('@\(.*?\)@', '', $this->getTotal()->getTitle()) : $this->getTotal()->getTitle(); | |
?> |
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 | |
/** | |
* Has shipping been applied to quote? | |
* | |
* @var bool | |
*/ | |
protected $_hasShipping = false; | |
/** |
OlderNewer