wp-e-commerce / WP-e-Commerce

WP eCommerce - The most popular independent eCommerce platform for WordPress
https://wpecommerce.org
GNU General Public License v2.0
215 stars 217 forks source link

Local Shipping Charge Does Not Carry Over to Paypal #1461

Open reactor88 opened 10 years ago

reactor88 commented 10 years ago

Hi- I was directed ray-instinct to log a shipping issue I was having. It's in regards to upgrading my wpec plug-in from 3.1.8.13.3 to 3.1.8.14.1 and the Flat rate shipping and it's interaction with Paypal Standard. In the new version the per product Local Shipping Fee is not being carried over to Paypal once a user submits the WPEC checkout form.

I currently only have Flat rate shipping enabled and charge a base local fee in addition to a per product local shipping fee.

The reproduce steps are:

  1. add item to cart and head to the checkout page.
  2. select shipping options (country/state) and calculate shipping. Notice the shipping cost is correct (shows base local + local shipping fee)
  3. fill out user info form
  4. submit checkout page

Expected: Site redirects to Paypal and reflects product price and full shipping price (base local + product local shipping fee)

Result: Site redirects to Paypal and reflects product price and incorrect full shipping price (only shows base local and not additional product local shipping fee)

Site Config: WPEC 3.1.8.14.1 WordPress 3.9.1 Apache 2.2.22 w/ php 5.3.27 I am not using WordPress multisite I currently don't have a site this issue can be seen on as I have rolled back to WPEC 3.1.8.13.3 so my store will work properly.

mihaijoldis commented 10 years ago

Hey there, We have a fix for that in 3.9.14.1. Update to the latest versions then if you can apply these file changes: https://github.com/wp-e-commerce/WP-e-Commerce/pull/1448/files

reactor88 commented 10 years ago

I tried that PR once before, but I'll give it another shot today...

rcrippen-cars commented 10 years ago

FYI I'm commenting from my work account, but this is "reactor88" :)

So I tried everything today and I'm still having the same issues that I mentioned over in the WPEC Support forum. I'll outline everything here.

First off, I did the auto update inside of WP Admin to upgrade WPEC 3.1.8.13.3 to 3.1.8.14.1, and then manually applied the changes in: https://github.com/wp-e-commerce/WP-e-Commerce/pull/1448/files To clarify how I updated these files, I opened them individually on my server and did a full copy paste of the changed files on Github and pasted the entire chunk of code into my live files. I then deactivated and reactivated the plug-in through WP Admin.

One thing I found odd was this file: https://github.com/JeffPyeBrook/WP-e-Commerce/blob/78a36197d832099224aa36eee1105039bbe023a5/wpsc-components/theme-engine-v1/helpers/ajax.php

The updated file contains 1205 lines of code, while the original file from 3.8.14.1 only has 1172. Since only 3 lines of code were deleted and 2 lines were added, something doesn't seem right there? Maybe that's the root of all the problems I'm having trying to test this pull request...

Anyway, here's what's happening now during checkout with the applied changes on 3.8.14.1:

When I first get to the checkout page in the “Calculate Shipping Price” section, it’s showing me the correct shipping price. But oddly it also is displaying the text “Sorry, shipping quotes could not be calculated with the details provided. Please double check your shipping address details.” (see Fig 1)

shipping-fig-1

As soon as I select the country drop down that pre-calculated shipping cost disappears and I get the red error message “Please click the Calculate button to refresh your shipping quotes, as your shipping information has been modified.” (see Fig 2)

shipping-fig-2

Then when I select my state and press the Calculate button the shipping price comes back, but the country drop down in the calculate shipping section is now blank. (see Fig 3)

shipping-fig-3

I’ll continue along with the rest of the form and when I get to the shipping address I select “same shipping address” checkbox. At that point the page autoscrolls back to the calculate shipping section with the red error message: “Please click the Calculate button to refresh your shipping quotes, as your shipping information has been modified.” I can understand that happening if my billing address didn’t match the calculate shipping country/state I entered above, but since it was the same I think selecting that checkbox must be an error right? (see Fig 4)

shipping-fig-4

Once I recalculate that and proceed to continue to paypal, I’m thrown this shipping error message saying “Please select one of the available shipping options, then we can process your order.” Since I'm only using flat rate shipping, there are no shipping options to select, so I just get stuck in this loop and never get to Paypal. (see Fig 5)

shipping-fig-5

Also regarding your comment about turning off the "enable shipping" in the WPEC admin, that kind of defeats the whole purpose of my issue right? Or did you tell me that to test something else? Either way I turned it off and as expected I had no shipping on my checkout...

Hopefully this info helps!

mihaijoldis commented 10 years ago

Hey Can you mail me your FTP and wp-admin logins to mihai @ instinct.co.nz (remove spaces) I will take a look and see what i can do.

reactor88 commented 10 years ago

Hey Misulicus- I need to fix a few things on my database (unrelated) first, but I'm also heading out for the weekend so I'll get you the info on Monday- thanks!

mihaijoldis commented 10 years ago

If possible setup a staging site and send over the details to that and i can work on that and not mess wit the live site.

reactor88 commented 10 years ago

Hey there- it seems this issue with my database is a bigger deal than I thought. When I was rolling back and forth between 3.1.8.13.3 and 3.1.8.14.1 the pages in my store got messed up (a new "products-page suddenly appeared) and I was getting 404 errors- rolling back to a DB backup before I started testing didn't fix it either. Anyway I'm trying to start my main store pages over from scratch (of course I don't remember all my tweaks and things) so it may take a lot longer than I hoped to get you something set up so you can investigate the original issue...