[Skip to main content](#vessel-content)

#   Need help in redirection after checkout

##

- **[thesmahesh](/forum/user/36241-thesmahesh "View thesmahesh's Profile")**
- [![thesmahesh's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36241-thesmahesh "View thesmahesh's Profile") Topic Author
- [ Offline](/forum/user/36241-thesmahesh)

Less More

- Posts: 4
- Thank you received: 0
-
-

9 years 1 month ago -  9 years 1 month ago [\#280130](#280130) by [thesmahesh](/forum/user/36241-thesmahesh "View thesmahesh's Profile")  *[Need help in redirection after checkout](/forum/27-checkout/892296-need-help-in-redirection-after-checkout#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 &quot;my-cabin&quot; (a link within my website)  (fyi editing after&#95;end.php file has no effect in altering the functionality in anyway)  But the problem is with the paid products. After checkout, instead of going to the payment gateway page, it gets redirected to &quot;my-cabin&quot; 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.)")* was created by *[thesmahesh](/forum/user/36241-thesmahesh "View thesmahesh's Profile")*

-- 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:

&lt;?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'); ?&gt;&lt;?php $app = JFactory::getApplication(); $app-&gt;enqueueMessage( JText::_('Thank You For Purchasing The Task.') ); $app-&gt;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](/forum/user/36241-thesmahesh "View thesmahesh's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5MjI5Ni1uZWVkLWhlbHAtaW4tcmVkaXJlY3Rpb24tYWZ0ZXItY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

9 years 1 month ago [\#280157](#280157) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Need help in redirection after checkout](/forum/27-checkout/892296-need-help-in-redirection-after-checkout#280157 "-- 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 &quot;my-cabin&quot; (a link within my website)  (fyi editing after&#95;end.php file has no effect in altering the functionality in anyway)  But the problem is with the paid products. After checkout, instead of going to the payment gateway page, it gets redirected to &quot;my-cabin&quot; 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.)")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5MjI5Ni1uZWVkLWhlbHAtaW4tcmVkaXJlY3Rpb24tYWZ0ZXItY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.048 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
