Hello Gus,
I have one question
I want to put the categories on the home page. Now I have seen you hook that I took. The question is whether it is possible that from that category he takes the first lowest price from that product.
includes/hook/Products_Tables.php
<?php
//
use Illuminate\Database\Capsule\Manager as Capsule;
if (!defined("WHMCS"))
die("This file cannot be accessed directly");
function hook_getProductGroups($vars) {
$getProductGroups = Capsule::table('tblproductgroups')
->where('tblproductgroups.hidden', '0')
->select('id', 'name')
->orderBy('order', 'asc')
->get();
$encodedata = json_encode($getProductGroups);
$decodedata = json_decode($encodedata, true);
return array("productgroups" => $decodedata);
}
add_hook("ClientAreaPageHome", 1, "hook_getProductGroups");
homepage.tpl
{foreach $productgroups as $pgroup}
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">{$pgroup.name}</div>
<div class="panel-body">
<!-- Something like this
{$pgroup.monthly}<span>/month
-->
</div>
<div class="panel-footer">
<a href="cart.php?gid={$pgroup.id}" class="btn btn-primary">order</a>
</div>
</div>
</div>
{/foreach}
i know there are probably made themes but i really can't find what i want