• 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

Adding pages to checkout process

+1 vote
I understand that each page consists of a class file for functionality and a tpl file for layout, but how can I edit the order of the checkout process.

For example, right now the user goes: product detail page -> cart -> payment -> confirm, how would I change this to: detail page -> new custom page -> payment, etc

I'm assuming I create the class file, the tpl file and the PHP file which calls those, but then where do I change the process itself? I've noticed the action attribute on the detail page just has the value '?'

Perhaps someone could give me a better explanation of how this works? Any help is much appreciated! Thanks!
asked 2013-08-05 by justcubed (1,120 points) SAMURAISAMURAI

1 Answer

0 votes
 
Best answer
Justcubed,

The action function consists of the flow of the checkout process. The switch statement inside the function is based on MODE which you set in the front end smarty file as a hidden field.

So for example, let’s say you want to create a new page called express checkout. You could create a hidden field where mode is the value of "express" (or any word) and then inside the actions switch area create the case 'express'.

Here you can: A. load a new smarty template and use the same class, or B. Redirect to another page (new class and smarty tpl file)

To return to the normal flow (for example the original completion page) set the new pages (tpl files) mode to 'complete.'

 

Let me know if you still have any other questions!

Thank you,

Mike
answered 2013-08-06 by EC Mike (6,360 points) SHOGUNSHOGUN
selected 2013-08-07 by justcubed
Proper mode switch
...