Jump to content
  • 0

echo package group description in a service tab


niyo

Question

11 answers to this question

Recommended Posts

  • 0
On 9/23/2020 at 5:10 PM, Jono said:

This does of course assume that $package_group was fetched in the controller and passed to the view.

Hi Jono, thanks for your response. I guess that's where I'm going wrong. How would I fetch $package_group and pass it to the view?

Link to comment
Share on other sites

  • 0

Are you sure the package group is what you're looking for?  Each service is assigned to a package.  That package has a description.  That package may be assigned to any number of package groups.  To access the $package in the view you would add this to the controller:

$this->view->set('package', $package);

To display the package description you would do:

<p><?php echo $this->Html->ifSet($package->description);?><p>

To display the package group descriptions you could do something like:

<?php
foreach ($this->Html->ifSet($package->groups, []) as $package_group)
?>
<p><?php echo $this->Html->ifSet($package_group->description);?><p>
<?php
}
?>

 

Link to comment
Share on other sites

  • 0

Hi Jono, thanks for your help. It is definitely package group description i was after as i'm using the group as a product and the packages as tiers for that product. your solution only half worked since the module controller was already setting $this->view->set("package", $package->meta );  and it seemed i could only get one or the other working and not both.

I'l just have to find a developer to implement it for me since it seems it should be sufficiently straight forward for someone in the know. Hopefully @Blesta Addons reappears soon so i can hire him since he seems to have disappeared off the face of the earth.

Thanks again for your help ??

Link to comment
Share on other sites

  • 0

You really don't need

$this->view->set("package", $package->meta ); 

Since you can access the package meta from the view if you use:

$this->view->set('package', $package);

That first 'package' parameter determines the variable name in the view so if you have two $this->view->set('package', ....); statements then they would conflict.

Link to comment
Share on other sites

  • 0
On 9/29/2020 at 4:25 PM, Jono said:

Since you can access the package meta from the view if you use:

Thanks jono, you're right, i got it working. i used $this->view->set('package', $package); in the controller and removed $package->meta like you stated.

i then edited the pdt which was originally echo $this->Html->ifSet($package->someMeta) ; and changed it to echo $this->Html->ifSet($package->meta->someMeta) ;

Appreciate your help. ??

 

On 9/29/2020 at 7:25 PM, Blesta Addons said:

i think @Jono has replied to your request, but if you still need help, we can help you.

@Blesta Addons I tried opening a ticket on your site but your ticket system doesn't work. i then sent you a private message on here but didn't hear back for 2 weeks. what's the best way to contact you?

Link to comment
Share on other sites

  • 0
1 hour ago, niyo said:

@Blesta Addons I tried opening a ticket on your site but your ticket system doesn't work. i then sent you a private message on here but didn't hear back for 2 weeks. what's the best way to contact you?

almost of time i log from mobile, so didn't care about PM or i miss them, our ticket system ork and we have ticket and we reply to them. are you opening ticket from your account or via email?

Link to comment
Share on other sites

  • 0
On 9/28/2020 at 6:22 PM, Jono said:

Are you sure the package group is what you're looking for?

@Jono one last thing on the matter. i'm trying to get the Package Group Name in the email template for the package but at a loss. it's not really clear in the Package Welcome Email section of the docs. Can you assist me with the appropriate tag to use to get the name of the package group to be displayed in the emails. thanks.

Link to comment
Share on other sites

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