Jump to content

Question

Posted

Is there a way to display additional information to the client when they click "manage" next to a service?

 

I have set up a product via the Universal Module.  Everything works fine on the administrators side, but if a client clicks "manage' next to the service they only see the first "service option" listed in the universal module (it displays under "label").  Is there a way to display more than the first service option. They don't need to be able to edit or change anything, I just want to display the information to them.

 

On the administrators side if I click "manage" for the service it displays the additional service option and I can edit it just fine.  The only issue is that the client doesn't see the additional service option for the product.

 

If I am not mistaken the file that controls the display is client_services_service_infobox.pdt, but I am not sure how to go about displaying the additional service option.

 

If anyone on here can point me in the right direction, it would be appreciated.

 

Thanks,

--Jason

4 answers to this question

Recommended Posts

  • 0
Posted

This would be better encapsulated in the module itself, as Blesta is unaware of specific module fields and their intended display. You could add the fields into the template you mentioned by hard-coding them, but they will only apply to the Universal Module--not any other modules.

 

The template contains a $service object, which contains an array of module fields ($service->fields). You can take this data and display it however you like. I would suggest first adding print_r($service) to the template so you can see what fields you're working with.

 

Also, don't use $this->Html->_(...) in conditionals unless you intend to check the HTML encoded value, although I see no reason you would want to. You should only use it for display purposes. By default, HTML::_ displays content. You must pass a second parameter, boolean true, in order to return it instead.

  • 0
Posted

Thanks.

That is definitely along the lines of what I am looking for, but I was hoping I could call in the data within the template file itself instead of editing the module.

I would think that the data from the service/package could be displayed via the templating system, but what I can't figure out is the correct syntax to use.

 

Something like ... if this service field isn't empty, display label and field data.  I am just not sure how to put that into the correct syntax.

 

Something like this

<?php

if  ( $this->Html->_($service->FieldIwantToDisplay) !=false) { 
        $variable =  $this->Html->_($service->FieldIwantToDisplay);
          echo "My Label Name <br />" .  $variable;
        }

?>



Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   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.

Loading...
×
×
  • Create New...