This file contains hidden or 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
<action method="addLink" translate="label title"> | |
<label>matthias-zeis.com</label> | |
<url>http://www.matthias-zeis.com/ </url> | |
<title>Matthias Zeis von LimeSoda</title> | |
<prepare /> | |
<urlParams /> | |
<position>100</position> | |
<liParams>id="matthias-zeis-link"</liParams> | |
<aParams> | |
<class>li-css-klasse-1 li-css-klasse-2</class> |
This file contains hidden or 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 echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?> |
This file contains hidden or 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 if($_product->isSaleable()) { // do stuff } ?> |
This file contains hidden or 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
$helper = Mage::helper('namedesmoduls'); |
This file contains hidden or 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 | |
$simpleProductId = 465; | |
$parentIds = Mage::getResourceSingleton('catalog/product_type_configurable') | |
->getParentIdsByChild($simpleProductId); | |
$product = Mage::getModel('catalog/product')->load($parentIds[0]); | |
echo $product->getId(); // ID = 462 (aka, Parent of 465) | |
?> |
This file contains hidden or 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 | |
$currentCategory = Mage::registry('current_category'); | |
$currentProduct = Mage::registry('current_product'); | |
$currentCmsPage = Mage::registry('cms_page'); | |
?> |
This file contains hidden or 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
<!-- First, use get_class to get the name of an object's class. --> | |
<?php $class_name = get_class($object); ?> | |
<!-- Then, pass that get_class_methods to get a list of all the callable methods on an object --> | |
<?php | |
$class_name = get_class($object); | |
$methods = get_class_methods($class_name); | |
foreach($methods as $method) | |
{ | |
var_dump($method); |
This file contains hidden or 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
<!-- In /app/design/frontend/default/site/template/catalog/product/view/type/--> | |
<?php $_helper = $this->helper('catalog/output'); ?> | |
<?php $_associatedProducts = $this->getAllowProducts() ?> | |
<?php //var_dump($_associatedProducts); ?> | |
<br /> | |
<br /> | |
<?php if (count($_associatedProducts)): ?> | |
<?php foreach ($_associatedProducts as $_item): ?> | |
<a href="<?php echo $_item->getProductUrl() ?>"><?php echo $_helper->productAttribute($_item, $_item->getName(), 'name') ?> | <?php echo $_item->getName() ?> | <?php echo $_item->getPrice() ?></a> | |
<br /> |
This file contains hidden or 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 | |
$rootCategoryId = Mage::app()->getStore()->getRootCategoryId(); | |
$_category = Mage::getModel('catalog/category')->load($rootCategoryId); | |
// You can then get all of the top level categories using: | |
$_subcategories = $_category->getChildrenCategories(); | |
?> |
This file contains hidden or 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 echo Mage::helper('core/url')->getCurrentUrl(); ?> |