Skip to content

Instantly share code, notes, and snippets.

<?php
class MB_Dynamicconfigurable_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View
{
function __construct()
{
parent::getTemplate();
$product = $this->getProduct();
if (("product.info" == $this->getNameInLayout()) && $product->isConfigurable() && $product->getIsDynamic())
pecl install zip
downloading zip-1.10.2.tgz ...
Starting to download zip-1.10.2.tgz (236,912 bytes)
.................................................done: 236,912 bytes
61 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
$form = new Varien_Data_Form(array(
'id' => 'edit_form',
'action' => $this->getUrl('*/*/save', array('registration_id' => $this->getRequest()->getParam('registration_id'))),
'method' => 'post',
'enctype' => 'multipart/form-data',
));
<?php
class Ip_Viewas_Model_Resource_Setup extends Mage_Eav_Model_Entity_Setup
{
/**
* @return array
*/
public function getDefaultEntities()
{
return array(
...
<frontend>
<events>
<controller_action_predispatch>
<observers><log><type>disabled</type></log></observers>
</controller_action_predispatch>
<controller_action_postdispatch>
<observers><log><type>disabled</type></log></observers>
</controller_action_postdispatch>
<customer_login>
@ryaan-anthony
ryaan-anthony / gist:6265393
Created August 19, 2013 02:46
Get all options for $attr
$options = Mage::getModel('eav/config')
->getAttribute('catalog_product', $attr)
->getSource()
->getAllOptions(false);
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\dev>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
$this->_data[$key] = $value;
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php