Skip to main content

Free downloads "thank you" page

More
12 years 10 months ago #131397 by sputnik
Using HS 2.2.2, I have set up a custom "thank you" page upon a user's return to my website from PayPal. I also have free downloads available (I have hidden the file list so the user must use the cart and register just like purchasing a "paid for" product). When a user checks out with only free products in their cart PayPal is bypassed entirely and the user is forwarded to the default "Thank you for your purchase." message. What is the best way to change this so the user is forwarded to my customised thank you page?

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #131435 by Mohamed Thelji
Hi,
The best way would be to directly put your customization through the "after_end" file of your "checkout" view of your front-end template.

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #131454 by sputnik
Thanks Mohamed,

I've now tried this and I don't seem to be able to get it to work at all. No matter what I change on that view I still see the same standard "Thank you for your purchase." message. I have modified other views without a problem but I can't seem to get this functioning. Are you sure that's the right file to modify?
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.2.2 * @author hikashop.com * @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php echo "My personalised thank you message in here... this is much shorter that the one I've created which has lists and paragraphs and stuff."; $app = JFactory::getApplication(); // $app->enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') );

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #131457 by sputnik
OK, I fixed this by changing the language file instead... but it would be interesting to know why editing the "after_end" file wasn't working :)

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago - 12 years 10 months ago #131501 by Mohamed Thelji
Ok, thanks for your feedback. ;)
Last edit: 12 years 10 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #131752 by Sjaak
HI

I have the exact same problem but I don't understand the explanation above.
I simply want to direct clients that 'purchased' free products to the same page where the Paypal plugin directs my clients to.
It is an article with an explanation on how to download their products.

As it is now new clients use the free products to test my shop. Not getting an explanation on how to download their products, turns them away from buying paid products.

Sjaak

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #131795 by nicolas
Hi,

You can edit the file "end" of the view "checkout" via the menu Display>Views and change the line:
Code:
echo JText::_('THANK_YOU_FOR_PURCHASE');
to:
Code:
$app = JFactory::getApplication(); $app->redirect('http://mywebsite.com/mypage');

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #131824 by Sjaak
Thanks for the fast response (as always ;o) )

But this did not work. I off course changed the URL to the article with explanation. Still I only get 'Thank you for purchase"
Strange detail: the return page shows the title of the article correct in the breadcrumb trail.

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #131826 by nicolas
Then maybe it goes in the after_end vies file. Try the same modification there.

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #131832 by Sjaak
Same result

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #132015 by Xavier
Hi,

I tried on my end and the view to edit is "checkout / end" in the frontend template.
Thanks to be sure that you are editing in the correct template.

To make a redirect, you can also try the php function "header()".
us2.php.net/manual/en/function.header.php
The following user(s) said Thank You: Sjaak

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #132024 by Sjaak
AHAA, Thanks Xavier.

That did it.
I wasn't aware that I needed to choose the frontend template in order to get it working.

Thanks

Sjaak

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago - 10 years 7 months ago #231169 by liontv
I'm trying the same as the user to complete the purchase redirect you to a page. I used the code @Javier
Code:
$ App = JFactory :: getApplication (); $ App-> redirect ( 'http://test.net/test/test);

but this does not work. As is actually written?, my knowledge of php are rather scarce.

This is how it looks now
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.6.0 * @author hikashop.com * @copyright (C) 2010-2015 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php $app = JFactory::getApplication(); $ App-> redirect ( 'http://test.net/test/fin-de-compra');

help me plis.
Last edit: 10 years 7 months ago by liontv.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #231170 by Mohamed Thelji
Hello,
you should replace these lines :
Code:
$app = JFactory::getApplication(); $ App-> redirect ( 'http://test.net/test/fin-de-compra');
By :
Code:
$app = JFactory::getApplication(); $app->redirect('http://test.net/test/fin-de-compra');

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #231231 by liontv
No work
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.6.0 * @author hikashop.com * @copyright (C) 2010-2015 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php $app = JFactory::getApplication(); $app->redirect('http://test.net/test/fin-de-compra'); ?>

:( I have to write something else besides?

Thanks for your time @Mohamed Thelji

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #231242 by Xavier
Hi,

Which view do you have edited ? "checkout / end" and/or "checkout / after_end" ?
Based on the payment method used you are maybe not redirected to one of these views.

So you will maybe have to edit the file xxx_end.php of your payment method, where "xxx" is the payment method name.

Please Log in or Create an account to join the conversation.

Time to create page: 0.280 seconds
Powered by Kunena Forum