Disable link functionality for certain products in Category View? (Magento) - magento

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

Related

Magenot Remove Sort by and Show per page from toolbar

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.

How to add custom text in front of price in the cart page?

I want to add some custom text in front of the price in the Magento cart page as shown in the image.
I found the following lines in the app\design\frontend\mydesign\default\template\checkout\cart.phtml
There is following code
<tbody>
<?php foreach($this->getItems() as $_item): ?>
<?php echo $this->getItemHtml($_item) ?>
<?php endforeach ?>
</tbody>
But how to edit this and in which file I am not getting.
Please help.
$this->getItemHtml($_item) actually loads the template file app\design\frontend\base\default\template\checkout\cart\item\default.phtml. So just copy it from base theme folder to your theme folder and modify it. The text "AUD" can be added to the <td> cell that displays the product price.
If you want to add "AUD" everywhere a price is displayed, you can go to admin and change currency symbols under System -> Manage Currency -> Symbols
when you are beginner of magento and active theme package is "rwd"
than you find product details of "<'tbody'>" on shopping cart page is below path:
C:\wamp\www\magento\app\design\frontend\rwd\default\template\checkout\cart\item\default.phtml

Magento product overview and detail separated view

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.

How to remove data from header menu and add new content to it in Magento

I am working with magento.
I have been trying to remove the content from header-menu and add fresh content like
**HOME ABOUTUS SITES CONTACT**
Here is the current situation,
Update
Above is the screen shot that follows after the top-menu
Please guide me to achieve this..
Thank you.
I assume the above menutimes that you've shown in the image are categories. So if you don't need it on the top menu then go to each of the categories (under Catalog -> Manage Categories) in the backend / admin panel and choose "NO" as an value to the option "Include in Navigation Menu". This will remove them from the navigation top menu.
And to bring these menu items
HOME ABOUTUS SITES
Let me describe it for one of the items above. Lets take About Us
At first create the respective CMS static block for "About Us"
Create a category called "About Us"
Go to display settings of the About Us category and choose the display mode as "static block only" and then select the static block "about us"
Save the category and reload your page on the frontend/website
you can find the "about us" category on the top menu and opening it will show the content from the static block.
Repeat the same for the other menu items.
If this helps mark it as answer. Thanks.
I think you didn't want categories in top menu. In place of it you want Custom links like "Home", "About us" etc.
For this open topmenu.phtml file in template->page->html.
In this commented the below line :-
<?php echo $_menu ?>
and in place of it call a static block of name "custom_top_nav" :-
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('custom_top_nav')->toHtml() ?>
In this block you can make your custom menu.
We you want both custom links plus categories then you can replace code with this:-
<?php $_menu = $this->getHtml('level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
<ul id="nav">
<li class="home"> HOME </li>
<?php echo $_menu ?>
</ul>
</div>
<?php endif ?>
Magento hide categories in the header menu - This can be done from your Admin Panel under Manage Categories > To do this is easy if you don't want your categories in top menu of your web site - When you add a new Category Select no for > Include in Navigation Menu * Its under Meta Description at the bottom of the page where you add the the Category name in General Information Tab*

Magento - catalog layout

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>

Resources