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.

Coupon field won't show to logged-out users

Home Forums Community Forum Coupon field won't show to logged-out users

This topic contains 8 replies, has 2 voices. Last updated by  Martin Taylor 3 years, 10 months ago.

Topic Author Topic
Posted: Thursday Feb 28th, 2013 at 9:22 pm #43443

I’m using Pro-Forms with PayPal Express Checkout. I want to:
(1) show the Coupon Code field (I’ve set the shortcode to accept_coupons=”1″) and
(2) hide the user password fields (because password will be emailed) and billing address details
(3) have the “Checkout with PayPal” button showing, rather than the plain “Submit form” button

I’ve generated a Level 1 shortcode to do this and it works exactly as it should when I’m logged in. But when I visit the form as a new (logged-out) user, there is no Coupon Code field and all password and billing fields display.

I’ve also tried adding this CSS snippet:

div.s2member-pro-paypal-form-billing-method-section {display: none !important;}

to both the theme’s custom css panel and via a style tag directly to the registration page above the shortcode.

Here is the registration page. http://digitalpublishing101.com/resources/signup-for-digital-marketing-101/

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Saturday Mar 2nd, 2013 at 7:11 am #43588

Hi Martin.

Could you show me the shortcode for the pro-form? Do you just have paypal as the option to pay?

Billing address should not be shown if PayPal is the payment method chosen. Please test for a plugin or theme conflict: Knowledge Base » Common Troubleshooting Tips

I hope that helps. :)

Posted: Sunday Mar 3rd, 2013 at 12:11 am #43653

Hi Cristian

I’ve deactivated each plugin, and switched the theme to 2011. Same problem. PayPal is the only payment option. Here’s the shortcode.

[s2Member-Pro-PayPal-Form level="1" ccaps="dm101" desc="Digital Marketing 101 for Ebooks - Course fee (includes 4 months access)" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="digitalpublishing101.com" ta="0" tp="0" tt="D" ra="147" rp="4" rt="M" rr="BN" rrt="" rra="2" accept="paypal" accept_via_paypal="paypal,visa,mastercard,amex,discover,maestro,solo" coupon="" accept_coupons="1" default_country_code="" captcha="0" /]
Posted: Tuesday Mar 5th, 2013 at 7:47 pm #43817

Thanks Martin.

Could you try this?

[[s2Member-Pro-PayPal-Form level="1" ccaps="dm101" desc="Digital Marketing 101 for Ebooks - Course fee (includes 4 months access)" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="digitalpublishing101.com" ta="0" tp="0" tt="D" ra="147" rp="4" rt="M" rr="BN" rrt="" rra="2" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="1" default_country_code="" captcha="0" /]]

And remove the [hilite code]display: none !important;[/hilite] style. s2Member doesn’t display that block anymore when PayPal is the only option. http://wordpress.org/extend/plugins/s2member/changelog/

From v121201:
(s2Member Pro) Feature Enhancement. s2Member Pro Forms integrated ONLY with PayPal Express Checkout ([hilite mono]accept="paypal" accept_via_paypal="paypal"[/hilite]), will no longer display a Billing Method section on the Pro Form, as it’s not necessary (there’s only one possible option in this case, and it’s already depicted by the PayPal button at the bottom of the Pro Form). Many site owners had implemented CSS hacks to hide this section of a Pro Form configured this way, based on this FAQ article. This hack is no longer necessary – starting with this release.

That said, there’s definitely a JavaScript conflict causing the pro-form to fail. Try typing different passwords in the password fields, the strength indicator doesn’t change at all.

Did you really deactivate every plugin and the theme, and refreshed the page with the pro-form and test after each? If you did, did you also test with a clean installation of WordPress with just s2Member to see if you could reproduce the problem?

I looked at the Console in Firefox while loading the page and there are some JS warnings, but there was also an error in a line of JS at the bottom of the page, for stats.

[18:40:41.049] ReferenceError: st_go is not defined @ http://digitalpublishing101.com/resources/signup-for-digital-marketing-101/:876
[hilite pre_code]
st_go({v:'ext',j:'1:2.2',blog:'41117190',post:'7483',tz:'0'});
[/hilite]

Not sure if that’s what’s causing the conflict, but it’s worth investigating.

I hope that helps!

Posted: Wednesday Mar 6th, 2013 at 5:00 am #43845

Thanks, Cristian. I’ve added the new shortcode and removed the CSS. I’ve also set up a clean install (multisite on sub-domain http://cleantestsite.digitalpublishing101.com) and tested with only s2Member and 2011 theme. Unfortunately, the problem is still there. I had tested the site with all plugins disabled, as well as checking plugins (deactivate/refresh site) one-by-one but have repeated it, changing theme and deactivating all plugins except s2Member. Same result.

A quick Google indicates the faulty JS code seems to belong to WordPress.com stats, now JetPack. I’ve had an earlier theme conflict with this plugin so it’s not a complete surprise. That said, I’ve disabled it (and VaultPress which I also use) with no improvement.

I noticed this 404 error generated by s2member-o.php. Any clues here?

"NetworkError: 404 Not Found - http://cleantestsite.digitalpublishing101.com/wp-content/plugins/s2member/s2member-o.php?ws_plugin__s2member_js_w_globals=1&qcABC=1&ver=130221-130221-1320189116"

Sorry, I wish this was easier to solve. Can PM login if required.

Posted: Friday Mar 8th, 2013 at 7:39 am #44066

That’s odd, because the CSS did load: http://cleantestsite.digitalpublishing101.com/wp-content/plugins/s2member/s2member-o.php?ws_plugin__s2member_css=1&qcABC=1&ver=130221-130221-1320189116

Did you check with your webhost why the JS one may not be loading? The file is the same, only the vars change. Maybe something in the server is preventing it to load?

Posted: Monday Mar 11th, 2013 at 6:13 pm #44284

Hi Cristian. I’ve contacted HostGator. This is their reply:

Hello, 

Failed to load resource: the server responded with a status of 404 (Not Found) http://digitalpublishing101.com/wp-content/plugins/s2member/s2member-o.php?ws_plugin__s2member_js_w_globals=1&qcABC=1&ver=130221-130221-1892291018 
Viewport argument value "1.0;" for key "initial-scale" was truncated to its numeric prefix. http://digitalpublishing101.com/:151 
Viewport argument value "1.0;" for key "maximum-scale" was truncated to its numeric prefix. http://digitalpublishing101.com/:151 

It could however still be the code as it is still relying on the same php plugin physical files. 

I've disabled register_globals as you are using PHP 5.3 and it has been deprecated. 

I also tried adding in another debug feature which is 

define('CONCATENATE_SCRIPTS', false); 
to no effect. 

Have you enabled WP_DEBUG to see what is happening under the hood. 

I'm not seeing anything to indicate this is a server issue. 

The fact that the cleantestsite has the css but the normal site one wont load could indicate a settings issue but wouldnt indicate a server issue. 

I turned on WP_DEBUG and have posted the results for the signup page here:
http://cleantestsite.digitalpublishing101.com/wp_debug-errors-to-s2member-pro-paypal-signup-form/

Does anything stand out?

Posted: Wednesday Mar 13th, 2013 at 1:17 pm #44503

No, nothing. Those are just notices, nothing that’ll breaking the script…

What’s strange is that both the CSS and JS rely on the same file with just variable changes, but one works and the other doesn’t.

Do you have another webhost account that you can try this with? Although I’ve seen other site owners using HostGator without this problem coming up before.

Posted: Thursday Mar 14th, 2013 at 4:33 pm #44648

Thanks, Cristian. At this stage, I’m not sure whether to invest in a test install on another host or changing membership systems. I’m reluctant to switch since S2Member is all set up and excellent in every other respect. I’ll let you know how I get on with either option. Appreciate your help so far.

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

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.