Contenu connexe
Similaire à Magento20100807 (20)
Plus de Hirokazu Nishi (20)
Magento20100807
- 1. Magento
2010/08/07
Magento-JP User Group
- 4. • Development by Magento.Inc(LA)
• PHP5.2.x only
• MySQL4.1.20 or later with InnoDB
• Academic Free Lisence v3.0
• ECommerce!
- 7. Trends of EC Platform
magento-beta
magento ec-cube zencart
- 8. Trends of EC Platform
magento-1.0
magento-beta
magento ec-cube zencart
- 9. Trends of EC Platform
magento-1.3
magento-1.0
magento-beta
magento ec-cube zencart
- 10. Trends of EC Platform
magento-CE-1.4
magento-1.3
magento-1.0
magento-beta
magento ec-cube zencart
- 13. app code core
community
local
design frontend
adminhtml
etc
locale
lib
js javascript
skin frontend
adminhtml
- 24. <?xml version="1.0"?>
<layout version="0.1.0">
! <default>
! ! <!--
! ! <reference name="right">
! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/
news/block.phtml"/>
! ! </reference>
! ! -->
! </default>
! <snews_index_index>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</
template></action>
</reference>
<reference name="content">
<block type="snews/items" name="snews.news" template="scalena/news/
news.phtml">
! <block type="snews/pagination" name="snews.pagination" as="pagination"
template="scalena/news/pagination.phtml"/>
</block>
</reference>
</snews_index_index>
<snews_index_view>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</
template></action>
</reference>
<reference name="content">
<block type="snews/item" name="snews.detail" template="scalena/news/news-
detail.phtml" />
</reference>
</snews_index_view>
</layout>
- 25. • block
• reference
• action
• remove
- 26. block
•
•
• <block type=”foo” name=”foo”
template=”foo.phtml” />
- 27. <?xml version="1.0"?>
<layout version="0.1.0">
! <default>
! ! <!--
! ! <reference name="right">
! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/
news/block.phtml"/>
! ! </reference>
! ! -->
! </default>
! <snews_index_index>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</
template></action>
</reference>
<reference name="content">
<block type="snews/items" name="snews.news" template="scalena/news/
news.phtml">
! <block type="snews/pagination" name="snews.pagination" as="pagination"
template="scalena/news/pagination.phtml"/>
</block>
</reference>
</snews_index_index>
<snews_index_view>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</
template></action>
</reference>
<reference name="content">
<block type="snews/item" name="snews.detail" template="scalena/news/news-
detail.phtml" />
</reference>
</snews_index_view>
</layout>
- 29. <?xml version="1.0"?>
<layout version="0.1.0">
! <default>
! ! <!--
! ! <reference name="right">
! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/
news/block.phtml"/>
! ! </reference>
! ! -->
! </default>
! <snews_index_index>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</
template></action>
</reference>
<reference name="content">
<block type="snews/items" name="snews.news" template="scalena/news/
news.phtml">
! <block type="snews/pagination" name="snews.pagination" as="pagination"
template="scalena/news/pagination.phtml"/>
</block>
</reference>
</snews_index_index>
<snews_index_view>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</
template></action>
</reference>
<reference name="content">
<block type="snews/item" name="snews.detail" template="scalena/news/news-
detail.phtml" />
</reference>
</snews_index_view>
</layout>
- 31. <?xml version="1.0"?>
<layout version="0.1.0">
! <default>
! ! <!--
! ! <reference name="right">
! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/
news/block.phtml"/>
! ! </reference>
! ! -->
! </default>
! <snews_index_index>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</
template></action>
</reference>
<reference name="content">
<block type="snews/items" name="snews.news" template="scalena/news/
news.phtml">
! <block type="snews/pagination" name="snews.pagination" as="pagination"
template="scalena/news/pagination.phtml"/>
</block>
</reference>
</snews_index_index>
<snews_index_view>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</
template></action>
</reference>
<reference name="content">
<block type="snews/item" name="snews.detail" template="scalena/news/news-
detail.phtml" />
</reference>
</snews_index_view>
</layout>
- 34. • if endif;
• foreach endforeach;
• $this->hogehoge
• PHP
- 36. <?php $collection = $this->getItems(3); ?>
<?php if ( count($collection) == 0 ) : ?>
<p><?php echo $this->__('No news yet...'); ?></p>
<?php else : ?>
<dl>
<?php foreach ( $collection as $_item ) : ?>
<dt><a href="<?php echo Mage::helper('snews')->getUrl($_item['identifier']); ?>"><?php
echo $_item['title']; ?></a></dt>
<dd><?php echo $_item['date']; ?></dd>
<dd>
<?php if ( Mage::helper('snews')->getListLimitDescription() == 0 || strlen($_item
['description']) < Mage::helper('snews')->getListLimitDescription() ) : ?>
<?php echo $_item['description']; ?>
<?php else : ?>
<?php echo substr($_item['description'], 0, Mage::helper('snews')-
>getListLimitDescription()); ?>...
<?php endif; ?>
</dd>
<dd><a href="<?php echo Mage::helper('snews')->getUrl($_item['identifier']); ?>"><?php
echo $this->__('Learn more...'); ?></a></dd>
<?php endforeach; ?>
</dl>
<?php endif; ?>
- 38. Block
• XML block
• .phtml
• XML public
• XML
- 41. • Mage_Core_Model_Layout
createBlock
• core grep
• XML
- 42. • CMS XML
•
• Free_CMS
- 43. • 1.3
{{block type=”cms/block” block_id=”hoge”
template=”cms/content.phtml”}}
• 1.4
{{widget type="cms/widget_block"
template="cms/widget/static_block/
default.phtml" block_id="5"}}
- 49. XML
• page.xml head
• <action method="addJs"><script>mage/
cookies.js</script></action>
• <action method="addCss"><stylesheet>css/
styles.css</stylesheet></action>
- 50. IE
• <action
method="addItem"><type>skin_css</
type><name>css/styles-ie.css</
name><params/><if>lt IE 7</if></action>
• IE