Localizing the jmquickbuy "Items in your cart"

Hi,

I’m currently trying to localize the "X items in your cart" string in the jmquickbuy menu to german.
http://playground.oneinsixbillion.de/index.php/home

In which file can I localize the strings for this?

Thanks
Daniel

5 answers

Profile photo of Sherlock 0.00 $tone September 26, 2013
Public

Hi Daniel,

you can open the file of app\design\frontend\default\jm_siotistemplate\jma jaxcart\cart.phtml there you would see this code

HTML Code:

  <strong class="totalcart"> 
			<?php if(Mage::getSingleton('checkout/session')->getQuote()->getSubtotal() > 0) { 
						//echo Mage::helper('checkout')->formatPrice(Mage::getSingleton('checkout/session')->getQuote()->getSubtotal(),2);
						echo Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty().' items';
 					} else {
						echo $this->__('0 items');
 					} ?> 
			</strong> <br/>
			<span><a id="gotocart" href="<?php echo Mage::getUrl("checkout/cart"); ?>"> in your cart </a></span>

Those texts of items and in your cart can be translated here !

#1
Profile photo of Daniel Glueck 0.00 $tone October 1, 2013
Public

app/design/frontend/default/jm_siotis/template/jmajaxcart/cart.phtml

PHP Code:

<?php

/**

 * Magento

 *

 * NOTICE OF LICENSE

 *

 * This source file is subject to the Academic Free License (AFL 3.0)

 * that is bundled with this package in the file LICENSE_AFL.txt.

 * It is also available through the world-wide-web at this URL:

 * http://opensource.org/licenses/afl-3.0.php

 * If you did not receive a copy of the license and are unable to

 * obtain it through the world-wide-web, please send an email

 * to [email protected] so we can send you a copy immediately.

 *

 * DISCLAIMER

 *

 * Do not edit or add to this file if you wish to upgrade Magento to newer

 * versions in the future. If you wish to customize Magento for your

 * needs please refer to http://www.magentocommerce.com for more information.

 *

 * egory    design

 * @package     base_default

 * Copyright (c) 2012 Magento Inc. ([url]http://www.magentocommerce.com[/url])

 * @license     [url]http://opensource.org/licenses/afl-3.0.php[/url]  Academic Free License (AFL 3.0)

 */

?>

<?php

/**

 * Shopping cart template

 *

 * @see Mage_Checkout_Block_Cart

 */

?>

<?php echo $this->getChildHtml('form_before'?>

<div class="content">

<form class="jmquickview_cart_form" action="<?php echo $this->getUrl('checkout/cart/updatePost'?>" method="post">

<div class="block block-cart" >

    <?php $_cartQty $this->getSummaryCount() ?>

   

    <div class="block-content"  id="jmajaxcartscroll" style="max-height:225px">

        <div class="block-content-inner" >

                <?php $_items $this->getItems() ?>

                <?php if(count($_items)): ?>

                    <p class="block-subtitle"><?php echo $this->__('Recently added item(s)'?></p>

                    <ol id="cart-sidebar" class="mini-products-list">

                    <?php foreach($_items as $_item): ?>

                        <?php echo $this->getItemHtml($_item?>

                    <?php endforeach; ?>

                    </ol>

                    <script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>

                <?php else: ?>

                    <p class="empty"><?php echo $this->__('You have no items in your shopping cart.'?></p>

                <?php endif ?>

                 

        </div>

    </div>

    

</div>

    

     <div class="buttons" >

        <div class="summary">

            <p class="subtotal">

                <?php echo $this->getChildHtml('totals'); ?>

            </p>

        </div>

        <button type="submit" name="update_cart_action" value="update_qty" title="<?php echo $this->__('Update Shopping Cart'); ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>

        <button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo $this->__('Clear Shopping Cart'); ?>" class="button btn-empty" id="empty_cart_button"><span><span><?php echo $this->__('Clear Shopping Cart'); ?></span></span></button>

       

        <?php if(!$this->hasError()): ?>

        <ul class="checkout-types">

        <?php foreach ($this->getMethods('top_methods') as $method): ?>

            <?php if ($methodHtml $this->getMethodHtml($method)): ?>

            <li><?php echo $methodHtml?></li>

            <?php endif; ?>

        <?php endforeach; ?>

        </ul>

        <?php endif; ?>

     </div>

 </form>

</div>

This is how the file looks for me… Can’t find what you have written in the last post.
Any other suggestions?
Thanks
Daniel

#2
Profile photo of Daniel Glueck 0.00 $tone October 6, 2013
Public

Hi Sherlock,
thanks for the response. It worked
Another question, if I add articles to my cart then "1 Items" is displayed instead of german "1 Artikel".
Where can I change this text?
Thanks
Daniel

#4
Profile photo of Sherlock 0.00 $tone October 9, 2013
Public

you can open the file of app/code/local/Wavethemes/Jmquickbuy/controllers/IndexController.php there you look for this function

PHP Code:

// get total cart items
public function totalAction(){

if(Mage::getSingleton('checkout/session')->getQuote()->getSubtotal() > 0) {
// echo '$'.number_format(Mage::getSingleton('checkout/session')->getQuote()->getSubtotal(),2);
echo Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty().' items';
} else {
echo 
$this->__('No items');
}






here you can change those texts of ‘ items’ and ‘No items’ as you wish

I hope it helps !

#5

Please login or Register to Submit Answer

Written By

Comments