View magentoObserverArgs.php
<?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) { |
View .gitignore_magento
###################### | |
# Magento .gitignore # | |
###################### | |
# Magento Core unnecessary files # | |
################################## | |
/errors/local.xml | |
/index.php | |
/install.php | |
/mage |
View catalog_attribute_option_value_update.php
<?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 | |
/** |
View shipping_method_renderer_available.phtml
<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> |
View flat_source_table_select_varchar.php
<?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'), |
View clean_catalogsearch.sql
SET FOREIGN_KEY_CHECKS=0; | |
TRUNCATE `catalogsearch_fulltext`; | |
TRUNCATE `catalogsearch_query`; | |
TRUNCATE `catalogsearch_result`; | |
-- | |
-- Enterprise Edition | |
-- |
View checkout_total_discount_no_code.phtml
<?php | |
$title = ($this->getTotal()->getCode() == 'discount') ? preg_replace('@\(.*?\)@', '', $this->getTotal()->getTitle()) : $this->getTotal()->getTitle(); | |
?> |
View autoshipping.php
<?php | |
/** | |
* Has shipping been applied to quote? | |
* | |
* @var bool | |
*/ | |
protected $_hasShipping = false; | |
/** |
OlderNewer