Free downloads "thank you" page

  • Posts: 28
  • Thank you received: 1
11 years 3 weeks ago #131397

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.

  • Posts: 12953
  • Thank you received: 1778
11 years 2 weeks ago #131435

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.

  • Posts: 28
  • Thank you received: 1
11 years 2 weeks ago #131454

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?

<?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.

  • Posts: 28
  • Thank you received: 1
11 years 2 weeks ago #131457

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.

  • Posts: 12953
  • Thank you received: 1778
11 years 2 weeks ago #131501

Ok, thanks for your feedback. ;)

Last edit: 11 years 2 weeks ago by Mohamed Thelji.

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

  • Posts: 261
  • Thank you received: 5
11 years 2 weeks ago #131752

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.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 2 weeks ago #131795

Hi,

You can edit the file "end" of the view "checkout" via the menu Display>Views and change the line:

echo JText::_('THANK_YOU_FOR_PURCHASE');
to:
$app = JFactory::getApplication();
$app->redirect('http://mywebsite.com/mypage');

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

  • Posts: 261
  • Thank you received: 5
11 years 2 weeks ago #131824

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.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 2 weeks ago #131826

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.

  • Posts: 261
  • Thank you received: 5
11 years 2 weeks ago #131832

Same result

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 weeks ago #132015

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.

  • Posts: 261
  • Thank you received: 5
11 years 2 weeks ago #132024

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.

  • Posts: 25
  • Thank you received: 1
8 years 9 months ago #231169

I'm trying the same as the user to complete the purchase redirect you to a page. I used the code @Javier

$ 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
<?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: 8 years 9 months ago by liontv.

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

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #231170

Hello,
you should replace these lines :

$app = JFactory::getApplication();
$ App-> redirect ( 'http://test.net/test/fin-de-compra');
By :
$app = JFactory::getApplication();
$app->redirect('http://test.net/test/fin-de-compra');

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

  • Posts: 25
  • Thank you received: 1
8 years 9 months ago #231231

No work

<?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.

  • Posts: 13201
  • Thank you received: 2322
8 years 9 months ago #231242

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.111 seconds
Powered by Kunena Forum