latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Robert Feranec

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing 2 topics - 1 through 2 (of 2 total)
Topic Count Last Reply
s2member PRO WebSharks Invoice

By:  Robert Feranec in: Community Forum

voices: 3
replies: 4

3 years, 5 months ago  Robert Feranec

EU VAT

By:  Robert Feranec in: Community Forum

voices: 2
replies: 11

3 years, 8 months ago  Robert Feranec

Viewing 2 topics - 1 through 2 (of 2 total)

Topics I've Started

Viewing 3 topics - 1 through 3 (of 3 total)
Topic Count Last Reply
One Time Coupon Code

By:  Robert Feranec in: Community Forum

voices: 2
replies: 8

3 years, 5 months ago  Cristián Lávaque

s2member PRO WebSharks Invoice

By:  Robert Feranec in: Community Forum

voices: 3
replies: 4

3 years, 5 months ago  Robert Feranec

EU VAT

By:  Robert Feranec in: Community Forum

voices: 2
replies: 11

3 years, 8 months ago  Robert Feranec

Viewing 3 topics - 1 through 3 (of 3 total)

My Latest Replies (From Various Topics)

Viewing 12 replies - 1 through 12 (of 12 total)
Author Replies
Author Replies
Posted: Sunday Jul 21st, 2013 at 10:42 am #53780

Yes, the “Signup notification” may be a better option. I have tested the “Payment notification” and the email includes information about Coupon – that’s a great temporary solution!

Posted: Thursday Jul 18th, 2013 at 8:46 am #53625

Thank you very much Elizabeth. That was very quick.

Have a nice day,
– Robert

Posted: Thursday Jul 18th, 2013 at 8:26 am #53623

Thank you Cristian. I had a look at it, but I will need more time to spend on it (it will require some debugging). For now, I will just add an information to my email notification (which comes with every order) about what coupon was used and I will remove it manually. I actually think, s2member API Payment Notification (send email) could be used for this purpose – I am just not sure what information this email includes (I have set the notification, but have not received any order yet :).

BTW: Your plugin is very good, I am very happy I found it and implemented it. It’s exactly what I needed for my website: Payments, subscriptions, individually controlled page and content access, streaming from Amazon servers, download links which can expire, capabilities – I used all these features. Some plugins I have bought before (for similar prices as yours) are rubbish, not finished with a lot of errors – s2Member works perfectly, even its very complicated systems. Looks like you test it a lot. Well done! I am very happy with your product.

Posted: Thursday Jul 18th, 2013 at 8:00 am #53620

Thank you Cristian.

Posted: Wednesday Jul 17th, 2013 at 2:21 pm #53580

Thank you Cristian. I will have a look.

Have a nice day,
– Robert

Posted: Tuesday Jul 16th, 2013 at 8:00 am #53510

Please, any ideas?

Here is how I would like to use it:
I would like to reward some people with this one time coupons. For example, if John recommends my website to a friend, who will make a purchase, I will send to John a $10 one time discount coupon which he can use during next order or he can give this coupon as a gift to someone else. This kind of reward can not be done through the current coupons.

Thank you for your help.
– Robert

Posted: Wednesday May 1st, 2013 at 1:43 am #48888

ah, oki. I thought its possible, as “desc” is available in template as %%description%%. I will try to figure out how to get the amount value in the template.

Posted: Wednesday May 1st, 2013 at 1:09 am #48886

Thank you for very fast answer. I have created my own template and it works fine. I just don’t know how to get there the “ra” value. I need to know the “ra” for the script and php to calculate and show all the information about VAT directly and dynamically in the form.

Posted: Wednesday May 1st, 2013 at 12:53 am #48883

Thank you very much Bruce. This is not what I am looking for, but it’s interesting to know I can do that too.

What I actually need is to know a way to show “ra” in the form.

For example if I use:
[s2Member-Pro-PayPal-Form level="1" template="eu-vat-paypal-checkout-form.php" ccaps="test" desc="Online Course" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.domain.com" ta="0" tp="0" tt="D" ra="99.00" rp="1" rt="L" rr="BN" rrt="" rra="2" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]

I need to show in the form something like:
Online course ………………… 99

Is this possible?

Once I solve this, I will post all the code here, so your other european customers can use it too. Thank you very much for your help.

Posted: Tuesday Apr 30th, 2013 at 4:34 pm #48818

I have successfully tested your recommendation. Works great!
I have now removed all the changes from paypal-utiilties.inc (you are right, they should not be there) and I will move it to s2-hacks.php (that should not be a problem). I can successfully write and read custom values in the from. Now, I would like to dynamically show the the price – similar like this:

Item price …. XX
Tax …………..YY
———————
Total …………ZZ

Please, is there a way to get the Item price (AMOUNT) in the form? I have been looking around, but I can not find out how to get the amount value inside my custom form template. I would like to show the customer TOTAL (AMOUNT + TAX) before he/she goes to pay. Thank you again.

Posted: Tuesday Apr 30th, 2013 at 1:11 am #48756

Thank you so much Bruce. This is exactly what I need!

Posted: Monday Apr 29th, 2013 at 4:29 pm #48666

Please, any news on this? I moved ahead a little bit, but I have problem to store the custom fields.

What I have done:

In paypal-utiilties.inc.php i have updated paypal_cost function:

public static function paypal_cost($trial_sub_total = FALSE, $sub_total = FALSE, $state = FALSE, $country = FALSE, $zip = FALSE, $currency = FALSE, $desc = FALSE)
					{
						//!rf $state = strtoupper(c_ws_plugin__s2member_pro_utilities::full_state($state, ($country = strtoupper($country))));
						$rates = strtoupper($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_tax_rates"]);
						$default = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_default_tax"];
											
						//!rf START - EU VAT patch
						$rates = '';
						$eu_my_country = 'SK';
						$eu_vat_my_country_rate = '20%';
						$eu_countries = array(
						'AT','BE','BG','CY','CZ','DK','EE','FI','FR','DE','GR','HU','IE',
						'IT','LV','LT','LU','MT','NL','PL','PT','RO','SK','SI','ES','SE','GB');
						$country_tmp = $country;
						if (!in_array($country, $eu_countries)) //is from EU?							
							$default = '0%'; //it's ouside eu
						else if ($country == $eu_my_country) //is from your country?
							$default = $eu_vat_my_country_rate; // yes, it's from my country
						else if ($state == '-') //is it a person or company? => check if EU VAT has "-"
							$default = $eu_vat_my_country_rate; //it's a person from eu
						else
							$default = '0%'; //it's a company from eu						
						//!rf END
						
						$ps = _x("%", "s2member-front percentage-symbol", "s2member");

As I dont need the State input, I use it to transfer the EU VAT to the paypal_cost function to calculate the tax. This works nicely (to be able to see the TAX calculation in form, I had to put a Tax value into Paypal -> Options -> Tax rate calculations)

Only what I have to do now is store additonal custom fields during checkout – e.g . the EU VAT and some billing info. I am able to hook and write to database and check $vars or $_POST like this:

add_action('ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars', 'store_my_custom_input_fields');
function store_my_custom_input_fields($vars = array())
{	

		$user = $vars['user']; // A WP_user object instance.
		
		
		// Get an array of all the users' s2Member Custom Fields
		$custom_fields = get_user_option('s2member_custom_fields',$user->ID);
		// Set the value for a specific field ($custom_fields is an array)
		$custom_fields['eu_vat_number'] = 'works22:'.print_r($_POST,TRUE); //used for debugging			
		// Update the Custom Field data
		update_user_option($user->ID, "s2member_custom_fields", $custom_fields);
			
}

but the problem is, there is not the custom input field value from the html code – I have added this to the checkout template:

<label for="eu_vat_number">EU VAT (optional):</label>
<input type="text" name="eu_vat_number" id="eu_vat_number" />

I believe, this is the problem:
1) if I use ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars I will not
be able to catch the right $_POST which has the eu_vat_number. Is there a way how I can transfer it in $vars and read after the payment?
2) I can see the eu_vat_number in $_POST directly after a click on Check out with Paypal Button … but, I am not able to find any hook, which is working after that. I found, this should work ws_plugin__s2member_before_paypal_api_response but doesnt :( Do I have to clear cache or set something to be able to use the ws_plugin__s2member_before_paypal_api_response hook?

Please, any ideas? I really need to finish this Checkout page this week. Thank you very much.
– Robert

Viewing 12 replies - 1 through 12 (of 12 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.