Wednesday, 10 August 2011

Magento Path Hints

Magento Path Hints, displays the blocks in the website template with red outlines and path descriptions

"turn on path hints in magento (admin > system configuration > developer > main website (configuration scope) > template path hints yes"

click here for the original website

Friday, 5 August 2011

CSS Shadows

CSS Shadows

.shadow {
  -moz-box-shadow: 0px 0px 5px #555555;
  -webkit-box-shadow: 0px 0px 5px #555555;
  box-shadow: 0px 0px 5px #555555;
}

Thursday, 4 August 2011

jQuery News Ticker

Click here to view the site I found this on.

Magento Missing HTML Head, Header & Footer in Admin > Design

I'd recently made a change to a magento installation so that I could use custom page layouts. During this I copied a file from a core directory to a local directory:


/app/code/core/Mage/Page/etc/config.xml
to
/app/code/local/Mage/Page/etc/config.xml

I then found out in the CMS is was missing some functionality:

Admin > Configuration > Design > { Missing } Head HTML, Header and Footer

To the regain this functionality, in the core folder above you have to copy both files, config.xml and system.xml over as you are switching the functionality from the core over to the local directory.

The original post I got this information from: click here

Wednesday, 3 August 2011

Magento Creating a Configurable Product

click here

Magento Referencing a Static Block in a *.phtml file

use this snippet of code replacing 'IDENTIFIER' with the ID of your Static Block:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('INDENTIFIER')->toHtml() ?>

Reference in XML

XML Ref
<block type="cms/block" name="**REFERENCED IN phtml**">
<action method="setBlockId"><block_id>**STATIC BLOCK ID**</block_id></action>
</block>
phtml Ref
<?php echo $this->getChildHtml('**REFERENCED IN phtml**') ?>

click here for the original website

Tuesday, 2 August 2011

Magento Referencing a *.phtml file in the CMS or using XML and php

 In CMS:

{{block type=”core/template” name=”top_static_links” template=”page/template/top_static_links.phtml”}}

In XML and php:

XML component:
<block type="core/template" name="top_static_links" template="page/template/top_static_links.phtml"/>
php component:
<?php echo $this->getChildHtml('top_static_links'); ?>

Just a php Call - NOT RECOMMENDED!
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('videoBannerStaticBlock')->toHtml() ?>

jQuery Image Rotator

jQuery image Rotator tutorial by DreamweaverTutorial.co.uk.

Part 1 and Part 2

Monday, 1 August 2011

Magento linking to a CMS created page in the CMS

If you're looking to link to a CMS page using Magento's page editor, in the CMS, use this bit of code in the a href swapping out the "about-us" for the page identifier:

{{store direct_url="about-us"}}

example:
<a href="{{store direct_url="about-us"}}">About Us</a>

If you are linking to a Category, add .html to the end of the identifier.