Home Forums Plugin Support WP User Frontend Pro Frontend Pro Form Purchase Packages and BuddyPress

This topic is: not resolved

This topic contains 49 replies, has 3 voices, and was last updated by  TeeDev 5 years, 5 months ago.

Viewing 15 posts - 31 through 45 (of 50 total)
  • Author
    Posts
  • #13011

    TeeDev
    Participant
    Post count: 58

    Why does the support here take so long?

    #13036

    TeeDev
    Participant
    Post count: 58

    Guys please, come on………..

    #13134

    TeeDev
    Participant
    Post count: 58

    Hello

    I really need help to get this final part of this support query resolved.
    Can somebody help me do this today please.

    I need guidance on how to insert the code shown previously into the PHP template as advised.

    Thank you

    #13145

    TeeDev
    Participant
    Post count: 58

    Hi Wedevs,
    Are you beginning to feel my frustration yet?

    Can I have a resolution please?
    ASAP?

    Thanks

    #13194

    TeeDev
    Participant
    Post count: 58

    Hi guys

    I'm seeing you're answering other support questions.
    Can you help me finalise my issue this morning please?

    Thank you!

    #13240

    TeeDev
    Participant
    Post count: 58

    I bout WPUF Pro and the Buddypress addon but you're not providing me full support for them, choosing to ignore my ticket. Please assist me and resolve my ticket to the full resolution http://wedevs.com/support/topic/frontend-pro-form-purchase-packages-and-buddypress/

    Thanks

    #13242

    Mahi
    Member
    Post count: 1555

    So sorry for delay. If you want to use that large HTML inside php file,

    then try like this :

    //PHP Code…
    ?>

    HTML Code goes here

    #13243

    Mahi
    Member
    Post count: 1555
    #13251

    TeeDev
    Participant
    Post count: 58

    Hi Mahi

    Thanks for your reply. But can you show me exactly how to use it in the place where it says ‘You must purchase a package'?

    If you can show me exactly how to replace that actual segment of code that would be great. Or maybe it would be easier to make it so it uses the same code that is used in the rendered form when the user is not logged in?

    Thanks

    #13263

    Tareq Hasan
    Keymaster
    Post count: 2831

    Try it this way:
    [php]
    if ( $force_pack == ‘yes' && WPUF_Subscription::has_user_error() ) {
    ob_start();
    ?>

    Your text goes here

    <?php
    return ob_get_clean();
    }
    [/php]

    #13278

    TeeDev
    Participant
    Post count: 58

    Hi Tareq

    No, that didn't work. I got the following error on the frontend

    Parse error: syntax error, unexpected ‘public' (T_PUBLIC) in /home/user/public_html/xtra/wp-content/plugins/wp-user-frontend-pro/class/subscription.php on line 484

    It's a block of HTML I'm trying to add, is that compatible with this method?

    Thanks

    #13280

    TeeDev
    Participant
    Post count: 58

    OK, my mistake I think – I tried again and it seems to have worked.

    The first time I overwrote the two lines:

    return $text;
    }

    But the second time I kept them. Is it correct to keep those? So all I'm replacing are these three lines:

    if ( $force_pack == 'yes' && WPUF_Subscription::has_user_error() ) {
                return __( 'You must purchase a pack before posting', 'wpuf' );
            }

    Is that correct?

    Thanks guys

    #13284

    TeeDev
    Participant
    Post count: 58

    OK guys I'm still having a little bit of issues with expected functionality/behaviour here. Here is the scenario.

    I want users to register and be logged in and force them to purchase a package to submit a post. OK.

    So I have a submission form. If they are not logged in when they reach the form page it shows them a message I nicely designed in HTML telling them to register or login. If they are logged in they see the form. (At the top of the form page there is a message in HTML telling them to follow a link to purchase a package then come back to the form page).

    This works nicely when Charge for posting = No and Force Pack Purchase = Yes. But this isn't good because people can submit without buying a pack.

    However, when I turn on Charge for Posting = Yes people who are not logged in see the error You Must Purchase a Package and people who are logged in see the same error when they access the form page. Of course, because you need a package. But this is not helpful.

    I want users who are not logged in to see the Form's message for not logged in users. If they are not logged in then purchasing a package is irrelevant.

    Then I want users who are logged in but haven't got a package to just see the form page with my message at the top OR with the default ‘You Must Purchase a Package…' error at the top of the form.

    Does this make sense? How can I achieve this?

    #13290

    Tareq Hasan
    Keymaster
    Post count: 2831

    I'll be adding a filter in the force pack notice in a future version. But right now, you can paste this snippet:

    [php]
    if ( $force_pack == ‘yes' && WPUF_Subscription::has_user_error() ) {
    return apply_filters( ‘wpuf_pack_notice', __( ‘You must purchase a pack before posting', ‘wpuf' ) );
    }
    [/php]
    So you'll not lose those instructions in future update.

    Now, you can add your custom informations to your themes functions.php like this:
    [php]
    function wpufe_force_pack_notice( $notice ) {

    ob_start();

    if ( is_user_logged_in() ) {
    ?>

    give purchase pack info to logged in users

    <?php } else { ?>

    Put your login/registration instruction

    <?php
    }

    return ob_get_clean();
    }

    add_filter( ‘wpuf_pack_notice', ‘wpufe_force_pack_notice' );
    [/php]

    #13291

    TeeDev
    Participant
    Post count: 58

    Superthanks Tareq,

    But where do I add that snippet? Is it in place of the code you gave me before (in subscription.php) or above it? Will it give the notice as it was before or above my form?

    And the code for functions.php, does that replace all of the changes before? Should I only fo the functions.php change?

    I'm a bit confused…

Viewing 15 posts - 31 through 45 (of 50 total)

The topic ‘Frontend Pro Form Purchase Packages and BuddyPress’ is closed to new replies.