cdivas Posted June 18, 2016 Share Posted June 18, 2016 Hello guys! I hope you are doing great. I am trying to add a custom link in the complete.tpl template but I need your help. The idea is that after a user buys a service, he can then visit their new site easily without having to wait to get his email. For this I need to add a link for the "$service_domain" variable that I can use in the email templates. I have no idea how I could add this link in the complete.tpl since I am not a coder. Please help me resolve this Thank you! - CD 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted June 18, 2016 Share Posted June 18, 2016 You'll want to contact a developer and have them help you with this. This is quite above and beyond what 'community support' is. You can use the Custom PHP Logic documentation to get you started, but you'll likely want to contact a 3rd party dev. Shouldn't be too hard to whip this up, but it's quite a bit above and beyond 'forum support'. 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted June 18, 2016 Share Posted June 18, 2016 Hello, The only issue I see with this is generally there is a propagation period when registering a new domain or the customer will need to update their nameservers so 9 times out of 10 they won't be able to see their website instantly upon ordering. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted June 18, 2016 Share Posted June 18, 2016 Hello guys! I hope you are doing great. I am trying to add a custom link in the complete.tpl template but I need your help. The idea is that after a user buys a service, he can then visit their new site easily without having to wait to get his email. For this I need to add a link for the "$service_domain" variable that I can use in the email templates. I have no idea how I could add this link in the complete.tpl since I am not a coder. Please help me resolve this Thank you! - CD you may need to explain how you need this to work, but I will provide simple example of how this should go, Create new PHP file inside /includes/hooks/ directory, and place the following code inside it <?php use Illuminate\Database\Capsule\Manager as Capsule; add_hook("ShoppingCartCheckoutCompletePage", 1, function($params){ if ($params['ispaid']==true){ $getService = Capsule::table("tblhosting")->where("orderid", $params['orderid'])->where("domain", "!=", "")->take(1); if ($getService->count()>0){ $service = $getService->get(); return '<a href="'.$service[0]->domain.'" class="btn btn-info">Visit Your Website</a>'; } } }); this ActionHook function will run when client completes their order if order is paid, and at least one of the hosting services linked to this order has domain name new link will be displayed in /cart.php?a=complete page 0 Quote Link to comment Share on other sites More sharing options...
HostGenius Posted June 23, 2016 Share Posted June 23, 2016 Thank you for the Hook 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 23, 2016 Share Posted June 23, 2016 You'll want to contact a developer and have them help you with this. This is quite above and beyond what 'community support' is. i'm tempted to suggest that it's up to the community to decide what is beyond 'Community Support'! 0 Quote Link to comment Share on other sites More sharing options...
Hoster.Pk Posted December 28, 2023 Share Posted December 28, 2023 On 6/19/2016 at 3:56 AM, sentq said: <?php use Illuminate\Database\Capsule\Manager as Capsule; add_hook("ShoppingCartCheckoutCompletePage", 1, function($params){ if ($params['ispaid']==true){ $getService = Capsule::table("tblhosting")->where("orderid", $params['orderid'])->where("domain", "!=", "")->take(1); if ($getService->count()>0){ $service = $getService->get(); return '<a href="'.$service[0]->domain.'" class="btn btn-info">Visit Your Website</a>'; } } }); Hello can you help me and update this code i want to show currency and purchase amount after order ID for google purchase tracking instead of website link i will be thankful to you 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.