I have modified my magento catalog page using list.phtml by adding manufacturer name next to product name. Now this works well for all categories which have 'Anchor' set as No. It does not show the changes in categories where Anchor is set to yes. Could you please help me on this.
Thanks.
The layout for anchor and non-anchor categories is different look here:
<catalog_category_default>
and
<catalog_category_layered>
in catalog.xml
Perhaps your template only uses the non anchor list.phtml and falls back to base/default for the anchor categories?
In list.phtml I added the manufacturer
<?php echo $_helper->productAttribute($_product, $_product->getAttributeText('manufacturer'),'name') ?> - <?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a>
Related
I am creating a custom template for category product view. I am using the catalog/product/list.phtml for this page. The issue is the category title and the description is not displaying.
Can anyone please help me to solve this issue.
Thank You.
Try this code.
<?php
$currentCategory = Mage::registry('current_category');
echo $currentCategory->getName();
echo $currentCategory->getDescription();
?>
How to remove completely Sort By and Show per page from toolbar on product listing with grid view in Magento 1.9.1.0. I have only a few products on my shop so now I don't need sorting and showing functions. What file should I edit and how to change code in this file.
If you want to completely remove the toolbar from the product listing page, you can go to the list.phtml file located at below location :
app/design/frontend/rwd/default/template/catalog/product/list.phtml and comment the below lines
1) <?php //echo $this->getToolbarHtml() ?>
2) <?php /*<div class="toolbar-bottom">
<?php echo $this->getToolbarHtml() ?>
</div> */ ?>
My advice would be to copy the list.phtml into your local.
I want to handle the product overivew separataly to the product detail view. I want to add additional text right behind the price in the product deatil view.
I tried to edit the view.phtml in path app/design/frontend/mytheme/default/template/catalog/product/view.phtml, refreshed caches and so on, but nothing changed.
In catalog.xml view.phtml will be load. So its seems correct.
But even when I try to echo "test" it doesnt show anything.
<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<div class="std"><h2><?php echo $this->__('Details:') ?></h2>
</div>
</div>
<?php echo "test";
endif;?>
Do you have any hint?
Regards
Matt
You should enable template path hints in the backend to check which template file is used to render product page. Make sure that the cache is also disabled.
I want to show in my product page the approved reviews for the product.
So I am editing this file:
mytemplate/default/catalog/product/view.phtml
I tried adding this to the view.phtml file but nothing is showing up:
<?php echo $this->getChildHtml('reviews') ?>
Can you suggest a way of adding approved reviews on product page? I'm using Magento 1.7.0.2.
first of all write this code in catalog.xml
<block type="review/product_view_list" name="product.info.product_additional_data" as="reviews" template="review/product/view/list.phtml"/>
then
write this code in your view.phtml
<?php echo $this->getChildHtml('reviews') ?>
it will solve your problem...
add this line in template/review/product/view/list.phtml file
this line add anywere u want
$this->htmlEscape($_review->getStatusId())=='1'){ echo ' Approved Review';
Disable link functionality for certain products in Category View?
I only want some product to be visible in category, not clickable!
See example: http://i.imgur.com/m3ZHp1G.jpg I want only product in stock to be clickable.
How to do that? Step by step will be nice. Thanks.
Navigate to
app/design/frontend/<package_name>/<theme_name>/template/catalog/product/list.phtml
else copy this file from base/default theme to your theme
Goto this line
<h2 class="product-name"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></h2>
Add your condition before it