Language add to cart button

Tagged: 

ThemeBurn SupportForumsOpenCart ThemesPavilion OpenCart ThemeLanguage add to cart button

This topic has been marked as resolved.

I use several languages and still the “add to cart” on several buttons is only showing “add to cart” instead of the text belonging to the language a user is setting.

It’s in the following tested blocks:
Featured products
Latest products
Categories

I don’t know if there are any other blocks the language isn’t changing

 oossie
February 6, 2015 at 1:18 am #37830

I found also that the “Continue Shopping” and “Checkout” – buttons in the cart won’t change language as they’re always getting their texts from the default english file…

 kempma
February 6, 2015 at 4:47 pm #37873

@oossie:

I found a probable workaround :)

The example is with german language (de-DE)

For the shopping cart go to: language/de-DE/checkout/cart.php
And add:

$_['button_checkout']    = 'Bezahlen';
$_['button_continue']    = 'Weiter einkaufen';

If the file does not exist you have to create it

I’ll catch up with you later for the Add to cart problem as I have it, too.

  • This reply was modified 3360 days ago by  kempma.
 kempma
February 6, 2015 at 7:52 pm #37884

the cart is working for me.
Already found the pavilion.php in de the language/en/ folder and copied it after that i changed the appropiate labels with the specific language text.

 oossie
February 6, 2015 at 11:51 pm #37887

did that work for you ? or do you still have the “add to cart” buttons in english?

 kempma
February 7, 2015 at 12:22 am #37888

Still the buttons have “add to cart” instead of the appropriate language text.

 oossie
February 7, 2015 at 12:33 am #37889

Hi OOSSIE,

I’ve found the problem… finally…

The developer had $product['text_button_cart'] instead of $tbData->['text_button_cart'] in the product/category.tpl file.

I suggest editing this via vqmod (I hope you have that installed, have you?)
Why? By editing this via vqmod you can be sure it works with the next update, too.

I’ve written a vqmod-file for my installation.

Just copy&paste, then edit the following lines in the attached file for EVERY desired languages and upload it into your vqmod/xml folder.

<!--DE German Language Fix for Category / Product page-->

<file name="catalog/language/de-DE/pavilion/theme.lang.php">
    <operation>
      <search position="after"><![CDATA[<?php]]></search>
    <add><![CDATA[$_['text_button_cart']  = 'In den Warenkorb';]]></add>
  </operation>
</file>

<file name="catalog/language/de-DE/product/product.php">
    <operation>
      <search position="after"><![CDATA[<?php]]></search>
    <add><![CDATA[$_['button_cart']  = 'In den Warenkorb legen';]]></add>
  </operation>
</file>

Hope this helps,
Mario

P.S.:
It just doesn’t show an attached file here… I don’t know why…
So please find it here: http://www.mediafire.com/view/6g8eacz88odk65d/pavilion_language.xml

  • This reply was modified 3358 days ago by  kempma.
  • This reply was modified 3358 days ago by  kempma.
  • This reply was modified 3358 days ago by  kempma.
  • This reply was modified 3358 days ago by  kempma. Reason: No link
 kempma
February 8, 2015 at 1:52 pm #37926

@kempma

The vqmod you have provided will break the “Product stock statuses” feature (the feature that change the “add to cart” button text depending on the product stock status).

@oossie

The text for the “Add to cart” buttons is taken from catalog/language/YOUR_LANGUAGE/your_language.php, or from catalog/language/YOUR_LANGUAGE/pavilion/theme.lang.php, if you have any custom product statuses enabled (the feature is available at Pavilion CP > Theme Settings > Store > Common).

February 9, 2015 at 12:08 pm #37946

Allright, now i have the following code in de dutch.php language file
and this file is located in “catalog/language/dutch/” folder.


$_['text_button_cart']      = 'Bestellen';
$_['text_read_more']        = 'Verder lezen';

 oossie
February 9, 2015 at 12:26 pm #37955

@oossie: I guess it would help, if you could tell whether this has solved your problem now or not?

Because i’ve tried that before and it did not work at all on my installation.
The only thing that works is my vqmod. even if it breaks custom order statuses.

 kempma
February 9, 2015 at 12:42 pm #37958

@kempma, i’m not into changing a language issue by Vqmod, in my opinion it’s the wrong way round.

Labels and texts i want to adjust by the language files, and not hardcoded in vqmod.

 oossie
February 9, 2015 at 12:50 pm #37964

@oossie: That was not the question!

Of course it should be in the language file!
But as this seems to be a bug in the theme code it’s a temporary way.
Of course YOU could recode the pavilion theme file so it reads the language codes correctly. But if the problem is not fixed with the next update you’ll have to redo every step again.

That’s why I apply temporary fixes or changes to the template files (which will be overwritten with the next update) only via vqmod.

The thing I wanted to know is: Does the dutch language work for you now after you did what the support guy told you or not???

 kempma
February 9, 2015 at 1:12 pm #37967
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
February 9, 2015 at 1:19 pm #37968

OMG THAT’S IT!!!!!

Never thought this could be the issue!
Thanks guys!

YOU’RE GENIUSES :) (solved my other thread, too)

 kempma
February 9, 2015 at 1:23 pm #37970

I already did those changes and still it doesn’t work for me

i changed the default.php in de appropriate language location.

 oossie
February 9, 2015 at 1:48 pm #37982
Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.