- Posts: 81
- Thank you received: 2
Redirect to custom thank you page from Contact form
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 7.0
Hi
My client would like the contact form to redirect to a thank you page, instead of the current system message.
Can you tell me how I do that, please?
Also Is it possible to have the "OK" and "Cancel" buttons next to the captcha rather than at the top of the form? And presumably The OK button can have a different text, eg. "Send"?
Thanks for your help
Regards
David
Please Log in or Create an account to join the conversation.
1. You'll want to change the code:
2. For the other changes, you can edit the file "contact" of the view "product" via the menu Display>Views and apply the changes you want to the view. It's just some copy/paste of the code so it should be easy.
Please Log in or Create an account to join the conversation.
Thanks for your input.
I've changed the code, but am unsure where and how to place the link to the article.
Sadly, I am not a programmer
Regards
David
Please Log in or Create an account to join the conversation.
You want to change the code hikashop_currentURL() to:
Please Log in or Create an account to join the conversation.
I've altered the code as below :
But sadly, it still doesn't lead to the thank you page, just shows the system message
What have I done wrong?
Please Log in or Create an account to join the conversation.
That sounds good though.
Can you make sure that you're editing the view file for your frontend template and not another one ?
Please Log in or Create an account to join the conversation.
file "show_default" via the menu Display>Views
I've made a screenshot of it.
I'm sure I've got the right file.
Regards
David
Please Log in or Create an account to join the conversation.
I do see that the change is done on your website.
However, while the return_url parameter is added to the URL of the contact button, it's missing in the contact form on your website:
monosnap.com/file/69n73ZiRshaTma60ixjnONnph8jNbF
As if the line
Could you check on that ?
Please Log in or Create an account to join the conversation.
I have modified that file "contact", but only to move the buttons from the top to the bottom and to rename them.
The line you quote is still the same.
I'm enclosing a copy of the modified contact form view as a text file for you to check.
Regards
David
Please Log in or Create an account to join the conversation.
I know. In the code I gave you, return_url should be changed by redirect_url
Please Log in or Create an account to join the conversation.
Thanks Nicolas.
Anyway to turn off the system message, which is now supurflous to requirements?
Best regards
David
Please Log in or Create an account to join the conversation.
One solution would be to edit the translation and leave a empty string instead.
www.hikashop.com/download/languages.html#modify
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Thanks for all your help, Nicolas.
Best regards
David
Please Log in or Create an account to join the conversation.
- Posts: 115
- Thank you received: 0
I am having the same issue as David had; the redirect page after submitting a message on the contact form is not working. I've put the code as mentioned above in the show_default view file. In my case:
<a href="<?php echo hikashop_completeLink('product&task=contact&cid=' . (int)$this->element->product_id . $this->url_itemid).'?redirect_url='.urlencode(' www.tweedehandjes.com/bedankt-voor-je-bericht.html '); ?>" class="">
Could you see what's wrong?
Also; after the customer submits a comment, I'd like to get an email notification in my admin email. How can I set this?
Thanks in advance,
regards,
Joyce
www.tweedehandjes.com/klantenservice.html
Please Log in or Create an account to join the conversation.
1. This only works when you use the contact button from the product details page to access the contact form.
If you access the contact form directly, you don't have the redirect_url parameter in the URL.
So in that case, you would have to create a menu item of the type external URL and enter the full URL to access the contact form with the url_encoded URL in the redirect_url parameter of the external URL.
2. Enter your email address in the setting "Send email for new comments" in the HikaShop configuration.
Please Log in or Create an account to join the conversation.
- Posts: 115
- Thank you received: 0
I am so sorry but I do not understand... I have created the external url of the page where the customer should be redirected to after submitting the contact form:
www.tweedehandjes.com/bedankt-voor-je-bericht
Could you please help me> What shoud be the correct code and where do i need the put the code?
Thanks in advance
Regards,
Joyce
Please Log in or Create an account to join the conversation.
No, that's not it.
There is no code to put anywhere.
You just need to put the contact form URL as external URL.
For example:
Please Log in or Create an account to join the conversation.
- Posts: 115
- Thank you received: 0
Regards,
Joyce
Please Log in or Create an account to join the conversation.