News:

AbanteCart v1.4.2 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

add a link from product to custom form

Started by behold, August 24, 2017, 08:15:54 AM

Previous topic - Next topic

behold

Hello,
I have a product that is a special order item - set to "call to order" which directs the customer to our contact page. I'd like to change the "call to order" link to direct customer to a new custom form.

found this old thread: http://forum.abantecart.com/index.php/topic,4412.msg19286.html#msg19286
but wasn't resolved

Is there a way to do this?

Also, how would I add/load a custom response page/message once the form is submitted?
I've tried adding a new "Content" page. Added the link "thank-you" (with and without /) for the Forms Manager > "Success Page" and upon submitting the form get "The page you requested cannot be found."

even tried putting the full url path for "Success Page" https://...../thank-you

And because the thank you page is a "Content" page - i now have a link in my footer to this page. not desirable. Is there a way to create a new page that is doesn't show up as a link in the footer?

Clearly I'm missing something here - maybe many things :(

Thanks

abolabo

to change url for call_to_order you have 2 ways:
1 - do it with hook of your custom extension
public function onControllerCommonHead_UpdateData(){
    $this->baseObject->view->assign('call_to_order_url', $this->baseObject->html->getURL('route_to_your_custom/***'));
}

2. Just change this url inside file public_html/storefront/controller/common/head.php

First way better. You will not have troubles after upgrades.

regarding thank-you text.
You should to redirect on your custom page after form submitting and processing.
You can open file public_html/admin/controller/pages/catalog/category.php as example and check method insert. (look below line  if ($this->request->is_POST() && $this->_validateForm()) {)
After data processing you will find redirect there ans success test set ($this->session->data['success'] = $this->language->get('text_success'))
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Forum Rules Code of conduct
AbanteCart.com 2010 -