*

Brandso

  • ****
  • 108 posts
Facing issue with Osclass Pay Plugin
« on: May 07, 2022, 03:46:50 PM »
Hello,

I am facing some problem with Osclass Pay Plugin. I was testing User Groups in Osclass Pay Plugins by adding some Groups in it which had 5 Max Items, Exp. Days 30, Item Period 3, Attr 1 (To check if the user is added to Basic Group of Business Profile). I know the Item period 3 is odd but just wanted to test the functionality of this plugin and know what would happen after 3 days with the listings and whether I would be able to post more listings if I utilise all 5 Listings within 3 days. The default Max Items is set to 3 for 30 Days. Now below is the way how I started testing.

1.> I first posted 1 listing out of the 3 Free Listings.
2.> Then I purchased Membership Group of 5 Max Items, Exp. Days 30, Item Period 3 by using the Wallet Pay as mode of payment in which I had already added some fund through Admin Pay.
3.> I then posted 2 more listings without any issue and now I had total 3 Listings.
4.> Now when I tried to post 4th Listing, I get Item Limit Warning that says Max 3 Items which is limit of the default Max Items.
5.> Also the User Business Profile is not activated as I thought that by setting attribute in Membership Group user will be automatically added to Business Profile Group na din this case as I had set Attr value 1 which means it should have added user to Basic group from my understanding.

So, for your reference I am sharing some screenshots for Warning, Purchased Membership Group, User Groups Setting and also Business Profiles List so that you can understand what exactly I have setup in Backend.

Thanks

*

MB Themes

Re: Facing issue with Osclass Pay Plugin
« Reply #1 on: May 07, 2022, 07:56:45 PM »
Item limits plugin and osclass pay membership plugin item limit works independently, you should keep that in mind.
Profile should get autovalidate if this is setup in business profile plugin.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Brandso

  • ****
  • 108 posts
Re: Facing issue with Osclass Pay Plugin
« Reply #2 on: May 07, 2022, 08:15:48 PM »
Thanks for replying. I didn't mention about Item limit plugin here. You can check the attached screenshot to understand my problem. In osclass pay plugin user group you have an option of default max item and when you create group you need to specify max number of post, expiry date of membership etc. So, I clearly mentioned about that in my above post. I agree that I have zero knowledge of coding but atleast I understand what I am saying maybe you got confused with me saying item limit but if you check the screenshot you will clearly understand what I am trying to say. And also about the business profile plugin, I believe that it is connected with osclass pay plugin and if you see the screenshot for that as well then you might understand my problem. Your above answer makes no sense. Thanks

*

MB Themes

Re: Facing issue with Osclass Pay Plugin
« Reply #3 on: May 09, 2022, 03:07:06 PM »
@Brandso
You have not metioned Item limit plugin, but you've sent screenshot with error from this plugin:
Code: [Select]
        osc_add_flash_error_message(sprintf(__('You have reached your current listings limit %s, you have %s active listings and will not be able to publish new ads.', 'item_limit'), $limit, $items));

Error from osclass pay plugin is:
Code: [Select]
      osc_add_flash_error_message(sprintf(__('You have reached maximum number of listings you can publish (%s items in %s days). Please upgrade your membership in order to increase your limits.', 'osclass_pay'), $max_items, $max_items_days));

Your setup for osclass pay seems to be correct. In business profile you have not included into screenshot section above auto-validation called "Profile Groups". Also seller profile is auto-validated when you enter it in front (there should be improvement in update of business profile that when user complete payment, it will re-validate it's business profile.

Adding this function to index.php of business profile plugin could do it.
Code: [Select]
// REVALIDATE USER PROFILE
function bpr_revalidate_user_profile($log_id) {
  if($log_id > 0 && osc_plugin_is_enabled('osclass_pay/index.php')) {
    $user_id = @$log['fk_i_user_id'];
   
    if($user_id > 0) {
      $seller = ModelBPR::newInstance()->getSellerByUserId($user_id);
      bpr_control_premium($seller);
    }
  }
}

osc_add_hook('osp_log_saved', 'bpr_revalidate_user_profile');
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots