Jump to content

Advanced GetProducts API


Recommended Posts

Hello I'm using the GetProducts API to list products from a specific category group to display on my website, but I noticed that the API does not show two things to the product marked as featured and the List of features.

Am I missing something? Is there a way to get this information?
https://developers.whmcs.com/api-reference/getproducts/

Link to comment
Share on other sites

On 21/02/2021 at 01:36, luizaraujoofficial said:

Am I missing something?

no, it is what it is and was probably originally written long before those features existed and has not been updated to retrieve them.

I think if you're using the API for this, then what you'll have to do is loop through the array it creates and manually retrieve the information you want for each product ID - that would either use a Capsule query, or the models method.... I think in this instance, I might be inclined to use the model classes to get the content.

depending on what data you need for your products, there is an argument that you could use either instead of the API = but that depends on what you need from the database and your relevant skills.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated