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: Jeffry Evans

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


Topics I'm Subscribed To


Topics I've Started


My Latest Replies (From Various Topics)

Viewing 14 replies - 1 through 14 (of 14 total)
Author Replies
Author Replies
Posted: Wednesday Oct 3rd, 2012 at 3:25 pm #27358

I’m sorry to be a thorn in your side, but I tried this, and it’s not working. The checkout form still pulls the original template from the s2member files.

Thanks,

Jeffry

Posted: Thursday Sep 20th, 2012 at 10:45 am #25956

Doing that added the form to the top of the home page (and I assume, every other page, but I didn’t check).

Posted: Wednesday Sep 19th, 2012 at 10:37 am #25804

I already did that. But I want a solution that will survive the next s2member update.

Please help.

Posted: Saturday Aug 11th, 2012 at 10:22 am #21777

Please do!

Thanks,

Jeffry

Posted: Saturday Jul 21st, 2012 at 1:17 am #19875

That’s definitely more secure, but it doesn’t work. For some reason, trying to set a global variable inside a function in s2hacks.php just doesn’t work.

Posted: Friday Jul 20th, 2012 at 4:51 pm #19854

Okay, cool.

I used wp_redirected to extract the values for ta and ra, and pass them back to the page in the form of url parameters, then I just did a simple $_GET to insert them into my paypal short code.

This is the appropriate code I added to my s2hacks.php file:

add_action('s2hacks_after_authnet_apply_coupon', 's2hacks_after_authnet_apply_coupon');
function s2hacks_after_authnet_apply_coupon($attr) {
	if ((!isset($_GET['ta']) && !isset($_GET['ra']) && strlen($attr[coupon]) > 0) || $attr[coupon] != $_GET['s2p-coupon']) {
		$urlRedirect = get_home_url().$_SERVER['REQUEST_URI'];
		if (strpos($urlRedirect, "?") > 0) {
			$urlRedirect .= '&s2p-coupon='.$attr[coupon].'&ta='.$attr[ta].'&ra='.$attr[ra];
		} else {
			$urlRedirect .= '?s2p-coupon='.$attr[coupon].'&ta='.$attr[ta].'&ra='.$attr[ra];
		}
		wp_redirect( $urlRedirect );
		exit;
	}
}

Here’s the code I used to update the ta value in the paypal short code:

<?php if (isset($_GET['ta'])) echo $_GET['ta']; else echo 27; ?>

This did the trick! Thank you so much for the help!

  • This reply was modified 4 years, 5 months ago by  Jeffry Evans.
  • This reply was modified 4 years, 5 months ago by  Jeffry Evans.
Posted: Friday Jul 20th, 2012 at 3:40 am #19804

I was already able to extract the coupon code itself.

We have several coupons, and many more are likely to be added in the future. I don’t want to have to add additional if/else code to the pages every time we add a new coupon code.

I don’t understand this…the s2member system already computes and displays the revised order total on the screen after a coupon is entered. All I want to do is to be able to take that computation, and add it to the paypal short code.

Is that possible?

Posted: Thursday Jul 19th, 2012 at 6:49 pm #19788

I’m not sure where I am going wrong here, but i tried to use that code in my s2hacks.php file to grab the data, and I am just not able to do it.

Can you post some code for the s2hacks.php file to grab this info?

Thanks,

Jeffry

Posted: Tuesday Jul 17th, 2012 at 12:41 pm #19533

I really need to get a solution to this asap. Is there any way to speed up the response time?

Thanks,

Jeffry

Posted: Friday Jul 13th, 2012 at 4:08 pm #19190

Any word on this?

Thanks,

Jeffry

Posted: Tuesday Jul 10th, 2012 at 12:26 pm #18818

No, I need this value before the payment is processed, because I am using it to generate the correct PayPal button url. I am using an s2Member Authorize.net pro form, coupled with a standard PayPal button on this checkout screen.

Posted: Monday Jul 9th, 2012 at 5:01 pm #18704

Actually, if possible, I want the net (after coupon) price of the cart to be accessible by php. All of our coupon codes only discount the very first payment, nothing after that, so I want the amount the customer pays upon their initial payment.

Please let me know.

Posted: Thursday Feb 9th, 2012 at 6:32 pm #4688

Okay, thanks!

Posted: Thursday Feb 9th, 2012 at 6:05 pm #4684

Does this still work even though we are using Authorize.net?

Viewing 14 replies - 1 through 14 (of 14 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.