PZag Posted February 27, 2014 Share Posted February 27, 2014 Hi, everyone! I have a strange problem I can not solve. In the Front office the Block cart is translated mixed. When you are in Bulgarian language is OK and shows "Кошница е празна" , but when the menu is turned in English, it shows "Shopping cart е празна" . I tried to make a changes in .tpl files and translation too, but the result is the same. Can anyone help me? Thanks in advance. Regards, Link to comment Share on other sites More sharing options...
vekia Posted February 27, 2014 Share Posted February 27, 2014 any chance to see it live? if so, please share url to your shop Link to comment Share on other sites More sharing options...
PZag Posted February 28, 2014 Author Share Posted February 28, 2014 Hi, vekia! The URL is: http://ogledalata.com . I thought that the problem is at the translations. I checked them but the problem is not there. I checked the codes too but everything seems OK. Thank you for your reply. Regards, Link to comment Share on other sites More sharing options...
PZag Posted March 2, 2014 Author Share Posted March 2, 2014 Any suggestions about problem resolving? Thank in advance. Link to comment Share on other sites More sharing options...
PZag Posted March 5, 2014 Author Share Posted March 5, 2014 47 views but there are not any ideas. Strange...! Link to comment Share on other sites More sharing options...
vekia Posted March 5, 2014 Share Posted March 5, 2014 i missed your replies, sorry can you please show contents of your blockuserinfo.tpl file ( modules/blockuserinfo or if exists from themes/YOUR_THEME/modules/blockuserinfo) Link to comment Share on other sites More sharing options...
PZag Posted March 5, 2014 Author Share Posted March 5, 2014 It's OK about the replies and I thank you again for the help. This is the content of the file: <!-- Block user information module HEADER --> <div id="header_user" {if $PS_CATALOG_MODE}class="header_user_catalog"{/if}> <ul id="header_nav"> {if !$PS_CATALOG_MODE} <li id="shopping_cart"> <a href="{$link->getPageLink($order_process, true)|escape:'html'}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow">{l s='Cart' mod='blockuserinfo'} <span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span> <span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='Product' mod='blockuserinfo'}</span> <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='Products' mod='blockuserinfo'}</span> <span class="ajax_cart_total{if $cart_qties == 0} hidden{/if}"> {if $cart_qties > 0} {if $priceDisplay == 1} {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant} {convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)} {else} {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant} {convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)} {/if} {/if} </span> <span class="ajax_cart_no_product{if $cart_qties > 0} hidden{/if}">{l s='is empty' mod='blockuserinfo'}</span> </a> </li> {/if} <li id="your_account"><a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}" rel="nofollow">{l s='Your Account' mod='blockuserinfo'}</a></li> </ul> <p id="header_user_info"> {l s='Welcome' mod='blockuserinfo'} {if $logged} <a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow">{$cookie->customer_firstname}</a> <a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout" rel="nofollow">{l s='Log out' mod='blockuserinfo'}</a> {else} <a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a> {/if} </p> </div> <!-- /Block user information module HEADER --> Regards, Peter Link to comment Share on other sites More sharing options...
vekia Posted March 5, 2014 Share Posted March 5, 2014 what does this: е празна mean? Link to comment Share on other sites More sharing options...
PZag Posted March 6, 2014 Author Share Posted March 6, 2014 It means "is empty" . It have to be in english but it's not. At the beginning of the project it was mixed at all. I mean that when you turn in bulgarian language the site, the Cart was written "Кошница is empty" (Кошница means Shopping cart) and when you turn in english language the site, the Cart was written "Shopping bag е празна" . I fixed it in bulgarian by the translation and now is OK. But the english version is not as you can see and I don't know where is the problem. Link to comment Share on other sites More sharing options...
vekia Posted March 6, 2014 Share Posted March 6, 2014 it's here: {$cart_qties} can you show what you've got in blockuserinfo.php file,, only this function: public function hookTop($params) Link to comment Share on other sites More sharing options...
PZag Posted March 6, 2014 Author Share Posted March 6, 2014 This is the code from blockuserinfo.php: public function hookTop($params) { if (!$this->active) return; $this->smarty->assign(array( 'cart' => $this->context->cart, 'cart_qties' => $this->context->cart->nbProducts(), 'logged' => $this->context->customer->isLogged(), 'customerName' => ($this->context->customer->logged ? $this->context->customer->firstname.' '.$this->context->customer->lastname : false), 'firstName' => ($this->context->customer->logged ? $this->context->customer->firstname : false), 'lastName' => ($this->context->customer->logged ? $this->context->customer->lastname : false), 'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order' )); return $this->display(__FILE__, 'blockuserinfo.tpl'); } Note: But this code is from: /public_html/modules/blockuserinfo , not from: /public_html/themes/MY_THEME/modules/blockuserinfo if it is important. In the second directory there isn't blockuserinfo.php . There is only blockuserinfo.tpl . May be the note is a little silly but I don't know and a decided to mentioned it. Regards, Peter Link to comment Share on other sites More sharing options...
vekia Posted March 6, 2014 Share Posted March 6, 2014 and code of blockuserinfo.tpl that you attached is from /themes/ ? it's okay, php files should be in original folder only Link to comment Share on other sites More sharing options...
PZag Posted March 6, 2014 Author Share Posted March 6, 2014 The code that I attached before is from blockuserinfo.php file, which is in the original folder. Now I will attach the code of blockuserinfo.tpl file if you need from. It is from the theme that I am using: <!-- Block user information module HEADER --> <div id="header_user" {if $PS_CATALOG_MODE}class="header_user_catalog"{/if}> <ul id="header_nav"> {if !$PS_CATALOG_MODE} <li id="shopping_cart"> <a href="{$link->getPageLink($order_process, true)|escape:'html'}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow">{l s='Cart' mod='blockuserinfo'} <span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span> <span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='Product' mod='blockuserinfo'}</span> <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='Products' mod='blockuserinfo'}</span> <span class="ajax_cart_total{if $cart_qties == 0} hidden{/if}"> {if $cart_qties > 0} {if $priceDisplay == 1} {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant} {convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)} {else} {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant} {convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)} {/if} {/if} </span> <span class="ajax_cart_no_product{if $cart_qties > 0} hidden{/if}">{l s='is empty' mod='blockuserinfo'}</span> </a> </li> {/if} <li id="your_account"><a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}" rel="nofollow">{l s='Your Account' mod='blockuserinfo'}</a></li> </ul> <p id="header_user_info"> {l s='Welcome' mod='blockuserinfo'} {if $logged} <a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow">{$cookie->customer_firstname}</a> <a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout" rel="nofollow">{l s='Log out' mod='blockuserinfo'}</a> {else} <a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a> {/if} </p> </div> <!-- /Block user information module HEADER --> Link to comment Share on other sites More sharing options...
PZag Posted March 10, 2014 Author Share Posted March 10, 2014 What do I have to do to fix this problem? Regards, Petar Link to comment Share on other sites More sharing options...
vekia Posted March 10, 2014 Share Posted March 10, 2014 everything looks fine in your files i have no idea what's goin on there, it needs a bit more inspection (core, several changes, access to bo for test purposes) Link to comment Share on other sites More sharing options...
PZag Posted March 14, 2014 Author Share Posted March 14, 2014 The problem is solved finilly. But unfortunately I don't know what was the problem to share. Everything became OK when I have updated the theme with new one version. If someone has any idea, please share. The most important that the problem is done. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now