Credit Point Packages via WPLMS MyCred ADDON

Home Forums WPLMS AddOns WPLMS WooCommerce Credit Point Packages via WPLMS MyCred ADDON

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #69745
    Ignas
    Participant
    Hi there, I want to create several pack with different point cost per point. In example: 1 credit for 3Eur (3Eur/credit) this is the value set in Getway for 1 credit. 3 credtis for 8Eur (2,67Eur/credit) 6 credits for 15 Eur (2,5Eur/credit) Ect. I tried to manipulate the shortcode in example of 3 credis: <span><span style="font-family: Georgia;"><span style="line-height: 1.5;">[mycred_buy amount=2.666667], </span></span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">so it would multiply the value of one credit by 2,666667 and would bet 8Eur at the check out. But it seems that this code only accepts Integer data tape. Is there a way to get Fractional accepted too? </span></span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">The other way for this purpose I found on this link: http://codex.mycred.me/filters/mycred_buycred_get_cost/</span></span> <span style="font-family: Georgia;">"Example 1: Adjust the price of buying points based on the amount of points a user selects to buy."</span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">Which looks some cool function code to create all of that. But I am not really in to coding.</span></span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">Is there a way you could log in and do this for me for a fee of your work. Or maybe there is any other way?</span></span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">I believe this code would keep </span></span></span><span style="font-family: Georgia;">WPLMS MyCred ADDON</span><span style="line-height: 1.5; font-family: Georgia;"> plugin's functions (credit count, statistics, etc.) working?</span> <span><span style="font-family: Georgia;"><span style="line-height: 1.5;">Thank you.</span></span></span> <p style="margin: 0in 0in 0in 0.375in; font-family: Georgia; font-size: 12pt;"></p>
    #69778
    Ignas
    Participant
    Hi there, let me re-post my question correctly, so you can see only the text. I want to create several pack with different point cost per point. In example: 1 credit for 3Eur (3Eur/credit) this is the value set in Getway for 1 credit. 3 credtis for 8Eur (2,67Eur/credit) 6 credits for 15 Eur (2,5Eur/credit) Ect. I tried to manipulate the shortcode in example of 3 credis: <span style="font-family: Georgia;"><span style="line-height: 1.5;">[mycred_buy amount=2.666667], </span></span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">so it would multiply the value of one credit by 2,666667 and would bet 8Eur at the check out. But it seems that this code only accepts Integer data tape. Is there a way to get Fractional accepted too? </span></span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">The other way for this purpose I found on this link: http://codex.mycred.me/filters/mycred_buycred_get_cost/</span></span> <span style="font-family: Georgia;">"Example 1: Adjust the price of buying points based on the amount of points a user selects to buy."</span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">Which looks some cool function code to create all of that. But I am not really in to coding.</span></span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">Is there a way you could log in and do this for me for a fee of your work. Or maybe there is any other way?</span></span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">I believe this code would keep </span></span><span style="font-family: Georgia;">WPLMS MyCred ADDON</span><span style="line-height: 1.5; font-family: Georgia;"> plugin's functions (credit count, statistics, etc.) working?</span> <span style="font-family: Georgia;"><span style="line-height: 1.5;">Thank you.</span></span> <p style="margin: 0in 0in 0in 0.375in; font-family: Georgia; font-size: 12pt;"></p>
    #69780
    Ignas
    Participant
    Should be fine now :) Sorry! Hi there, I want to create several pack with different point cost per point. In example: 1 credit for 3Eur (3Eur/credit) this is the value set in Getway for 1 credit. 3 credtis for 8Eur (2,67Eur/credit) 6 credits for 15 Eur (2,5Eur/credit) Ect. I tried to manipulate the shortcode in example of 3 credis:[mycred_buy amount=2.666667], so it would multiply the value of one credit by 2,666667 and would bet 8Eur at the check out. But it seems that this code only accepts Integer data tape. Is there a way to get Fractional accepted too? The other way for this purpose I found on this link: http://codex.mycred.me/filters/mycred_buycred_get_cost/ "Example 1: Adjust the price of buying points based on the amount of points a user selects to buy." Which looks some cool function code to create all of that. But I am not really in to coding.Is there a way you could log in and do this for me for a fee of your work. Or maybe there is any other way? I believe this code would keep WPLMS MyCred ADDON plugin's functions (credit count, statistics, etc.) working? Thank you.
    #69835
    Anshuman Sahu
    Keymaster
    You can try adding this code in your wplms-customizer.php file in wplms customizer plugin : add_filter( 'mycred_buycred_get_cost', 'mycredpro_buyred_volume_pricing', 10, 2 ); function mycredpro_buyred_volume_pricing( $cost, $amount ) { // If buying 10 points if ( $amount == 1 ) return 3; // If buying 100 points if ( $amount == 3 ) return 8; // If buying 1000 points if ( $amount === 6 ) return 15; return $cost;   }
    #69897
    Ignas
    Participant
    Fantastic! Works perfectly. We just took some time to work out that we need to put credit value in to short code written in this Theme builder text block. But we found it! Really thanks for such a powerful and incredible flexible theme. I will come back with some other questions soon in other topics! We can close this one! Thanks.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Credit Point Packages via WPLMS MyCred ADDON’ is closed to new replies.