Osclass Support Forums
Osclass plugin support => Business Profile Plugin => Topic started by: oneloveb on May 22, 2019, 12:33:53 PM
-
This is the code <?php if(function_exists('bpr_companies_block')) { echo bpr_companies_block($limit, 'RANDOM'); } ?>
I got from MB Themes that I should change the limit number and I did but not working.
Any help to make the business profile random will be appreciate thanks.
-
<?php if(function_exists('bpr_companies_block')) { echo bpr_companies_block(6, 'RANDOM'); } ?>
-
Thanks for your respond but still not working all the profiles stand still to same places.
-
Queries may be cached, results as well and I am not sure that plugin is going to randomize each reload.
-
I want to create a code to randomize the business profile block so what is the default name in the plugin for the business profile is
Bpr
Seller
Businessprofileblock
Which one is the default name that will control the block if I get the code correct?
-
@oneloveweb
I do not think you will have skills to do it.
-
Please tell me the default name and I will find help via google to do it. Thanks
-
ModelBPR.php
-
1<?php
2 if(!(isset($order) && $order <> '')) {
3 $order = 'RANDOM';
4 }
5
6
7 $order = array($per_page, 0);
8
9 if($order == 'RANDOM') {
10 $ids = ModelBPR::newInstance()->getIds($per_page);
11 } else {
12 $ids = array();
13 }
14
15 $sellers = ModelBPR::newInstance()->getSellers(1, -1, -1, $order, '', '', '', $order, $ids);
16
17?>
While try to make the business profile random this is the Error message I got
PHP Notice: Undefined variable: per_page in /workspace/Main.php on line 7
PHP Fatal error: Uncaught Error: Class 'ModelBPR' not found in /workspace/Main.php:15
Stack trace:
#0 {main}
thrown in /workspace/Main.php on line 15
Is like there is bug in the line 15 with ModelBPR can you please look into and help solve the issue.
I input number for you to know the exact line that have Error. :( :(
-
@oneloveb
You must import that class first.
-
@MbThemes
Please which of the class do I need to import because the error pop up from the plugin default code?
-
You will not be able to do what you want, if you ask this kind of question