Osclass Support Forums

Osclass plugin support => Business Profile Plugin => Topic started by: MB Themes on August 27, 2018, 09:44:52 PM

Title: New functions that can be used for integration of Business Profile Plugin
Post by: MB Themes on August 27, 2018, 09:44:52 PM
Hey all,
We will add in next update these functions that helps with further integration of themes:


bpr_get_type($user_id) - return user business type ID (1 - Basic, 2 - Pro, 3 - VIP)
bpr_is_business($user_id) - return true if user has valid business profile, otherwise return false
bpr_show_companies() - show list of companies anywhere

Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Lopetoms on August 27, 2018, 11:49:30 PM
very good

need add here this http://prntscr.com/knksnt
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: MB Themes on August 28, 2018, 08:37:23 AM
Please create new thread.
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Locan on September 10, 2018, 02:11:53 PM
did you finished it yet. we need this helper
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: MB Themes on September 10, 2018, 02:34:43 PM

bpr_get_type($user_id) - return user business type ID (1 - Basic, 2 - Pro, 3 - VIP)
bpr_is_business($user_id) - return true if user has valid business profile, otherwise return false
bpr_show_companies() - show list of companies anywhere

Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Locan on September 10, 2018, 02:56:06 PM
why you not add it in plugin option? this helper work well.
thank you
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Locan on September 10, 2018, 03:00:00 PM
i want to show this business profile (bpr_show_companies() ) in slideshow like this website. can you inter grade it? which file locate this function bpr_show_companies() ?
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Locan on September 10, 2018, 03:12:39 PM
this function bpr_get_type($user_id) not show user  type in item.php
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: MB Themes on September 10, 2018, 03:16:34 PM
$user_id is variable.
https://www.w3schools.com/php/php_variables.asp
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Locan on September 11, 2018, 01:08:04 PM
it show only number 1 or 2 only not show Basic or Pro
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: MB Themes on September 11, 2018, 01:29:54 PM
bpr_get_type($user_id) - return user business type ID (1 - Basic, 2 - Pro, 3 - VIP)

It is faster to ready carefully then to ask.
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Locan on September 11, 2018, 02:35:49 PM
Quote
it show only number 1 or 2 only not show Basic or Pro
i don't understand this function.  how visitor know user basic or pro if it show 1,2
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: MB Themes on September 11, 2018, 02:55:37 PM
@Locan
https://www.w3schools.com/php/php_switch.asp
https://www.w3schools.com/php/showphp.asp?filename=demo_switch

Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Locan on September 11, 2018, 03:55:58 PM
it's hard to know for basic php coder like me. i can't do it, so sad
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: MB Themes on September 11, 2018, 03:58:10 PM
@Locan
Basic coder would do it :P
You have user ID instead of type id in case.
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Locan on September 11, 2018, 04:06:58 PM
 :'( :'( :'( :'(
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: MB Themes on September 11, 2018, 04:11:16 PM
@Locan
Code: [Select]
if(bpr_get_type($user_id) == 1) { echo 'Basic' ; }
if(bpr_get_type($user_id) == 2) { echo 'Pro' ; }
if(bpr_get_type($user_id) == 3) { echo 'VIP' ; }

Next time rather look for developer.
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Locan on September 11, 2018, 05:07:51 PM
Quote
<div class="item-bpr-type item-bpr-type-<?php echo bpr_get_type($user_id = osc_item_user_id()); ?>">
                  <?php
                  $user_id = osc_item_user_id();
                 if(bpr_get_type($user_id) == 1) { echo 'Basic' ; }
                if(bpr_get_type($user_id) == 2) { echo 'Pro' ; }
                if(bpr_get_type($user_id) == 3) { echo 'VIP' ; }
                ?>
                </div>

thank you for your help
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Lopetoms on October 10, 2018, 01:45:44 PM
It is my recommendation
You plugin need this like orginal plugin

http://user-shop_plugin.osclassdemo.com/business (DEMO)
http://prntscr.com/l48y4y (screens)

http://user-shop_plugin.osclassdemo.com/shop-all-categories (DEMO CATEGORY)

http://user-shop_plugin.osclassdemo.com/shop-directory/ (DEMO SEARCH)
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Tiger on October 10, 2018, 01:59:55 PM
Quote
It is my recommendation
You plugin need this like orginal plugin

http://user-shop_plugin.osclassdemo.com/business (DEMO)
http://prntscr.com/l48y4y (screens)

http://user-shop_plugin.osclassdemo.com/shop-all-categories (DEMO CATEGORY)

http://user-shop_plugin.osclassdemo.com/shop-directory/ (DEMO SEARCH)

i think MB Themes plugin is better then original osclass
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Lopetoms on October 11, 2018, 07:10:08 AM
yes
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: siken on December 14, 2018, 11:56:26 AM
i want to show this business profile (bpr_show_companies() ) in slideshow like this website. can you inter grade it? which file locate this function bpr_show_companies() ?

How could you put the profiles on a carousel on the main.php cover?

someone has the code?
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Fabio Massaro on August 19, 2019, 01:57:15 PM
Hey all,
We will add in next update these functions that helps with further integration of themes:


bpr_get_type($user_id) - return user business type ID (1 - Basic, 2 - Pro, 3 - VIP)
bpr_is_business($user_id) - return true if user has valid business profile, otherwise return false
bpr_show_companies() - show list of companies anywhere



Hi, you can explain better what they are for and where you have to enter these codes
Title: Re: New functions that can be used for integration of Business Profile Plugin
Post by: Fabio Massaro on August 19, 2019, 02:07:01 PM
Hey all,
We will add in next update these functions that helps with further integration of themes:


bpr_get_type($user_id) - return user business type ID (1 - Basic, 2 - Pro, 3 - VIP)
bpr_is_business($user_id) - return true if user has valid business profile, otherwise return false
bpr_show_companies() - show list of companies anywhere



Hi, you can explain better what they are for and where you have to enter these codes

I saw this code on a post where I have to enter it:

<div class = "item-bpr-type item-bpr-type - <? php echo bpr_get_type ($ user_id = osc_item_user_id ());?>">
                  <? php
                  $ user_id = osc_item_user_id ();
                 if (bpr_get_type ($ user_id) == 1) {echo 'Basic'; }
                if (bpr_get_type ($ user_id) == 2) {echo 'Pro'; }
                if (bpr_get_type ($ user_id) == 3) {echo 'VIP'; }
                ?>
                </div>


and what it is for ?????