• Register
Plug-in Tutorial Build an EC-CUBE plug-in

Top Commentators

114

1

EC Mike

SHOGUNSHOGUN

32

2

hrbabu

SAMURAISAMURAI

29

3

Sumant Jha

SAMURAISAMURAI

29

4

justcubed

SAMURAISAMURAI

21

5

Ashok Kafle

SAMURAISAMURAI

21

6

shahith

SAMURAISAMURAI

14

7

Jeemusu

KABUKIKABUKI

14

8

Yangsin

KABUKIKABUKI

9

9

Zaw Hlaing Bwar

GEISYAGEISYA

8

10

Fei Liu

GEISYAGEISYA

Ranking Key

  • FUJISANFUJISAN1,000+ posts
  • SAKURASAKURA500+ posts
  • SHOGUNSHOGUN100+ posts
  • NINJYANINJYA50+ posts
  • SAMURAISAMURAI20+ posts
  • KABUKIKABUKI10+ posts
  • GEISYAGEISYALess than 10 posts

Mobile issue

0 votes
how to show eccube as default for mobile pattern design
asked 2014-02-19 by Sumant Jha (1,230 points) SAMURAISAMURAI

2 Answers

0 votes
Eccube detect device type automatically, so if you open site from Mobile Device then it will open in default mobile template. The default mobile template is inside "data\Smarty\templates\mobile".
answered 2014-02-20 by Ashok Kafle (1,360 points) SAMURAISAMURAI
so can't we set mobile for default and disable another device to open?
Yes you can, follow this steps:
1. Go to data\class\ folder and open SC_Display.php
2. Find setDevice function.
3. Inside this function you can see how DEVICE_TYPE_MOBILE load its default view.
4. As your requirement you can copy the code inside case DEVICE_TYPE_MOBILE and paste it on other case.
0 votes
If you want to see the default ec-cube design for mobile or smart phones, please follow the following instructions:

1. Go to "ec-cube > data > class" and open SC_Display.php file

2. From line no. 144, find the function public static function detectDevice()

3. hide 148 to 154 lines as like:

/*

if ($nu->isMobile()) {
                SC_Display_Ex::$device = DEVICE_TYPE_MOBILE;
            } elseif ($su->isSmartphone()) {
                SC_Display_Ex::$device = DEVICE_TYPE_SMARTPHONE;
            } else {
                SC_Display_Ex::$device = DEVICE_TYPE_PC;
            }

*/

4. Write the following code after this:

SC_Display_Ex::$device = DEVICE_TYPE_PC;

5. All devices show the default ec-cube pattern now. Thanks...
answered 2014-06-03 by hrbabu (1,680 points) SAMURAISAMURAI
...