RTL CSS for payment notification to users *URGENT*

  • Posts: 100
  • Thank you received: 1
10 years 11 months ago #134472

Hi,

I'm facing a problem which I think is related to some CSS missing or not written correctly. I'm using HIKASHOP in 2 languages (FARSI : RTL and ENGLISH : LTR) this has caused me many problems which I've solved with the help of Nicolas (from the Hikari team). This is the latest thing I've faced. I checked the payment receipt sent to me in English and it's perfectly working.. But in farsi, as you can see in my screenshot, it's corrupted and not showing the way it should. what css code am I missing? can you help me out please? It is very important for me since I'm launching the website tomorrow. and I don't have a clue where to find this code. Thanks in advance.

Some of the problems I need fixed :
1. The texts are not RTL and instead they're LTR. What can I do to make them look good both in English and in Farsi. (I don't want fixing the Farsi to break the English version!)
2. The table in the middle is also set to LTR instead of RTL. What can I do about that?

Thanks for your help! Again since this is very urgent for me, please reply as fast as you can.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
10 years 11 months ago #134473

Hi,

Change the line:
'</head><body>'.hikashop_absoluteURL($mail->body).'</body></html>';

to:
'</head><body'.$htmlExtra.'>'.hikashop_absoluteURL($mail->body).'</body></html>';

in the file administrator/components/com_hikashop/classes/mail.php and try again.

The following user(s) said Thank You: PubSite

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 11 months ago #134482

Thanks for your fast and wonderful help Nicolas,

It fixed a lot of issues however there are some still left..

1. the table has some MINOR problems regarding the alignment of the names and the values related to them...
2. Can I have a farsi version of my BANK TRANSFER DETAILS for my Farsi customers? in the 2nd image you can see that since it's now aligned RTL it's not looking correct since it's in English. and I need to have the BANK NAME etc., in Farsi. any suggestions?

THANKS

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
10 years 11 months ago #134490

1. You need to edit the email via the menu System>Emails and change all the instances of:
float:left
to:

<?php $lang = JFactory::getLanguage(); if($lang->isRTL()){echo 'float:right';}else{echo 'float:left';} ?>
and all the instances of :
text-align:left
to:
<?php $lang = JFactory::getLanguage(); if($lang->isRTL()){echo 'text-align:right';}else{echo 'text-align:left';} ?>

2. in your bank transfer information field, enter a translation key and then add that translation key as a translation override in your language files:
www.hikashop.com/download/languages.html#modify
That way you will have a different text for each language.

The following user(s) said Thank You: PubSite

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 11 months ago #134509

thanks for your awesome help.. I just don't know where to put the TRANSLATION key for the EMAILS sent and the BANK TRANSFER in general..

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
10 years 11 months ago #134538

As I said, the translation key should be put in the "information" field of your bank transfer payment method and then you should add a line to the translation override file of your language (as explained in the documentation link I gave) for the translation key.

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 11 months ago #136913

Dear Nicolas, I haven't been able to do this ever since you sent me the link and told me to do as said on that link. How can I CREATE a new translation key? because the bank transfer does not have Keys by itself. Please help me out. This is very important for me.

Thanks :)

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
10 years 11 months ago #136935

Just add it in a new line of the override area of your translation via the Languages tab of the configuration, as explained in the documentation I gave you.
For example:
MY_TRANSLATION_KEY="My text"

The following user(s) said Thank You: PubSite

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 11 months ago #136936

I understood that, I don't know how I should include the key in my payment methods... that's the part I have problem with. Should I just write for example :

ACCOUNT_NAME = "my text"
and then in the payment methods : ACCOUNT_NAME ?

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 11 months ago #137239

I'm changing the instances as you suggested. I have two main questions..1. is it OK to use PHP in html or CSS? am I doing this right? I just wanna double check. and 2. when I wanna change order creation notification I get this error : www.dropbox.com/s/r1gzq496zfvdtal/Screen...12-19%2021.16.07.png I set the permission to index.php to 777 but nothing changed.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
10 years 11 months ago #137299

This is because of something on your website which blocked the request to the server.
You should check your server logs to see what configuration is the problem (mod_security ? su_exec ? etc).

The following user(s) said Thank You: PubSite

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 11 months ago #137300

OK I will do so. are these things in a special file on the server? or should I find out with the debugger? P.S. this only happens with one of the files and that's ORDER CREATION NOTIFICATION..

P.S. : is this correct?
I changed:

<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_NAME}</td>

TO:
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;<?php $lang = JFactory::getLanguage(); if($lang->isRTL()){echo 'text-align:right';}else{echo 'text-align:left';} ?>;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_NAME}</td>

since this is php and it may stop the site from running it's very important for me to make sure I have written it correctly. Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #137326

Hi,

You can ask that to your provider.

Your code seems to be correct. :)

The following user(s) said Thank You: PubSite

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 10 months ago #138176

Dear Nicolas.. about part 1.. I still haven't been able to fix the problem as you've suggested. I tried changing the instances as you said and the site didn't come up.. Then I thought, is it even possible to use these PHP tags in CSS?! I'm a little confused and my emails are still looking wrong. to be precise only the NAME of the product is sticking to the price tag next to it. How should I implement this? I have disabled the order creation emails and emails are sent only after payment (order status notification). I thought that might help you if you know.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
10 years 10 months ago #138257

What code do you have now in the email ? If the site "doesn't come up" it means that there is an error with the changes that you made.

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 10 months ago #138273

I undid all the changes I made to that.. because when I added the css like this

from:
<td class="w560 pict" style="text-align:left; color:#575757" width="560">
to:
<td class="w560 pict" style="text-align:<?php $lang = JFactory::getLanguage(); if($lang->isRTL()){echo 'text-align:right';}else{echo 'text-align:left';} ?>; color:#575757" width="560">

Again I'm not so experienced with coding, so please help me out with writing this.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
10 years 10 months ago #138279

This one is ok. It should not be a problem.

The following user(s) said Thank You: PubSite

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 10 months ago #138343

Joomla isn't letting me edit the email files directly from the administration. Where can I find the file through FileZilla?

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #138375

Hi,
You'll find your email files through "YourWebsite\media\com_hikashop\mail" but note that if you directly edit your email like this, you'll lose your changes after each update.

The following user(s) said Thank You: PubSite

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 10 months ago #138401

it's ok I won't update the Hikashop Component because I've made a lot of language changes too

Please Log in or Create an account to join the conversation.

Time to create page: 0.128 seconds
Powered by Kunena Forum