Author Topic: Replace checkout/success page  (Read 88 times)

Offline Bill Griffin

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Replace checkout/success page
« on: July 27, 2020, 03:17:23 PM »
I'm using the default program. After payment the customer is returned to the checkout/success page.

I need to return the customer to a form for them to fill out on another web site. I've tried putting a link in the text on the page and can't get it to work.

There is a continue button on the page that returns them to the home page they might click instead of a link.
Is there a way to get the continue button to take them to my form? I'm open for ideas.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1827
  • Karma: +269/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Replace checkout/success page
« Reply #1 on: July 28, 2020, 03:10:37 PM »
hello.
To implement this feature you should to create hook on checkout/success controller and make some changes of your template.

1. install our developer tools extension and do the clone of default template.
2. Install this template and set it as default template of your store.
3. Open file with hooks (usually it's a extensions/your_template_name/core/your_template_name_hooks.php file ) and paste hook-method for success page.
for example:
Code: [Select]
    public function onControllerPagesCheckoutSuccess()
    {
        $that = $this->baseObject;
        //if not final checkout page - skip
        if((int)$that->session->data['order_id']){
            return;
        }
       
        $that->view->assign('some_your_custom_variable', 'BLAH_BLAH_BLAH-TEXT');
    }
4. Open file view/{your_template_name}/template/common/success.tpl and paste
Code: [Select]
echo $some_your_custom_variable;
OR

You can paste some static html directly into your own view/{your_template_name}/template/common/success.tpl file (without hooks data)

“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod