| |

Selling Virtual Items in WHMCS

I love when I have an a-ha moment and solve a problem, even if it does take a few days.

I use WHMCS to manage my billing and products. It’s been great for selling services, but I’ve recently ventured into downloadable products (like my new ebook!). I knew I could use WHMCS to sell downloadable items, but I wasn’t sure exactly how. I spent days trying to figure out how to deliver the product. I know I had it set up correctly, but I wanted the buyer to receive an email with a link to download. That link was stumping me. I spent a lot of time at the WHMCS forums and nothing I was reading was working.

The original link posted in the forums looked something like this, with id=X being the download id number:
https://PATHTOWHMCS/dl.php?type=d&id=X&serviceid={$service_id}
(I now know that the PATHTOWHMCS part can be put in by using {whmcs_url}, another duh!)

Nothing could get this work. I thought maybe the user needed to be logged in to see the download as available. When I went to the downloads page, I was signed out, that left me thinking my page was broken. I updated my install, I tried a few things to the .tpl file. I tried to replicate the products list on the client area page. Anything to make sure my buyers were seeing the link to download right away from the link given in the email.

Turns out I had put a downloadable item up for sale in the past and I had created a custom email template for that item. After locating it, I found the link I put in there. A link that sends the reader straight to the products page of the client area. That page is where the download link is located. Boom! Problem solved!

For your reference, here’s the link to include in your email:
{$whmcs_url}/clientarea.php?action=products

And, if you’re wondering how to set up the product, here are the steps to follow:

Step 1: Upload your Product

Navigate to Support -> Downloads, create a category for your products, upload your product and check the boxes for “Tick this box to only allow logged in clients permission to download it” and “Tick this box if this download should only be available after a product or addon purchase”.

whmcs-1

Step 2: Create your Product Email

Navigate to Setup -> Email Templates. You’ll want to create a new Product Message. I advise copying an existing template and changing the necessary items. You can create an email template for each downloadable product or one generic since you’ll be including a link to the products page for your buyer to access their item. You’ll want to include this code which will be replaced with a link to your buyer’s products page. There they can click the little down arrow next to the item to see the download link. (I’ll be putting that little tip in my email as well so buyer’s aren’t lost!)

whmcs-2

Step 3: Create your Product

Navigate to Setup-> Products/Services and create your item. Under Details-> Welcome Email, you should include the email template you just created. Under Module Settings, select Auto Release, then select one of the options below that. Mine is set for “Automatically setup the product as soon as the first payment is received”. I want to make sure payment is processed before it’s accessible. Last part! Under Other, you need to add the file. You’ll see Associated Downloads. In the first box navigate to your file, then click to add it to the box on the right.

whmcs-3

Done! Happy Selling!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *