BuddyDev

Search

[Resolved] Buddyblog pay per post improvement/suggestion

  • Participant
    Level: Guru
    Posts: 900
    Tosin on #49893

    How is progress sir

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #49897

    Hello Tosin,

    Sorry for the delayed reply. I have integrated a button labelled “Promote This” which will show the user where their post will get expired. I am working on a setting to enable this feature. On complete I will let you know.

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 900
    Tosin on #49899

    Awesome, I would like to ask if it will be possible to add the button to the activity meta buttons as I have this code for something similar

     add_action( 'bp_activity_entry_meta', function () {
    	global $activities_template;
    
    	if ( ! function_exists( 'bblpro_get_post_edit_link' ) || empty( $activities_template->activity ) || empty( $activities_template->activity->secondary_item_id ) ) {
    		return;
    	}
    
    	$post_id = $activities_template->activity->secondary_item_id;
    	$form_id = bblpro_post_get_form_id( $post_id );
    
    	if ( $form_id ) {
    		echo bblpro_get_post_edit_link( $post_id, array( 'label' => esc_html( 'Edit or Promote Your Post' ) ) );
    	}
    } ); 

    Kindly see image https://ibb.co/PrPnhB1

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #49923
    This reply has been marked as private.
  • Participant
    Level: Guru
    Posts: 900
    Tosin on #49979

    Hello Ravi,

    Apologies for the late feedback I was just discharged from the hospital.

    I have tested the plugins you sent and noticed

    1. Clicking the promote button displays weird code, see image https://ibb.co/L93Y1g4

    2. How does the shortcode [bblpro_ppp_promote post_id=126] work, is it for promoting a single specific post

    3. For old non promoted posts, after clicking the post edit button and user is redirected to the post editor, the pay per post product selection field is still visible instead of being hidden. While editing an old non promoted post and I select a product price the post is only updated and not redirected to checkout.

    If there is no redirection to checkout then I think the pay per post product selection field should be hidden in the editor only when editing old post. The pay per post product selection field should only display when creating a new post

    4. I would also like to display the promote button in activity meta button section like https://ibb.co/PrPnhB1

    Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #49986

    Hi Tosin,
    I am sorry to hear about your health.
    Hope you are doing well now.

    Ravi will be following up with you tomorrow on your points.

    Regards
    Brajesh

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #49993

    Hello Tosin

    Hope you are doing well.

    1. Clicking the promote button displays weird code, see image https://ibb.co/L93Y1g4


    The link is not working. Please reshare it.

    2. How does the shortcode [bblpro_ppp_promote post_id=126] work, is it for promoting a single specific post

    Shortcode is just a way to render promote button. It will only show promote button if post is expired.

    3. For old non promoted posts, after clicking the post edit button and user is redirected to the post editor, the pay per post product selection field is still visible instead of being hidden. While editing an old non promoted post and I select a product price the post is only updated and not redirected to checkout.
    If there is no redirection to checkout then I think the pay per post product selection field should be hidden in the editor only when editing old post. The pay per post product selection field should only display when creating a new post

    I have not worked on edit post form. Just introduce a promote button on post list page. Click on it will open a popup and ask user to select among associated products on select redirect to cart or checkout page as per settings.

    4. I would also like to display the promote button in activity meta button section like https://ibb.co/PrPnhB1

    The link is not working. You can use the shortcake to render the promote button just passed the dynamic post id in the shortcake or you can call the function directly.

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 900
    Tosin on #50012

    Hi

    1. Copy and paste https://ibb.co/L93Y1g4 in the browser search bar

    4. so this code should work

    
     
    add_action( 'bp_activity_entry_meta', function () {
    	global $activities_template;
    
    	if ( ! function_exists( 'bblpro_ppp_promote' ) || empty( $activities_template->activity ) || empty( $activities_template->activity->secondary_item_id ) ) {
    		return;
    	}
    
    	$post_id = $activities_template->activity->secondary_item_id;
    	$form_id = bblpro_post_get_form_id( $post_id );
    
    	if ( $form_id ) {
    		echo bblpro_ppp_promote( $post_id, array( 'label' => esc_html( 'Edit or Promote Your Post' ) ) );
    	}
    } ); 
     
    
    
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #50014
    This reply has been marked as private.
  • Participant
    Level: Guru
    Posts: 900
    Tosin on #50020
    This reply has been marked as private.

The topic ‘ [Resolved] Buddyblog pay per post improvement/suggestion’ is closed to new replies.

This topic is: resolved