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

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

Related

Is it possible to add a flag icon using the Magento admin panel?

Using magneto for my website and I need to display two different languagse. I have to set a flag icon for each location. One for English and one for Arabic. Is it possible to add a flag icon using the Magento admin panel, but not in root folder.
You can use extension https://www.magentocommerce.com/magento-connect/easy-flags-module.html
You can customize it in your way.
You should do it via template files.you will
have to write custom code for it.
Please refer to the example below:
<?php
foreach ($this->getCurrencies() as $_code => $_name):
$current_currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
if($current_currency_code == $_code) continue;
?>
<li class=" sel-cur" data-toggle="tooltip" data-placement="bottom">
</li>
<?php endforeach; ?>
OR
You can Use extensions like
Easy Flags

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.

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.

In which file Joomla 3.x generating the "edit article" links for authors Front End?

If you are allowed to edit the articles in Joomla, near the each article in the list, an "edit" button is present. How can I find, how that "edit" button generated? I just want to add some parameters. (I'm using a Front End for edit.)
It's in components/com_content/views/article/tmpl/default.php
<?php if ($canEdit) : ?>
<li class="edit-icon"> <?php echo JHtml::_('icon.edit', $this->item, $params); ?> </li>
<?php endif; ?>
You can override this in your template's html folder.
This script calls a function under components/com_content/helpers/icon.php to generate the icon.
You should not override this helper file. If you need to change what that function is doing, filter the content it generates after it has been run, whether via a plug-in or the default.php file.

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