*

oneloveb

  • *
  • 14 posts
How to make business profile show Random
« 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.

*

MB Themes

Re: How to make business profile show Random
« Reply #1 on: May 22, 2019, 03:31:03 PM »
Code: [Select]
<?php if(function_exists('bpr_companies_block')) { echo bpr_companies_block(6'RANDOM'); } ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oneloveb

  • *
  • 14 posts
Re: How to make business profile show Random
« Reply #2 on: May 22, 2019, 03:45:49 PM »
Thanks for your respond but still not working all the profiles stand still to same places.

*

MB Themes

Re: How to make business profile show Random
« Reply #3 on: May 23, 2019, 07:56:55 AM »
Queries may be cached, results as well and I am not sure that plugin is going to randomize each reload.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oneloveb

  • *
  • 14 posts
Re: How to make business profile show Random
« Reply #4 on: May 24, 2019, 01:50:03 PM »
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?

*

MB Themes

Re: How to make business profile show Random
« Reply #5 on: May 24, 2019, 02:43:39 PM »
@oneloveweb
I do not think you will have skills to do it.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oneloveb

  • *
  • 14 posts
Re: How to make business profile show Random
« Reply #6 on: May 24, 2019, 02:48:22 PM »
Please tell me the default name and I will find help via google to do it. Thanks

*

MB Themes

Re: How to make business profile show Random
« Reply #7 on: May 24, 2019, 02:53:19 PM »
ModelBPR.php
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oneloveb

  • *
  • 14 posts
Re: How to make business profile show Random
« Reply #8 on: June 05, 2019, 02:22:36 PM »
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. :( :(

*

MB Themes

Re: How to make business profile show Random
« Reply #9 on: June 06, 2019, 12:41:36 PM »
@oneloveb
You must import that class first.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

oneloveb

  • *
  • 14 posts
Re: How to make business profile show Random
« Reply #10 on: June 06, 2019, 02:02:10 PM »
@MbThemes

Please which of the class do I need to import because the error pop up from the plugin default code?

*

MB Themes

Re: How to make business profile show Random
« Reply #11 on: June 06, 2019, 08:56:20 PM »
You will not be able to do what you want, if you ask this kind of question
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots