Showing posts with label Products. Show all posts
Showing posts with label Products. Show all posts

Wednesday, April 4, 2012

Magneto get Previous & Next Product Links on Product view Page

It will be easy if you will get the next and previous product from any page instead of going to category or navigation or any other link You can add this code in any of the temaplte file Suppose we are showing in the view.phtml

Tuesday, March 27, 2012

Magento show subcateogry instead of Products in grid/list Page

Magneto Have default functionality of showing the Products in list view or Grid view
But some time we require to show the Sub catgeory in list page and if that sub catrgoy have another subcategory

For showing that we need to work on following

Sunday, February 19, 2012

Magento Get overall Bestselling Product

Magento Over all best selling Product on Home page
Add new function in files as per the version
- app/code/core/Mage/Sales/Model/Mysql4/Report/Bestsellers.php
- app/code/core/Mage/Sales/Model/Mysql4/Report/Bestsellers/Collection.php

Thursday, January 5, 2012

Magento How to get the Brand list in Product page

Add the Brand name on Product page

Note "manufacturer" is the Attribute code for Brand
<?php
$product = Mage::getModel('catalog/product');
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
->setEntityTypeFilter($product->getResource()->getTypeId())
->addFieldToFilter('attribute_code', 'manufacturer');
$attribute = $attributes->getFirstItem()->setEntity($product->getResource());
$manufacturers = $attribute->getSource()->getAllOptions(false);
?>
<ul id="manufacturer_list">
<?php foreach ($manufacturers as $manufacturer): ?>
<li><a href="#"><?php echo $manufacturer['label'] ?></a></li>
<?php endforeach; ?>
</ul>


Wednesday, January 4, 2012

Adding review in Product page

1) Add form data to catalog.xml & view.phtml The first thing to do is to add the review blocks to
the correct XML reference in catalog.xml which is in

app > design > frontend > default > yourtheme > layout

you’ll see the <reference name=”content”> for the catalog_product_view class.
Inside this reference add the following code:
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml">
  <block type="review/form" name="product.review.form" as="review_form"/>
</block>

Now the XML is set up, you just need to echo it on the product page in
app > design > frontend > default > yourtheme > template > catalog > product > view.phtml

<?php echo $this->getChildHtml('product_review') ?>

Getting the reviews page URL for a product in the product page sidebar

Adding the Review url in your customization page
For example
Since it is a new block that is needed, you need new template file.

Add:
app/design/frontend/base/default/template/review/sidebar.phtml

Enter into it something like:
 <div class="block block-reviews">
    <div class="block-title">
        <strong><span>Reviews</span></strong>
    </div>
    <div class="block-content">
    <p><a href="<?php echo $this->getNewReview($this->getProductId()) ?>">NewReview</a></p>
    </div>
</div>

LinkWithin

Blog has moved, searching new blog...