Jump to content
wtools

WHMCS Products details by group id

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.

 

 

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines