Membership Question

If I place a value of $0 (FREE) membership for a certain level - say Bronze, the system will not allow the transaction to complete because the monetary value is 0. It takes them to the PayPal Gateway and site, but you cannot proceed since amount to be paid is 0. How can I work around this?

Quote · 28 Oct 2012

Just out of curiously, why are you doing it that way?   Why not just let free be free, without any payment gateway at all?  I am sure you have your reasons I was just wondering what you are trying to accomplish. 

Quote · 28 Oct 2012

I am associating Actions with membership Levels. In this instance Member A and Member B are both Free, but they have the ability to perform different actions based on their membership level.

so if I keep A as the standard when they join, then B has to be like an upgrade, but I still cannot charge since B is free. Keeping B at $0 will not allow me to upgrade, since PayPal will not do a $0 transaction.

The way I am working around this right now is to have only a standard level where they can both perform the same actions and stay Free.

It's just the way my new site works.

Quote · 28 Oct 2012

There is a simple and clear way around it.

 

Anton has a membership voucher codes module (which i helpd out on). It will allow you to issue codes with discounts from 99% of full price to FREE.

 

If you issue a free code and a user inputs that FREE code it does not take the user to paypal, it just updates their membership.

 

You can create as amny codes as you want in any quantities you want. It is a great way to get members because they are getting a paid membership for free.

 

It is an awsome and easty to use module.

 

Hope it helps : )

Quote · 28 Oct 2012

Something i just created. Maybe it will help.

open modules/boonex/memberships/classes/BxMbpTemplate.php at line 64

you will see this

 

'add_to_cart' => BxDolService::call('payment', 'get_add_to_cart_link', array(

                    0, 

                    $this->_oConfig->getId(), 

                    $aValue['price_id'],

                    1,

                    1

                ))

replace that with this

 

'bx_if:pricy' => array(

'condition' => $aValue['price_amount'] > 0,

'content' => array(

'add_to_cart' => BxDolService::call('payment', 'get_add_to_cart_link', array(0, $this->_oConfig->getId(), $aValue['price_id'], 1, 1))

)

),

'bx_if:free' => array(

'condition' => $aValue['price_amount'] == 0,

'content' => array(

'mem_id' => $aValue['mem_id']

)

)

 

now open modules/boonex/memberships/templates/available.htmlat line 17 you will see this

 __add_to_cart__

replace that with this

 

<bx_if:pricy>

                    __add_to_cart__

                    </bx_if:pricy>

                    <script type="text/javascript">

                    function buyFreeMembership(iMem) {

                    $.post('<bx_url_root />m/membership/buyfreemembership/', { memId: iMem },

                    function(data){

                    if(data == 'OK'){

                    alert('Your membership is activated');

                    location.reload();

                    }

                    else if(data == 'ERROR'){

                    alert('Something went wrong');

                    }

                    });

                    }

                    </script>

                    <bx_if:free>

                    <div class="button_wrapper">

                        <img src="<bx_icon_url:information.png />" class="button_icon" />

                        <input type="button" value="Activate" class="form_input_submit" onclick="buyFreeMembership(__mem_id__)" />

                        <div class="button_wrapper_close">&nbsp;</div>

                    </div>

                    </bx_if:free>

And now put the attached file buyfreemembership.php in modules/boonex/memberships/ with index.php and request.php

You can replace the attached files too if finding and replacing is hard.

Now what it does :D
It just bypasses the add to cart system by placing a button "Activate" only for free membership. Just click that button and you are done. Your membership will be activated immediately.

I hope it will helps. Good luck

 

buyfreemembership.php · 291B · 240 downloads
available.html · 2.8K · 364 downloads
BxMbpTemplate.php · 3.5K · 239 downloads
so much to do....
Quote · 28 Oct 2012

 OK, I will try this and thank you.

 

Something i just created. Maybe it will help.

open modules/boonex/memberships/classes/BxMbpTemplate.php at line 64

you will see this

 

'add_to_cart' => BxDolService::call('payment', 'get_add_to_cart_link', array(

                    0, 

                    $this->_oConfig->getId(), 

                    $aValue['price_id'],

                    1,

                    1

                ))

replace that with this

 

'bx_if:pricy' => array(

'condition' => $aValue['price_amount'] > 0,

'content' => array(

'add_to_cart' => BxDolService::call('payment', 'get_add_to_cart_link', array(0, $this->_oConfig->getId(), $aValue['price_id'], 1, 1))

)

),

'bx_if:free' => array(

'condition' => $aValue['price_amount'] == 0,

'content' => array(

'mem_id' => $aValue['mem_id']

)

)

 

now open modules/boonex/memberships/templates/available.htmlat line 17 you will see this

 __add_to_cart__

replace that with this

 

<bx_if:pricy>

                    __add_to_cart__

                    </bx_if:pricy>

                    <script type="text/javascript">

                    function buyFreeMembership(iMem) {

                    $.post('<bx_url_root />m/membership/buyfreemembership/', { memId: iMem },

                    function(data){

                    if(data == 'OK'){

                    alert('Your membership is activated');

                    location.reload();

                    }

                    else if(data == 'ERROR'){

                    alert('Something went wrong');

                    }

                    });

                    }

                    </script>

                    <bx_if:free>

                    <div class="button_wrapper">

                        <img src="<bx_icon_url:information.png />" class="button_icon" />

                        <input type="button" value="Activate" class="form_input_submit" onclick="buyFreeMembership(__mem_id__)" />

                        <div class="button_wrapper_close">&nbsp;</div>

                    </div>

                    </bx_if:free>

And now put the attached file buyfreemembership.php in modules/boonex/memberships/ with index.php and request.php

You can replace the attached files too if finding and replacing is hard.

Now what it does :D
It just bypasses the add to cart system by placing a button "Activate" only for free membership. Just click that button and you are done. Your membership will be activated immediately.

I hope it will helps. Good luck

 

 

Quote · 28 Oct 2012

here some screenshots.

 

so much to do....
Quote · 28 Oct 2012

 What is it called?

 

There is a simple and clear way around it.

 

Anton has a membership voucher codes module (which i helpd out on). It will allow you to issue codes with discounts from 99% of full price to FREE.

 

If you issue a free code and a user inputs that FREE code it does not take the user to paypal, it just updates their membership.

 

You can create as amny codes as you want in any quantities you want. It is a great way to get members because they are getting a paid membership for free.

 

It is an awsome and easty to use module.

 

Hope it helps : )

 

Quote · 28 Oct 2012

found it...

http://www.boonex.com/m/Membership_Vouchers

 

Awsome job Prashank..... one day I am going to zerox your brain and implant it into mine lol....

I am still on php101.... and failing lol.... : ) 

Quote · 28 Oct 2012

 Hey, at least you are at PHP101, I am not even sure what PHP actually stands for. But then do I really need to know when I have Prashank here helping us with all this cool stuff?

Thanks to both of you.

 

found it...

http://www.boonex.com/m/Membership_Vouchers

 

Awsome job Prashank..... one day I am going to zerox your brain and implant it into mine lol....

I am still on php101.... and failing lol.... : ) 

 

Quote · 28 Oct 2012

@Drautenbach sorry i am xerox conscious :P

@Presscon glad to help :D

so much to do....
Quote · 29 Oct 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.