robetus Posted October 3, 2017 Share Posted October 3, 2017 I have a product that has been created within WHMCS and inside the product in the client area there is a button that takes the customer to another product for the purchase of a custom upgrade. Is there a way I can capture the serviceid of the product in which the button was clicked to purchase the upgrade? So: Product1 >> button click >> checkout for upgrade >> upgrade purchase confirmation >> output Product1 serviceid for upgrade function to run I hope that isn't too confusing. 0 Quote Link to comment Share on other sites More sharing options...
cdeese8 Posted October 6, 2017 Share Posted October 6, 2017 Try adding {debug} to your .tpl file and checking out the available "stuff to capture" so you can use smarty tags to display snippets of code. You'll open up, for example, the checkout.tpl and add something like: {if $productinfo.pid eq "420"} insert html code here and make sure it includes button with button link to your product / service {/if} 0 Quote Link to comment Share on other sites More sharing options...
robetus Posted October 9, 2017 Author Share Posted October 9, 2017 I used a Custom field to capture the serviceid and then a hook to run a function for this. It wasn't easy but it worked. 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.