Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 3
How do I show the currency switcher on the home page? 
 
l781
Sr. Member
 
Total Posts:  109
Joined:  2008-11-09
 

my “ vart_nav.phtml” is taken from your post #13:

<?php $_categories=$this->getCurrentChildCategories() ?>
<div class="cate">
    <
div class="cate1">Categories</div>
    <
div class="cate2">
        
<?php $i 2 ?>
        <?php 
foreach ($_categories as $_category): ?>
              <?php 
if($_category->getIsActive()): ?>
                      <?php $i
++ ?>
                      <?php 
if ($i == 1): ?>
                          <?php 
if($_category->getProductCount() > 0): ?>
                               
<a href="<?php echo $this->getCategoryUrl($_category) ?>"><?php echo $this->htmlEscape($_category->getName()) ?> (<?php echo $_category->getProductCount() ?>)</a>
                           
<?php endif ?>
                           <?php 
if($_category->getProductCount() == 0): ?>
                               
<a href="<?php echo $this->getCategoryUrl($_category) ?>"><?php echo $this->htmlEscape($_category->getName()) ?> </a>
                           
<?php endif ?>
                    <?php 
endif ?>
                      <?php 
if ($i != 1): ?>
                          
<div class="left-hr"></div>
                          
<?php if($_category->getProductCount() > 0): ?> 
                               
<a href="<?php echo $this->getCategoryUrl($_category) ?>"><?php echo $this->htmlEscape($_category->getName()) ?> (<?php echo $_category->getProductCount() ?>)</a>
                           
<?php endif ?>
                           <?php 
if($_category->getProductCount() == 0): ?>
                               
<a href="<?php echo $this->getCategoryUrl($_category) ?>"><?php echo $this->htmlEscape($_category->getName()) ?>  </a>
                           
<?php endif ?>
                      <?php endif?>
              <?php 
endif ?>
        <?php 
endforeach; ?>
    
</div>
    <
div class="cate3"></div>
</
div>
 
Magento Community Magento Community
Magento Community
Magento Community
 
khinon86
Jr. Member
 
Total Posts:  19
Joined:  2009-01-08
 

To I781: you can get product count by following this link : http://devzone.pratthost.com/2008/12/17/magento-display-only-if-there-are-products-in-the-category/

To N B : thank you very much, your vert_nav.phtml works fine for me :D

 
Magento Community Magento Community
Magento Community
Magento Community
 
khinon86
Jr. Member
 
Total Posts:  19
Joined:  2009-01-08
 

To N B : after using your vert_nav.phtml, I found an error. On homepage your vert_nav works fine ( it shows the number of products ). However, if I click a category ( for example I call this category TestCategory) , on category page, my left store navigation does not show both category name and the number of products. I think the reason is you use getCurrentChildCategories() and my TestCategory does not have any childrens. Therefore, I follow the link that I gave in my post above and everything is great now ^ ^

 
Magento Community Magento Community
Magento Community
Magento Community
 
l781
Sr. Member
 
Total Posts:  109
Joined:  2008-11-09
 
khinon86 - 26 February 2009 04:58 PM

To I781: you can get product count by following this link : http://devzone.pratthost.com/2008/12/17/magento-display-only-if-there-are-products-in-the-category/

sorry, but you not understant my problem. using vert_nav.phtml - it shows number of products on category, but one category on Frontend show few’er products count than it shows in Admin!

maybe somebody has similar issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ravikumar N B
Sr. Member
 
Avatar
Total Posts:  213
Joined:  2009-01-12
 

I had that same issue previously.
Problem is product visibility status. So change that visibility status to enable for that product.
Eg:
We map that product into some category. But product visibility status is disabled then that product doesnt display in front-end.

 
Magento Community Magento Community
Magento Community
Magento Community
 
l781
Sr. Member
 
Total Posts:  109
Joined:  2008-11-09
 

thanks, Ravikumar!!

you are 100% right!! smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
spice_mage
Jr. Member
 
Total Posts:  8
Joined:  2009-03-03
 

Hi Ravi and everybody,

I am trying to get the product count using the getstorecategories(). I modified the code as mentioned by you. And am enclosing here my phtml file. The problem is that I am getting the category count as zero, if the categories have children. I have also modified the category.php as mentioned by Ravi.

Am including the screenshot of the output, where you can see that all the parent categories show a count of 0. Can anyone pls help ?

Thanks!

Image Attachments
output.bmp
File Attachments
navigationmod.phtml  (File Size: 4KB - Downloads: 85)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Ravikumar N B
Sr. Member
 
Avatar
Total Posts:  213
Joined:  2009-01-12
 
spice_mage - 16 March 2009 05:35 AM

Hi Ravi and everybody,

I am trying to get the product count using the getstorecategories(). I modified the code as mentioned by you. And am enclosing here my phtml file. The problem is that I am getting the category count as zero, if the categories have children. I have also modified the category.php as mentioned by Ravi.

Am including the screenshot of the output, where you can see that all the parent categories show a count of 0. Can anyone pls help ?

Thanks!

I think you are created one new module(navigationmod), give me that tar ball for troubleshoot.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ironwill
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2009-04-10
 

Hi
I did all theses settings.. but no luck…

Is any source code setting or in CMS setting from admin..?
please help me out , how to show the currency drop down in header ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ravikumar N B
Sr. Member
 
Avatar
Total Posts:  213
Joined:  2009-01-12
 

Add the below content in home page CMS custom design

<reference name="left">
<
block type="directory/currency" name="currency" before="left.permanent.callout" template="directory/currency.phtml"/>
</
reference>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Ravikumar N B
Sr. Member
 
Avatar
Total Posts:  213
Joined:  2009-01-12
 

Follow the instruction given in below link.

http://www.magentocommerce.com/boards/viewthread/11715/#t108461

Just two modifications, one in page.xml and template/page/html/header.phtml

This is working fine in 1.2.1.2 version. But listbox length is too long, so modify the /template/directory/currency.phtml also.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ironwill
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2009-04-10
 

Hi dear !

<reference name="left">
<block type="directory/currency" name="currency" before="left.permanent.callout" template="directory/currency.phtml"/>
</reference>

I already embed this code in home page in CMS. i thnk it shows the currency in left panel not in header.
also follow the instruction you guided..

but no luch again ...

????

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ironwill
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2009-04-10
 

Hello Ravi,

i disable the cache from admin, now it is showing in header at local server, but not working on live server.
remain blank ..........  ?

what’s the reason ?

is any setting on live server for this or need to change some code for this ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
PauloON
Jr. Member
 
Total Posts:  21
Joined:  2009-06-16
 

Hi Folks!

I used some tips at this topic to change the currency name labels located on the “locale” xml files, inside Zend structure.
I’ve edited en.xml, pt.xml and the changes worked immediatelly but, for some misterious reason, the changes I do inside the es.xml does not reflect on the frontend.
Magento’s cache is all disabled. I’ve tried different browsers, cleaning cache and much more. Nothing worked.

I’ve already checked and I’m 99% sure I’m editing the right es.xml file.

Does Zend has any cache or somethings that has to be refreshed ?

Thanks for the help!
Paulo.

 
Magento Community Magento Community
Magento Community
Magento Community
 
A2daK
Jr. Member
 
Total Posts:  2
Joined:  2009-05-06
 

Hey Willo, I just spent 1 hour changing code (page.xml, directory.xml, catalog.xml) trying to get the currency convertor to show. I had been into the Admin / Configuration menu to setup the currencies etc.

My FIX is simple and not as obvious as it should be. In order for the currency switcher to show up you MUST go to the Admin System / Manage Currency Rates and click import from the web service and then hit save. Boom. Now you have setup the differences between currencies they show up now. I’m surprised no one else mentioned this step.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 3