Jump to content

WHMCS Products details by group id


wtools

Recommended Posts

Hi,

 

I would like to get all products that are not hidden in a specific group.

We can use the blow API

https://developers.whmcs.com/api-reference/getproducts/

But there is no option to pass hidden=0.

When I go through templates/orderforms/standard_cart/products.tpl

Can see that there are some nice way to access product prices like

{$product.pricing.minprice.cycle}

{$product.pricing.minprice.setupFee}

{$product.pricing.minprice.price}

 

How is it possible?

I would like to pass all products details along with price to a tpl, so that i can simply access it just like whmcs is done

in templates/orderforms/standard_cart/products.tpl.

 

Can this be done using WHMCS\Product\Product;?

Or using any API?

 

Please help.

 

 

 

Link to comment
Share on other sites

3 hours ago, wtools said:

I would like to pass all products details along with price to a tpl, so that i can simply access it just like whmcs is done

Well in this case using API is overkill.

Personally I would create a WHMCS page (take a look at CreatingPages). In the PHP file you can directly query the database to get what you want and pass information to your custom tpl file in a Smarty variable. If you need that information on an existing page of WHMCS you have to create an action hook, probably ClientAreaPage. Let me know if you need more details.

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