epretorious Posted April 18, 2013 Share Posted April 18, 2013 (edited) Now the form overwrites the page containing the iframe and PayPal completes the transaction. Now all that remains is to figure out how to instruct WHMCS or PayPal to direct customers back to the page that contains the iframe: Order Confirmation Thank you for your order. You will receive a confirmation email shortly. Your Order Number is: XXXXXXXXXX If you have any questions about your order, please open a support ticket from your client area and quote your order number. Click here to go to your Client Area Suggestions? I believe that I've found an elegant solution: By locating the text (above) in the /whmcs/lang/english.php file... [root@www whmcs]# grep "[color="#EE82EE"]If you have any questions about your order[/color]" lang/english.php $_LANG['[color="#FFD700"]orderfinalinstructions[/color]'] = "If you have any questions about your order, please open a support ticket from your client area and quote your order number."; I was able to find the template file that displays the results: [root@www whmcs]# grep -r [color="#FFD700"]orderfinalinstructions[/color] templates/* [color="#00FF00"]templates/orderforms/slider/complete.tpl:<p>{$LANG.orderfinalinstructions}</p>[/color] templates/orderforms/web20cart/complete.tpl:<p>{$LANG.orderfinalinstructions}</p> templates/orderforms/boxes/complete.tpl:<p>{$LANG.orderfinalinstructions}</p> templates/orderforms/ajaxcart/complete.tpl:<p>{$LANG.orderfinalinstructions}</p> templates/orderforms/cart/complete.tpl:<p>{$LANG.orderfinalinstructions}</p> templates/orderforms/verticalsteps/complete.tpl:<p>{$LANG.orderfinalinstructions}</p> templates/orderforms/comparison/complete.tpl:<p>{$LANG.orderfinalinstructions}</p> templates/orderforms/modern/complete.tpl:<p>{$LANG.orderfinalinstructions}</p> ...and can now modify the template to redirect customers to the page that contains the iframe (either by inserting javascript into the template file or by modifying the anchor tag that surrounds the $_LANG['orderfinalinstructions'] text): [root@www whmcs]# cat [color="#00FF00"]templates/orderforms/slider/complete.tpl[/color] <link rel="stylesheet" type="text/css" href="templates/orderforms/{$carttpl}/style.css" /> <h1>{$LANG.orderconfirmation}</h1> <br /> <div class="signupfields padded"> <p>{$LANG.orderreceived}</p> <div class="cartbox"> <p align="center"><strong>{$LANG.ordernumberis} {$ordernumber}</strong></p> </div> <p>{$LANG.orderfinalinstructions}</p> {if $invoiceid && !$ispaid} <br /> <div class="errorbox" style="display:block;">{$LANG.ordercompletebutnotpaid}</div> <p align="center"><a href="viewinvoice.php?id={$invoiceid}" target="_blank">{$LANG.invoicenumber}{$invoiceid}</a></p> {/if} {foreach from=$addons_html item=addon_html} <div style="margin:15px 0 15px 0;">{$addon_html}</div> {/foreach} {if $ispaid} [color="#00FF00"]<!-- Enter any HTML code which needs to be displayed once a user has completed the checkout of their order here - for example conversion tracking and affiliate tracking scripts -->[/color] {/if} </div> <p align="center">[color="#00FF00"]<a href="clientarea.php">{$LANG.ordergotoclientarea}</a>[/color]</p> <br /><br /> [root@www whmcs]# grep ordergotoclientarea lang/english.php $_LANG['ordergotoclientarea'] = "Click here to go to your Client Area"; I've modified the anchor tag that surrounds the $_LANG['orderfinalinstructions'] text and verified that this works reliably and integrates with the site very well. HTH, Edited April 18, 2013 by epretorious 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.