- Posts: 68
- Thank you received: 0
Redirect after end
-- HikaShop version -- : 1.5.8
-- Joomla version -- : 2.5.4
Hi,
been trying to redirect users after purchase, and done some reading and suggestions I found on this forum and google results with no luck.
It just does not redirect.
What I'm trying to achieve is to redirect the users to a page so they can leave a testimonial after the purchase end.
Been trying to edit after_end.php with no luck.
My thought is to either redirect to the page /visitor-comments (or using menu item id) and display there the thank you message.
or
Keep it as is, display the thank you message as normal, and then 2 second later redirect them to the other page.
Any thoughts? Your help is appreciated
Please Log in or Create an account to join the conversation.
header( "refresh:2;url=visitor-comments" );
with no luck. I thought of it after trying all the options $app->redirect I found on some forum posts
Please Log in or Create an account to join the conversation.
What is the URL of the page you go actually at the end ?
And what payment method are you using ?
Why not enter the URL you want in the "return URL" setting of your payment method ? Most of them should have it.
Please Log in or Create an account to join the conversation.
HikaShop collect on delivery payment plugin
HikaShop bank transfer payment plugin
Hikashop Modirum Payment Plugin
and
the url at the end is: mybabylonia.gr/en/component/hikashop/checkout/step/step-3
(when I use the collect on delivery payment option)
Can I have it so that it actually loads the current page, but a couple of seconds later it redirects? Or the best would be to go the the desired page, mybabylonia.gr/en/visitor-comments and display the results of the purchase there.
Please Log in or Create an account to join the conversation.
As I said, there is a "return URL" setting in the payment methods so that you can tell the system where you want to be redirected.
For example, for the collect on delivery payment method: take.ms/1paPJJ
Please Log in or Create an account to join the conversation.
the version I'm looking at is 1.5.8
that's why I'm trying to do it using code.
Please Log in or Create an account to join the conversation.
Ah yes, I had overlooked that point.
In that case, you want to edit the file "end" of the view "checkout" via the menu Display>Views and add a redirection based on the payment method selected:
www.hikashop.com/forum/4-how-to/37747-ac...eckout-end-view.html
www.minitek.gr/blog/how-to-redirect-using-the-joomla-api
Please Log in or Create an account to join the conversation.
at the moment my end view looks like this:
so to get it redirect for all methods (my assumption is that all payment methods end up here), I do the following?
Will this redirect and then show the thank you message? Or should I just redirect after the message is shown? There might need to be a delay of a couple of seconds so that people get to see the thank you message before they are redirected.
thanks
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The payment methods already provide their HTML to the view.
So you are in the "else" case, not the if. So it's normal that the code of your previous message doesn't do anything.
You can always do the redirect in javascript code and add a delay to the javascript code:
stackoverflow.com/questions/9877263/time-delayed-redirect
Please note that:
1. Your account doesn't have any subscription
2. Your using a really old version of HikaShop and want you want to do is already possible with recent versions of HikaShop without any custom coding
3. Custom coding is outside user support
I've given you the necessary hints to do it on your own if you're a developer. If you can't do it on your own, you can always have one of our partners do it for you ( www.hikashop.com/home/our-partners.html ) or update to the latest version.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You've been helpful and I managed to redirect with your help. Tried it on some payment method and it worked. It should work the same in all the rest payment methods
Please Log in or Create an account to join the conversation.
In HikaShop too, at the end of the order process, there is the thank you message, even without any payment involved.
So I don't know why you would get an error.
Could you provide a link to the shop so that we could have a look ?
Also, please open a new thread for new questions.
Please Log in or Create an account to join the conversation.
What I did wrong?
Please Log in or Create an account to join the conversation.
Turn on the "Display view files" setting of the HikaShop configuration and try again.
That way, on the thank you page of HikaShop, you'll see which view file you need to it. It's possible that it's checkout / end.php instead of checkout / after_end.php that you need to edit.
Besides that, not editing the file for the correct template could be a reason but apparently it's not the case.
I don't see any other reason why the change wouldn't work.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.