Skip to content

Instantly share code, notes, and snippets.

@jwohlfeil
jwohlfeil / Mage - Static Block Content.php
Last active March 3, 2017 15:56
Mage - Static Block Content.php
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('')->toHtml() ?>
@jwohlfeil
jwohlfeil / Mage - Static Block XML.xml
Last active March 3, 2017 15:56
Mage - Static Block XML.xml
<block type="cms/block" name="myblockname" before="-">
<action method="setBlockId"><block_id>myblockid</block_id></action>
</block>
<?php echo $this->getSkinUrl('') ?>
<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
// Run you code here
?>
RewriteRule ^(index.php/?)?rss/ - [L,F]
Teste dann mit https://www.styleup.eu/index.phprss/catalog/notifystock/
<?php
$_product->getThisattribute();
$_product->getAttributeText('thisattribute');
$_product->getResource()->getAttribute('thisattribute')->getFrontend()->getValue($_product);
$_product->getData('thisattribute');
// The following returns the option IDs for an attribute that is a multiple-select field:
$_product->getData('color'); // i.e. 456,499
// The following returns the attribute object, and instance of Mage_Catalog_Model_Resource_Eav_Attribute:
$_product->getResource()->getAttribute('color'); // instance of Mage_Catalog_Model_Resource_Eav_Attribute
// The following returns an array of the text values for the attribute:
<?php
// find 'path' in table 'core_config_data' e.g. 'design/head/demonotice'
$my_change_config = new Mage_Core_Model_Config();
// turns notice on
$my_change_config->saveConfig('design/head/demonotice', "1", 'default', 0);
// turns notice off
$my_change_config->saveConfig('design/head/demonotice', "0", 'default', 0);
?>
<?php echo $_product->getResource()->getAttribute('attribute_id')->getFrontend()->getValue($_product); ?>
{{block type="core/template" template="test/test.phtml"}}
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) ?>