[Skip to main content](#vessel-content)

#   Help with empty cart in multi language site

##

- **[MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")**
- [![MarioMagno's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/45246-mariomagno "View MarioMagno's Profile") Topic Author
- [ Offline](/forum/user/45246-mariomagno)

Less More

- Posts: 14
- Thank you received: 0
-
-

10 years 2 months ago [\#250991](#250991) by [MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")  *[Help with empty cart in multi language site](/forum/27-checkout/886636-help-with-empty-cart-in-multi-language-site#250991 "Hello everyone, my compliments for support team. I have one issue to submit to all of you: I've inserted a code:  hikashop::completeLink('product&amp;task=cleancart&amp;return&#95;url='. urlencode(base64&#95;encode('index.php?lang=it'))); ?&amp;gt;';return false;&amp;quot;/&amp;gt;.  and works.  But I have a multilanguage site. So, in this way I do not have a different sentences (Empty cart) in all of languges.  Can you hel me please? Thanks in advance'")* was created by *[MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")*

Hello everyone,
my compliments for support team.
I have one issue to submit to all of you:
I've inserted a code:
&lt;input type="submit" class="button" name='EMPTY_CART' value="Svuota carrello" onclick="window.location='&lt;?php echo hikashop::completeLink('product&amp;task=cleancart&amp;return_url='. urlencode(base64_encode('index.php?lang=it'))); ?&gt;';return false;"/&gt;.

and works.

But I have a multilanguage site. So, in this way I do not have a different sentences (Empty cart) in all of languges.

Can you hel me please?
Thanks in advance

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYzNi1oZWxwLXdpdGgtZW1wdHktY2FydC1pbi1tdWx0aS1sYW5ndWFnZS1zaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

10 years 2 months ago [\#250993](#250993) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Help with empty cart in multi language site](/forum/27-checkout/886636-help-with-empty-cart-in-multi-language-site#250993 "Hello everyone, my compliments for support team. I have one issue to submit to all of you: I've inserted a code:  hikashop::completeLink('product&amp;task=cleancart&amp;return&#95;url='. urlencode(base64&#95;encode('index.php?lang=it'))); ?&amp;gt;';return false;&amp;quot;/&amp;gt;.  and works.  But I have a multilanguage site. So, in this way I do not have a different sentences (Empty cart) in all of languges.  Can you hel me please? Thanks in advance'")*

Hi,

You need to change the piece:
&lt;?php echo hikashop::completeLink('product&amp;task=cleancart&amp;return_url='. urlencode(base64_encode('index.php?lang=it'))); ?&gt;

to:
&lt;?php $lang = JFactory::getLanguage(); $locale=strtolower(substr($lang-&gt;get('tag'),0,2)); echo hikashop::completeLink('product&amp;task=cleancart&amp;return_url='. urlencode(base64_encode('index.php?lang='.$locale))); ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYzNi1oZWxwLXdpdGgtZW1wdHktY2FydC1pbi1tdWx0aS1sYW5ndWFnZS1zaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")**
- [![MarioMagno's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/45246-mariomagno "View MarioMagno's Profile") Topic Author
- [ Offline](/forum/user/45246-mariomagno)

Less More

- Posts: 14
- Thank you received: 0
-
-

10 years 2 months ago -  10 years 2 months ago [\#251033](#251033) by [MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")  Replied by *[MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")* on topic *[Help with empty cart in multi language site](/forum/27-checkout/886636-help-with-empty-cart-in-multi-language-site#251033 "Hello everyone, my compliments for support team. I have one issue to submit to all of you: I've inserted a code:  hikashop::completeLink('product&amp;task=cleancart&amp;return&#95;url='. urlencode(base64&#95;encode('index.php?lang=it'))); ?&amp;gt;';return false;&amp;quot;/&amp;gt;.  and works.  But I have a multilanguage site. So, in this way I do not have a different sentences (Empty cart) in all of languges.  Can you hel me please? Thanks in advance'")*

> nicolas wrote: Hi,
>
> You need to change the piece:
> &lt;?php echo hikashop::completeLink('product&amp;task=cleancart&amp;return\_url='. urlencode(base64\_encode('index.php?lang=it'))); ?&gt;
>
> to:
> &lt;?php $lang = JFactory::getLanguage(); $locale=strtolower(substr($lang-&gt;get('tag'),0,2)); echo hikashop::completeLink('product&amp;task=cleancart&amp;return\_url='. urlencode(base64\_encode('index.php?lang='.$locale))); ?&gt;

Hi Nicolas,
thanks for your quick reply, but unfortunately it doesn't work.
It shown always the same label "Empty Cart" in all languages (maybe caused from input string: input type="submit" class="button" name='**EMPTY\_CART**' value="Svuota carrello" ... )?

Thanks
Mario

Last edit: 10 years 2 months ago by [MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYzNi1oZWxwLXdpdGgtZW1wdHktY2FydC1pbi1tdWx0aS1sYW5ndWFnZS1zaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

10 years 1 month ago [\#251054](#251054) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Help with empty cart in multi language site](/forum/27-checkout/886636-help-with-empty-cart-in-multi-language-site#251054 "Hello everyone, my compliments for support team. I have one issue to submit to all of you: I've inserted a code:  hikashop::completeLink('product&amp;task=cleancart&amp;return&#95;url='. urlencode(base64&#95;encode('index.php?lang=it'))); ?&amp;gt;';return false;&amp;quot;/&amp;gt;.  and works.  But I have a multilanguage site. So, in this way I do not have a different sentences (Empty cart) in all of languges.  Can you hel me please? Thanks in advance'")*

I thought that the issue was with the lang parameter not the name of the button.

For the name of the button, you can use such code: Code:

&lt;?php echo JText::_('EMPTY_CART'); ?&gt;

And then add a translation override :
EMPTY_CART="Empty cart"
[ www.hikashop.com/download/languages.html#modify](https://www.hikashop.com/download/languages.html#modify)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYzNi1oZWxwLXdpdGgtZW1wdHktY2FydC1pbi1tdWx0aS1sYW5ndWFnZS1zaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")**
- [![MarioMagno's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/45246-mariomagno "View MarioMagno's Profile") Topic Author
- [ Offline](/forum/user/45246-mariomagno)

Less More

- Posts: 14
- Thank you received: 0
-
-

10 years 1 month ago [\#251145](#251145) by [MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")  Replied by *[MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")* on topic *[Help with empty cart in multi language site](/forum/27-checkout/886636-help-with-empty-cart-in-multi-language-site#251145 "Hello everyone, my compliments for support team. I have one issue to submit to all of you: I've inserted a code:  hikashop::completeLink('product&amp;task=cleancart&amp;return&#95;url='. urlencode(base64&#95;encode('index.php?lang=it'))); ?&amp;gt;';return false;&amp;quot;/&amp;gt;.  and works.  But I have a multilanguage site. So, in this way I do not have a different sentences (Empty cart) in all of languges.  Can you hel me please? Thanks in advance'")*

> nicolas wrote: I thought that the issue was with the lang parameter not the name of the button.
>
> For the name of the button, you can use such code:
>
> Code:
>
> &lt;?php echo JText::_('EMPTY_CART'); ?&gt;
>
>
>
> And then add a translation override :
> EMPTY\_CART="Empty cart"
> [ www.hikashop.com/download/languages.html#modify](https://www.hikashop.com/download/languages.html#modify)

Ok, but where can I write the piece of code you mentioned?
Maybe I can write like this:

&lt;?php echo JText::_('EMPTY_CART'); ?&gt;
&lt;?php $lang = JFactory::getLanguage(); $locale=strtolower(substr($lang-&gt;get('tag'),0,2)); echo hikashop::completeLink('product&amp;task=cleancart&amp;return_url='. urlencode(base64_encode('index.php?lang='.$locale))); ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYzNi1oZWxwLXdpdGgtZW1wdHktY2FydC1pbi1tdWx0aS1sYW5ndWFnZS1zaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

10 years 1 month ago [\#251149](#251149) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Help with empty cart in multi language site](/forum/27-checkout/886636-help-with-empty-cart-in-multi-language-site#251149 "Hello everyone, my compliments for support team. I have one issue to submit to all of you: I've inserted a code:  hikashop::completeLink('product&amp;task=cleancart&amp;return&#95;url='. urlencode(base64&#95;encode('index.php?lang=it'))); ?&amp;gt;';return false;&amp;quot;/&amp;gt;.  and works.  But I have a multilanguage site. So, in this way I do not have a different sentences (Empty cart) in all of languges.  Can you hel me please? Thanks in advance'")*

Hi,

As I said, you need to replace the name of the button by that code.
So: Code:

&lt;input type="submit" class="button" name='&lt;?php echo JText::_('EMPTY_CART'); ?&gt;' value="&lt;?php echo JText::_('EMPTY_CART'); ?&gt;" onclick="window.location='&lt;?php $lang = JFactory::getLanguage(); $locale=strtolower(substr($lang-&gt;get('tag'),0,2)); echo hikashop::completeLink('product&amp;task=cleancart&amp;return_url='. urlencode(base64_encode('index.php?lang='.$locale))); ?&gt;';return false;"/&gt;.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYzNi1oZWxwLXdpdGgtZW1wdHktY2FydC1pbi1tdWx0aS1sYW5ndWFnZS1zaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")**
- [![MarioMagno's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/45246-mariomagno "View MarioMagno's Profile") Topic Author
- [ Offline](/forum/user/45246-mariomagno)

Less More

- Posts: 14
- Thank you received: 0
-
-

10 years 1 month ago [\#251283](#251283) by [MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")  Replied by *[MarioMagno](/forum/user/45246-mariomagno "View MarioMagno's Profile")* on topic *[Help with empty cart in multi language site](/forum/27-checkout/886636-help-with-empty-cart-in-multi-language-site#251283 "Hello everyone, my compliments for support team. I have one issue to submit to all of you: I've inserted a code:  hikashop::completeLink('product&amp;task=cleancart&amp;return&#95;url='. urlencode(base64&#95;encode('index.php?lang=it'))); ?&amp;gt;';return false;&amp;quot;/&amp;gt;.  and works.  But I have a multilanguage site. So, in this way I do not have a different sentences (Empty cart) in all of languges.  Can you hel me please? Thanks in advance'")*

Thank you very much!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYzNi1oZWxwLXdpdGgtZW1wdHktY2FydC1pbi1tdWx0aS1sYW5ndWFnZS1zaXRlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.067 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
