• 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

Proper mode switch

+1 vote

Sorry for the barrage of questions on here, haha. This forum is a great resource for developers with poor Japanese skills like myself.

Your instructions were clear for the checkout process switch(), but I'm having a bit of trouble implementing them. What is the cleanest way to call the new template in the switch method? I'm currently doing something like this:

switch( $this->mode ){

case 'MyCase':

$this->tpl_mainpage = 'my/template.tpl';
break;
... }
 
And then I set a hidden input to complete on that .tpl (also tried cart), but I seem to be getting an error when the user submits the second form (I want them to get sent to the cart).  Not sure if my switch case is incorrect or if I'm doing something else wrong here... 
 
Thanks!
 
related to an answer for: Adding pages to checkout process
asked 2013-08-07 by justcubed (1,120 points) SAMURAISAMURAI

1 Answer

0 votes
Justcubed,

Is the error after MyCase or before it? If it is before Mycase, the page template before 'Mycase' might be missing the mode value of 'MyCase.'

Go the the ec-cube admin panel and check the error log. You can navigate to it from: System>EC-CUBE log display  and then click 'error log file.'

Please post the error here, so I can get a better idea of the problem.

Thank you,

Mike
answered 2013-08-07 by EC Mike (6,360 points) SHOGUNSHOGUN
Sorry, should have been more clear. It's not actually a PHP error, I'm just being passed to the same page and seeing this: 不正なページ移動です。So, it doesn't seem to be an issue with my code itself.

Let me know if that gives you a hint to what might be happening, meanwhile I'll see if I can get the error log for you. Thanks so much.
Ok. Your moving to a unauthorized page.  Usually this means two things:

A. The page you are transitioning to is incorrect (or it is not the page you think it is.)

B. The required parameters for that page do no exist or are not being passed to the
page. View the lfInitParam function and check what parameters are required.

I think you should first remove the error checking in the action function, just to confirm your if the page loads. var_dump the objects and see if the values exist or not too.

Mike
...