Author Topic: Template from right to left  (Read 8704 times)

Offline sleem

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Template from right to left
« on: March 10, 2017, 07:52:42 AM »
hello all
How to make a template from left to right and vice versa
Now in CSS files, supports the direction from left to right and also from right to left
style.css and style-rtl.css
What is PHP Code
Which allows changing between CSS files in the head.tpl

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Template from right to left
« Reply #1 on: March 10, 2017, 10:08:17 AM »
RTL Can we activated based on language setting
Code: [Select]
$this->language->get('direction')
This is available in  common/page.php for example.
/public_html/storefront/controller/common/page.php
public_html/admin/view/default/template/common/page.tpl

You can add this to head.php and head.tpl and load different CSS if needed.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline sleem

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Template from right to left
« Reply #2 on: March 10, 2017, 11:57:05 AM »
Will explain to you
The language arabic = style-rtl.css
The language English= style.css
When activating the Arabic Language you want to print the file style-rtl.css
and When activating the English Language you want to print the file style.css
Because thestyle-rtl.css completely different from the style.css file in your design
this is what I want

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Template from right to left
« Reply #3 on: March 11, 2017, 09:07:50 PM »
Exactly right. You can include different css file in head.tpl. Do you need help with exact coding instructions? 
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline sleem

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Template from right to left
« Reply #4 on: March 12, 2017, 07:56:14 AM »
Yes, I want to know the code
I am learning the language of php I am not a professional
Please type the correct code

$faster_browser_rendering = false;

if($faster_browser_rendering == true) {
?>
   <style><?php echo $this->LoadMinifyCSS('/stylesheet/bootstrap.min.css'); ?></style>
   <style><?php echo $this->LoadMinifyCSS('/stylesheet/bootstrap-rtl.css'); ?></style>
   <style><?php echo $this->LoadMinifyCSS('/stylesheet/flexslider.css'); ?></style>
   <style><?php echo $this->LoadMinifyCSS('/stylesheet/onebyone.css'); ?></style>
   <style><?php echo $this->LoadMinifyCSS('/stylesheet/font-awesome.min.css'); ?></style>
   <style><?php echo $this->LoadMinifyCSS('/stylesheet/fonts.google.css'); ?></style>
   <style><?php echo $this->LoadMinifyCSS('/stylesheet/style.css'); ?></style>   
<?php } else { ?>
   <link href="<?php echo $this->templateResource('/stylesheet/bootstrap.min.css'); ?>" rel="stylesheet" type='text/css' />
   <link href="<?php echo $this->templateResource('/stylesheet/bootstrap-rtl.css'); ?>" rel="stylesheet" type='text/css' />
   <link href="<?php echo $this->templateResource('/stylesheet/flexslider.css'); ?>" rel="stylesheet" type='text/css' />
   <link href="<?php echo $this->templateResource('/stylesheet/onebyone.css'); ?>" rel="stylesheet" type='text/css' />
   <link href="<?php echo $this->templateResource('/stylesheet/font-awesome.min.css'); ?>" rel="stylesheet" type='text/css' />
   <link href="<?php echo $this->templateResource('/stylesheet/fonts.google.css'); ?>" rel="stylesheet" type='text/css' />
   <link href="<?php echo $this->templateResource('/stylesheet/style.css'); ?>" rel="stylesheet" type='text/css' />
<?php } ?>




Thank you
« Last Edit: March 12, 2017, 09:06:51 AM by sleem »

CTGO.co

  • Guest
Re: Template from right to left
« Reply #5 on: August 03, 2019, 01:36:14 PM »
This post can help me to modify my website and to push (Arabic Language) appearing correctly on screens. Tell me please what is the last update which will be done on last Abantecart version (1.2.15) ???

Thank you

Offline jualo15

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
    • tecnicolaboral
Re: Template from right to left
« Reply #6 on: April 20, 2020, 03:35:25 AM »
excellent

Offline HADY

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +27/-5
    • View Profile
Re: Template from right to left
« Reply #7 on: April 20, 2020, 04:07:05 AM »
Hi!

I would like to know if possible to add the code in the next update please.


Thanks Abantecart's Team
Thank you In Advanced
Regards
HADY

 

Powered by SMFPacks Social Login Mod