Recent Post

All Pages

Like Us On Facebook

About

Gallery

Thứ Năm, 23 tháng 10, 2014

Code - Model class trong Magento



$headBlock->setTitle($title);
$product = $this->getProduct();
            $title = $product->getMetaTitle();
$currentCategory = Mage::registry('current_category');
setDescription(Mage::helper('core/string')

// if this is a product view page
            if (Mage::registry('product')) {
//Vòng loop foreach================
<?php foreach ($_filters as $_filter): ?>
    for every Item
<?php endforeach; ?>

<?php $subs = $obj->getCurrentCategory()->getAllChildren(true); ?> //getting ids of subcategories of current category

$_regularPrice = $product->getPrice();
        $_finalPrice = $product->getFinalPrice();

Mage::app()
Mage::helper('tax')
Mage::helper('core')

$collection = Mage::getModel('catalog/product')->getCollection(); 
$collection->addAttributeToSelect('brand');
$collection->addAttributeToFilter();

$this->getSkinUrl('images/header/az_marker100.jpg')) will output:
http://yourwebsite.com/skin/frontend/default/MG03C20024/images/header/az_marker100.jpg



Email Newsletter



Smiley :)
:D
:)
:[
;)
:D
:O
(6)
(A)
:'(
:|
:o)
8)
(K)
(M)

Không có nhận xét nào:

Đăng nhận xét

Biểu mẫu liên hệ

Tên

Email *

Thông báo *