Skip to main content

Need help in redirection after checkout

9 years 1 month ago - 9 years 1 month ago #280130 by thesmahesh
-- 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)
Code:
<?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: 9 years 1 month ago by thesmahesh.

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

9 years 1 month ago #280157 by nicolas
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.071 seconds
Powered by Kunena Forum