// init app emulation model
$appEmulation = Mage::getSingleton('core/app_emulation');
// Start environment emulation of the specified store
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($store_id);
/**
* First way (1) use layout for block create
*/
$block = Mage::app()->getLayout()->createBlock('customermenu/page_html_header_menu')
->setTemplate('customermenu/page/html/header/menu.phtml')
->toHtml();
/**
* First way (2) use layout for block create
// Import sql file
mysql -h HOST --port=3307 -p -u USER DATABASE < FILE
// example
mysql -h localhost --port=3307 -p -u root main < main_dump.sql
// Import archive
$(function(){
$('#email').bind('input', function(){
$(this).val(function(_, v){
return v.replace(/\s+/g, '');
});
});
});
/**
* Redirect from empty category to parent
* Observe event - core_block_abstract_to_html_before
*
* @param Varien_Event_Observer $observer
*/
public function redirectToParentCategory(Varien_Event_Observer $observer)
{
Varien_Profiler::start(__METHOD__);
/**
* Redirect from disabled product to product last category
* Obseve event - controller_action_predispatch_catalog_product_view
*
* @param Varien_Event_Observer $observer
*/
public function catalogProductViewPredispatch(Varien_Event_Observer $observer)
{
protected $_customer_groups = array('NOT_LOGGED_IN', 'Genaral', 'Wholesale', 'Retail');
/**
* Get current customer group and update handle depend from current group
* Observe event "controller_action_layout_load_before"
*
* @param Varien_Event_Observer $observer
*/
public function setTemplate(Varien_Event_Observer $observer)
UPDATE admin_user SET password = CONCAT (MD5 ('sGnewpass'), ': sG') WHERE username = 'AdminUsername';
###In template (*.phtml)
/**
* get Controller name
*/
$this->getRequest()->getControllerName();
/**
OlderNewer