iNode Cloud Posted May 22, 2015 Report Posted May 22, 2015 Hey guys, started to use blesta as the main way to invoice everybody. i have 2 plans: shared hosting & cloud pay as you go. the shared hosting section shows the service they currently have which is fine but for cloud pay as you go i want to hide services section. how can i do this? Quote
0 serge Posted May 22, 2015 Report Posted May 22, 2015 so it's 2 differents products/groups. how could the 2 be displayed if customer have not ordered it? and if they ordered it, that fine if they see it? But, supposing you need to hidden blesta core display to certain group or product, this can be done within the template code with a condition code example: if ($package_group->id == "4" OR $package_group->id == "10" OR $package_group->id == "12" OR $package_group->id == "14" OR $package_group->id == "16" ) { // LICENSE TRIAL CASE: nothing to display } else { ?> </br><p><right><font color="#2b356e">We accept payment by major credit and debit cards through PayPal | PayPal account is not required.</font></right></p> <?php } ?> Michael 1 Quote
0 iNode Cloud Posted May 23, 2015 Author Report Posted May 23, 2015 Hi serge, I was talking about hiding the entire services section for a single group. Quote
0 serge Posted May 23, 2015 Report Posted May 23, 2015 if you want hide the whole table, you can do like in example I given, but how customer will manage product/service they have? and if you want keep the whole table but not dispay line when is related to a given group it's harder as from memory there is a loop in code and maybe javascript. Quote
0 serge Posted May 23, 2015 Report Posted May 23, 2015 (edited) for hide completelly service table to given group(s): this not tested code should work, it's use bootstrap theme but you should do a full copy off the boostarp theme and remane it, and in blesta admin interface, select this custom theme...if not at each blesta update if there is change in bellow file, you will be losing customization file to customize: BLESTA-INSTALL/app/views/client/bootstrap/client_services.pdt if ($package_group->id == "4" OR $package_group->id == "10" OR $package_group->id == "12" OR $package_group->id == "14" OR $package_group->id == "16" ) { // nothing to display }else { // Display service table // START SERVICES TABLE <div class="table-responsive"> <table class="table table-curved table-striped-alt table-hover" id="services"> <thead> <tr> <th><a href="<?php echo $this->Html->safe($this->base_uri . "services/index/" . $this->Html->ifSet($status) . "/?sort=name&order=" . ($sort == "name" ? $negate_order : $order));?>" class="ajax<?php echo $this->Html->safe($sort == "name" ? " " . $order : "");?>"><?php $this->_("ClientServices.index.heading_package");?></a></th> <th><?php $this->_("ClientServices.index.heading_label");?></th> <th><a href="<?php echo $this->Html->safe($this->base_uri . "services/index/" . $this->Html->ifSet($status) . "/?sort=term&order=" . ($sort == "term" ? $negate_order : $order));?>" class="ajax<?php echo $this->Html->safe($sort == "term" ? " " . $order : "");?>"><?php $this->_("ClientServices.index.heading_term");?></a></th> <th><a href="<?php echo $this->Html->safe($this->base_uri . "services/index/" . $this->Html->ifSet($status) . "/?sort=date_added&order=" . ($sort == "date_added" ? $negate_order : $order));?>" class="ajax<?php echo $this->Html->safe($sort == "date_added" ? " " . $order : "");?>"><?php $this->_("ClientServices.index.heading_datecreated");?></a></th> <th><a href="<?php echo $this->Html->safe($this->base_uri . "services/index/" . $this->Html->ifSet($status) . "/?sort=date_renews&order=" . ($sort == "date_renews" ? $negate_order : $order));?>" class="ajax<?php echo $this->Html->safe($sort == "date_renews" ? " " . $order : "");?>"><?php $this->_("ClientServices.index.heading_daterenews");?></a></th> <?php if ($this->Html->ifSet($status) != "canceled") { if ($this->Html->ifSet($status) == "suspended") { ?> <th><a href="<?php echo $this->Html->safe($this->base_uri . "services/index/" . $this->Html->_($status, true) . "/?sort=date_suspended&order=" . ($sort == "date_suspended" ? $negate_order : $order));?>" class="ajax<?php echo $this->Html->safe($sort == "date_suspended" ? " " . $order : "");?>"><?php $this->_("ClientServices.index.heading_datesuspended");?></a></th> <?php } ?> <th><?php $this->_("ClientServices.index.heading_options");?></th> <?php } else { ?> <th><a href="<?php echo $this->Html->safe($this->base_uri . "services/index/" . $this->Html->_($status, true) . "/?sort=date_canceled&order=" . ($sort == "date_canceled" ? $negate_order : $order));?>" class="ajax<?php echo $this->Html->safe($sort == "date_canceled" ? " " . $order : "");?>"><?php $this->_("ClientServices.index.heading_datecanceled");?></a></th> <?php } ?> </tr> </thead> <tbody> <?php // List all services for ($i=0; $i<$num_services; $i++) { ?> <tr class="expand service_info"> <td><?php $this->Html->_($services[$i]->package->name);?></td> <td><?php $this->Html->_($services[$i]->name);?></td> <td> <?php if ($this->Html->ifSet($services[$i]->package_pricing->period) == "onetime") $this->Html->_($periods[$services[$i]->package_pricing->period]); else { $term = $this->Html->_($services[$i]->package_pricing->term, true); echo $this->Html->safe($this->Html->concat(" ", $term, ($term == 1 ? $this->Html->ifSet($periods[$services[$i]->package_pricing->period]) : $this->Html->ifSet($periods[$services[$i]->package_pricing->period . "_plural"])))); } ?> </td> <td><?php echo $this->Date->cast($this->Html->_($services[$i]->date_added, true));?></td> <td> <?php echo (empty($services[$i]->date_renews) ? $this->_("ClientServices.index.text_never", true) : $this->Date->cast($services[$i]->date_renews));?> <?php if ($this->Html->ifSet($status) != "canceled" && !empty($services[$i]->date_canceled) && $this->Date->toTime($this->Date->cast($services[$i]->date_canceled)) > $this->Date->toTime($this->Date->cast(date("c")))) { ?> <a href="#" data-toggle="tooltip" title="<?php $this->_("ClientServices.manage.text_date_to_cancel", false, $this->Date->cast($services[$i]->date_canceled));?>"><i class="fa fa-clock-o text-primary"></i></a> <?php } ?> </td> <?php if ($this->Html->ifSet($status) != "canceled") { if ($this->Html->ifSet($status) == "suspended") { ?> <td><?php echo (empty($services[$i]->date_suspended) ? $this->_("ClientServices.index.text_never", true) : $this->Date->cast($this->Html->_($services[$i]->date_suspended, true)));?></td> <?php } ?> <td> <div class="btn-group"> <a href="<?php echo $this->Html->safe($this->base_uri . "services/manage/" . $this->Html->ifSet($services[$i]->id) . "/");?>" class="btn btn-xs btn-default"> <i class="fa fa-cog fa-fw"></i> <?php $this->_("ClientServices.index.option_manage");?> </a> </div> </td> <?php } else { ?> <td><?php echo (empty($services[$i]->date_canceled) ? $this->_("ClientServices.index.text_never", true) : $this->Date->cast($this->Html->_($services[$i]->date_canceled, true)));?></td> <?php } ?> </tr> <tr class="expand_details" id="services_<?php $this->Html->_($services[$i]->id);?>"> <td colspan="7" class="subtable"> </td> </tr> <?php } ?> </tbody> </table> </div> // END SERVICES TABLE } // END of "if" all code between // START SERVICES TABLE // END SERVICES TABLE is same as in original file, so you have to locate this block in the original file Other, you have also to specify just before this block what group number you want service table be hidden, you can know group number from blesta admin interface when editing a group, in the URL there will be the group number. Edited May 23, 2015 by serge Michael 1 Quote
Question
iNode Cloud
Hey guys,
started to use blesta as the main way to invoice everybody.
i have 2 plans:
shared hosting & cloud pay as you go.
the shared hosting section shows the service they currently have which is fine but for cloud pay as you go i want to hide services section.
how can i do this?
4 answers to this question
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.