wtools Posted August 11, 2018 Share Posted August 11, 2018 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. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted August 11, 2018 Share Posted August 11, 2018 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.