CodeCanyon

Download Item ( if Purchase Code is available )

135 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Denmark
  • Bought between 50 and 99 items
  • Referred between 10 and 49 users
chaoscod3r says

I’m developing a small app that can be used to display all the items you have for sale on Envato Marketplaces, and I was thinking of the way Envato proceeds with this. For example if you’ve already purchased a certain product, they will display a message with a link to the download.

Well, I’m trying something similar, instead of throwing a Purchase button, show a Download button that leads you to the Envato Download Center, or to the item page or maybe directly to the download. But what’s the logic behind that ? How is that achieved ? Is it enough to use just my API key to check if any visitor has already purchased an item I’m displaying, or how does this actually work ?

2333 posts
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Elite Author
  • Contributed a Blog Post
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Has been a member for 4-5 years
+8 more
dtbaker moderator says

You will need to have the users licence purchase code.

If you have this code, you can verify if they have purchased one of your files.

If they have purchased one of your files, you can get the direct item download url via the envato api.

Here is an example of the envato api download feature that I created some time ago: http://dtbaker.com.au/envato/download.php (source code)

135 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Denmark
  • Bought between 50 and 99 items
  • Referred between 10 and 49 users
chaoscod3r says

You will need to have the users licence purchase code.

If you have this code, you can verify if they have purchased one of your files.

If they have purchased one of your files, you can get the direct item download url via the envato api.

Here is an example of the envato api download feature that I created some time ago: http://dtbaker.com.au/envato/download.php (source code)

Oh, this one I know how to do it, I’m already using that. What I was thinking if there’s a way to detect if the user is logged in already and pull that info from their account in order to display either an Purchase button or a Download button.

So this way is the only one ? Also, I think there’s no need for the client’s API key, they just need the username and the purchase code, isn’t it ?

by
by
by
by
by