Forum Replies Created
My mistake. My example was for wp simple paypal shopping cart, but I was asking about wp eStore, where variations are coded on the Add/Edit Products page. Same idea, though.
Thanks for the quick response. I will test this:
[wp_cart_button name = “T-Shirt-shipped-nt” price=”20.00″ var1=”Size|XS|S|M|L|XL|2XL|3XL|4XL” var2=”Handling|Yes|2.00″ shipping=”1.00″ ]
That would not give them a choice, but it would charge and document the handling fee, which is what I am trying to do.
Problem solved. The redirect to PayPal is now successful.
Fix was to create a rewrite rule in the IIS web.config file to append a / to the WordPress directory (here named /wp) when eStore did not include that:
<httpErrors errorMode=”Detailed” />
<rule name=”SpecificRewrite” stopProcessing=”true”>
<match url=”^wp$” />
<action type=”Rewrite” url=”wp/” />
Correction — I can add rewrite rules to the web.config file. I am so used to Linux and Apache that I forgot this about IIS.
This solution would be better than modifying eStore code. Will try and report results.
I try not to modify purchased apps and plugins, but I am running out of ideas. Could you tell me what php file is running when I click on Check out with PayPal? I can add the / to the URL and it is likely to work on my server.
Note the requested URL is domain.tld/wp followed by ? and parameters. But I am running on a GoDaddy shared Windows server running IIS, and I do not have the ability to create rewrite rules. So IIS looks for a page wp inside the root HTML directory. But what we want is for IIS to look inside the /wp/ directory, where it would find WordPress’ index.php and all would be well.
This could be made to work, as is, if I could create IIS rewrite rules, but I can’t on this shared server. I could also make it work if I could modify the eStore code that generates this redirect to PayPal.
I suspect the eStore code works perfectly on 99+% of the servers, including IIS configured to rewrite the URL to append the / after the /wp directory. I do plan to move to a Linux server running Apache in the future, but I am stuck on IIS for now.
Could you point me to the eStore php script that is invoked when I click on the “Check out with PayPal” that is placed when I use the shortcode [wp_eStore_cart_when_not_empty] or [wp_eStore_cart]?
That would cover me until I can move to another server, when I would remove that mod.
Regarding POST, the site was originally written using classic ASP where there are many working forms with method=”POST”. And there are many WordPress plugins that use POST and they all work on this server.
I also checked with GoDaddy tech support. This hosting account does not have any page caching, CDN or other settings that would block POSTs. Also, I do not have any WP caching plugins installed.
As you can see from the URL that shopping cart posted, there was an attempt to pass parameters to the directory /puliclub.org/wp, but with no trailing /, this looked like a page named wp. If the POST had been to /puliclub.org/wp/ (with a trailing /), then IIS would have looked for one of the standard default pages like index.html, index.php etc. and when finding one of those, would have loaded that and passed the parameter string to that page.
So that redirect works when the action URL refers to a directory with trailing /.
Looking at a post by dnesmith at
the user found source which I have not yet found:
<form action="<homepage>?eStore_checkout=process&eStore_gateway=manual" method="post">
<input type="hidden" name="eStore_gateway" id="eStore_gateway" value="manual">
If I could find the php source similar to above that generates the page that is failing, I would change it to append a / after the homepage directory and before the ? paramater string. This would fix my problem.
But I assume the real problem is not with the eStore code, but my server environment. I had hoped by changing the WP HOME or SITEURL variables to have the trailing / after wp, I would fix the problem, but WP would not allow me to make that change.
When all of the production .ASP pages have been rewritten to WP and plugins like WP eStore, I plan to change to a Linux server, but for now I’m stuck with IIS. So I’m hoping we can find a fix for the current environment. Thanks.
Scroll down to one of the 4 “products” and click Add to Cart. Then click Checkout with PayPal. Assuming you get the error also, you can insert a / just before the ? and the redirect to PayPal works.
Originally, I had set Dashboard > Settings > General Settings > WordPress Address to [http://puliclub.org/wp] and the same for Site Address. Everything on the site was working until this error.
So I changed both above addresses to have a trailing / after wp, but WordPress would not save that. I even added the following to wp-config.php:
but that did not fix the problem.