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

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

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

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.

Show intro-image and extra fields in Smart Search results in Joomla

I´m using Joomla Smart Search in my website and I´m want to show intro-image and some extrafields from the article in the search results.
Joomla Smart Search removes any html tags and I want to prevent to do this extra fields
in www\plugins\finder\content open content.php
then search for getListQuery , at the end of ->select list add ->select('a.images AS image'); save & close the file
in www\components\com_finder\views\search\tmpl open default_result.php
then search for class="result-title after the tag add these lines:
<?php $image=json_decode($this->result->image); ?>
<?php $aimage=$image->image_intro; ?>
<div class="search-img">
<a href="<?php echo JRoute::_($route); ?>">
<img src="/<?php echo $aimage; ?>" >
</a>
</div>
save & close
dont forget to purge & reindex the smart search
Smart search plugins say which fields should be indexed. You could replace some of the smart search plugins with ones of your own.
I have found a solution, not absolutly like I wanted but it works. The solution shows the intro-text and all inside the "read more" of the article in the search results (images, links and everything you want).
This solution was found here http://forum.joomla.org/viewtopic.php?p=2324152 and says something like this:
"You'll need to create a layout override for the components/com_finder/views/search /tmpl/default_result.php layout file using the steps described at http://docs.joomla.org/Understanding_Output_Overrides Once you've created the layout override, you should change"
<?php echo JHtml::_('string.truncate', $this->result->description, $this->params->get('description_length', 255)); ?>
in the layout file to:
<?php echo $this->result->summary; ?>
The location should be templates/template_name/html/com_finder/search/default_result.php
actually there is a very easy solution.
K2 saves the images based on the md5 hash of the id.
adding this:
<div class="search-img">
<img src="<?php echo JURI::base().'media/k2/items/cache/'.md5("Image".$this->result->id).'_M.jpg'; ?>" />
</div>
to the html override of the default_result.php will display the according k2 items (here in medium resolution)

Add AW Blog link to Magento top menu

Using the Magento 1.4 blog plug-in "AW Blog", how is it possible to get the "News" link it creates to appear in Magento's top menu (as opposed to the top links menu which it does by default)?
After changing AW Blog 'Route to Blog' configuration from 'news' to 'blog', add this to top.phtml :
<div class="nav-container">
<ul id="nav">
<?php echo $_menu ?>
<li><?php echo $this->__('Blog') ?></li>
</ul>
Probably no the most elegant solution as I didn't want Blog at the end of the menu, so if there's a better solution out there...
I haven't tried it but this extension seems to allow adding an arbitrary link to the menu.
http://www.magentocommerce.com/extension/657/navigation-bar-administrator

Resources