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"> </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
so much to do....