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.

Paypal Buttons result in slow-loading pages

Home Forums Community Forum Paypal Buttons result in slow-loading pages

This topic contains 9 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 1 month ago.

Topic Author Topic
Posted: Sunday Nov 4th, 2012 at 8:12 pm #30613

Hi there,

I’ve noticed that when I add paypal “buynow” buttons to my page, it drastically slows down the loading time of the page that they are on.

Is this a known issue?

Thanks!

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Monday Nov 5th, 2012 at 5:50 pm #30698
Raam Dev
Username: Raam
Staff Member

Hi Scott,

I have not observed this or heard of it before. Do you have a test page that you could show us as an example?

Also please download this Server Check Tool, upload the PHP file to your WordPress directory, and then load the URL to the file in your browser. It will run a bunch of tests to determine if there’s anything amiss on the server-side.

Posted: Thursday Nov 8th, 2012 at 9:31 pm #31086

Hi Raam,

Apologies for not replying back sooner. I’ve done this, how do I find the results?

Thanks

Posted: Friday Nov 9th, 2012 at 4:09 am #31107

I’ve done this, how do I find the results?

Once you uploaded the PHP file to the WP directory, open it in your browser, the results will be displayed there.

I’ve noticed that when I add paypal “buynow” buttons to my page, it drastically slows down the loading time of the page that they are on.

Could you try the suggestions in this article? Knowledge Base » Common Troubleshooting Tips

Please let us know how it goes. :)

Posted: Friday Nov 9th, 2012 at 12:52 pm #31154

Ahh.. I see. Ran the test and all shows up to be good!

In fairness, there are quite a few buttons involved. This page http://www.nowsayit.com/learn-more can be sluggish at times, but isn’t too bad.

The page which is very slow is the my-account page which has logic to determine which renew/membership buy now buttons to display, meaning that there are 20+ buttons coded on the page (only 8-10 would display at any time based on membership level.)

I would assume that there must be some call being made to paypal based on the button shortcode? Hence, more buttons the longer it takes to load?

Posted: Saturday Nov 10th, 2012 at 8:00 am #31207

Right, each shortcode gets parsed when the page is loaded, and it gets slower if you’re using button encryption.

If these will always be shown to new users, not logged in members, then you could create the buttons over at PayPal, integrated with s2Member follow these instructions: Knowledge Base » Using PayPal created buttons

Those would not work to upgrade existing accounts, since no account info is included in those buttons, while using the shortcodes adds the logged in user’s account info to the button.

Posted: Monday Nov 12th, 2012 at 11:08 am #31320

Thanks Cristian,

The internal page (the slowest) unfortunately is all upgrading/renew options so there’s not much I can do about that (Other then to eventually move to PayPal Pro and proforms.)

I think I will make the switch for the public (member options) page though. I went through the link you sent above, but I’m missing one thing. Using Paypal to generate the buttons (Buy Now), how can I stipulate the length of the purchase as I can with s2member. I didn’t see that in the documentation.

Thanks!

Posted: Monday Nov 12th, 2012 at 7:24 pm #31387
Raam Dev
Username: Raam
Staff Member

Hi Scott,

When you create PayPal-hosted buttons, I believe you get to choose the type of button you’re creating. If you choose a Subscription button, it will ask you for details about the length of the subscription.

If you’re not sure about how to create a PayPal-hosted buttons, I recommend checking the PayPal help section.

Posted: Monday Nov 12th, 2012 at 8:41 pm #31397

The internal page (the slowest) unfortunately is all upgrading/renew options so there’s not much I can do about that (Other then to eventually move to PayPal Pro and proforms.)

In order to avoid all those shortcodes in the page, you could instead have a link with a var for the shortcode, and have a hack that’ll parse the shortcode when the link is clicked, that way only one shortcode gets parsed. Use output URL to do the redirection.

Create /wp-content/mu-plugins/s2hacks.php

[hilite pre_code]
'[first shortcode output="url"]',
2 => '[second shortcode output="url"]',
);
if (isset($_GET['button']) && isset($shortcodes[$_GET['button']]))
wp_redirect(do_shortcode($shortcodes[$_GET['button']]));
}
[/hilite]

Then the links would be your site’s URL with [hilite mono]?button=1[/hilite] at the end. http://yoursite.com/?button=1

I hope that helps.

Posted: Tuesday Nov 13th, 2012 at 10:59 pm #31535

Made an edit to the code to add something I missed before.

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