Osclass Support Forums

Osclass plugin support => Backoffice Manager Plugin => Topic started by: Sergej Zaharenko on March 09, 2016, 12:31:26 AM

Title: If Status id
Post by: Sergej Zaharenko on March 09, 2016, 12:31:26 AM
Hello, i have a Question:
I would like to make some changes in the template, but I dont know helper for "status id".

Can you help me, I want to do something like this script:

<?php if( status_id () ==1 ) { ?>
------ script-----------
<?php } ?>

Thank you!
Title: Re: If Status id
Post by: MB Themes on March 09, 2016, 06:39:13 AM
@Sergej Zaharenko
You can get all status information with following code:
Code: [Select]
$status = ModelLS::newInstance()->getStatusByItemId($item_id);
Then you can show name i.e.:
Code: [Select]
echo $status['status_name'];
Do not forget to define $item_id
Title: Re: If Status id
Post by: Sergej Zaharenko on March 09, 2016, 11:42:53 PM
Super, thank you, i have it!=)
Title: Re: If Status id
Post by: MB Themes on March 10, 2016, 07:57:47 AM
@Sergej Zaharenko
Welcome ;)