Banner - Blog zu den Themen Programmierung, SEO, SEM, Social Media, Internet Marketing, Webdesign, IT-Service und Mehr - SEO Hannover - IT-Dienstleistungen und SEO Agentur Fly2Mars-Media.de

Archiv

Artikel Tagged ‘develop’

Magento: kleine nützliche Toolbar

10. September 2010 Keine Kommentare

Hier findet ihr eine kleine nützliche kostenfreie Magento-Toolbar!

Product Description

Advanced developer toolbar with profiling, db queries, block nesting, requests and caching.

Features:

  • Requests: involved controller classes, modules, actions and request parameters
  • General Info: website id, website name, store id, store name, storeview id, storeview code, storeview name and configured caching method
  • Blocks: overview of block nesting
  • Config: enable/disable frontend hints, inline translation and cache clearing
  • PHP-Info: output of phpinfo()
  • Profiling: output of Varien_Profiler with function execution time, function count and memory usage
  • Additional Information: version information, page execution time and overall memory usage
  • DB-Profiler: Number of executed queries, average query length, queries per second, longest query length, longest query and detailed query listing including simple syntax highlighting of SQL.
KategorienMagento Tags: , ,

Magento: Statischen CMS Block im Template ausgeben

Ihr könnt in Magento ein statischen CMS Block wie folgt im template einbinden.

Ein Beispiel zum einbinden über die entsprechende layout.xml :

<layout>
<asdf_xy_zzz>
<reference name="content">
 <block type="cms/block" name="cms_store_check">
 <action method="setBlockId"><block_id>store_check</block_id></action>
 </block>
 </reference>
 </asdf_xy_zzz>
</layout>

Direkt einbinden im Template:

echo $this->getLayout()->createBlock('cms/block')->setBlockId('your_id')->toHTML();?>

Einbinden im CMS:

{{block type="cms/block" block_id="your_id" template="cms/content.phtml"}}

Magento: Über ein url-key einer Kategorie ein Link erzeugen

Im Admin-Backend ist es möglich ein url-key für z.B. Kategorien zu setzen. Möchtet ihr jetzt automatisch von Magento anhand dieser ein Link erzeugen, könnt ihr das wie im folgenden Beispiel:

<a href="<?php echo Mage::getModel('catalog/category')->load(Mage::getModel('catalog/category')->getCollection()->addAttributeToFilter('url_key', 'all-bags')->getAllIds())->getUrl(); ?>" title="All bags" ><?php echo $this->__('All bags'); ?></a>