Need help in redirection after checkout

  • Posts: 4
  • Thank you received: 0
7 years 1 month ago #280130

-- Joomla version -- : 3.8
-- PHP version -- : 5.6

I have both free and paid products. I want the users to be redirected to a link after checkout.
I modified the end.php as given below. It works perfectly fine for free products. After checkout gets redirected to the page "my-cabin" (a link within my website)

(fyi editing after_end.php file has no effect in altering the functionality in anyway)

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.3.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2014 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->enqueueMessage( JText::_('Thank You For Purchasing The Task.') );

$app->redirect('/my-cabin');


But the problem is with the paid products. After checkout, instead of going to the payment gateway page, it gets redirected to "my-cabin" page.

Can i have help in knowing what exactly needs to be changed in the code so that for the paid products, it gets redirected to the payment gateway page.
(i use payu india and the plugin has the functionality for the return url after order confirmation.)

Last edit: 7 years 1 month ago by thesmahesh.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 1 month ago #280157

Hi,

You should remove your code customization.
Instead, configure a payment method like "collect on delivery" with a max price of 0.01 so that free products see that payment method and enter the URL you want in the "return URL" setting of the payment method.
Similarily for the other payment method for paid products, you can set a minimum price and the return URL.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum