AbanteCart Community
AbanteCart Development => Customization help => Topic started by: Bill Griffin 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.
-
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 (https://www.abantecart.com/shopping-cart-news/developer-tool-v12) 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:
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
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)