Home › Forums › WPLMS AddOns › WPLMS WooCommerce › Credit Point Packages via WPLMS MyCred ADDON
- This topic has 4 replies, 2 voices, and was last updated 8 years, 3 months ago by Ignas.
Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
September 8, 2016 at 10:31 pm #69745IgnasParticipantHi 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>September 9, 2016 at 6:23 am #69778IgnasParticipantHi 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>September 9, 2016 at 6:27 am #69780IgnasParticipantShould 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.September 9, 2016 at 9:40 am #69835Anshuman SahuKeymasterYou 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; }September 9, 2016 at 3:09 pm #69897IgnasParticipantFantastic! 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.
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
- The topic ‘Credit Point Packages via WPLMS MyCred ADDON’ is closed to new replies.