Paypal Express Goes Back To Cart Page

[quote name=‘indy0077’]You should install a ‘clear’ version of CS Cart you want to upgrade to and check the PayPal function if it works properly or not.[/QUOTE]



Indy, thanks for the tip :stuck_out_tongue:



I have already tried on my dev site with the same host and settings, and on this PayPal express works just fine. So there was something in the several upgrade steps from 2.0.13 up to 2.1.1 that broke the functionality.



I have no idea what changed in the upgrade, but something did change to make it not function properly.



Regards,

Aleks

Well im glad it’s not just me then who has this problem. I have genuinely seem a decent in orders placed in my shop since going to paypal standard. Something has definately changed since 2.0.15 to 2.1.x and i would LOVE to know what it is.

[quote name=‘AmitP’]Well im glad it’s not just me then who has this problem. I have genuinely seem a decent in orders placed in my shop since going to paypal standard. Something has definately changed since 2.0.15 to 2.1.x and i would LOVE to know what it is.[/QUOTE]



AmitP,



You could try what i did here to see if it fixes things for you!

[url]http://forum.cs-cart.com/showpost.php?p=96785&postcount=19[/url]

I would be interested to know if it does, at least then I have some more info to take back to CS Cart support if it works for you.



Regards,

Aleks

I would, however i no longer have a paypal_express.php file from 2.0.15 :frowning:

[quote name=‘AmitP’]I would, however i no longer have a paypal_express.php file from 2.0.15 :-([/QUOTE]



I used a clean un-upgraded 2.1.1 paypal_express.php file, not one from an earlier version (sorry, should have said), I don’t know why this should have made a difference but it did.



Regards,

Aleks

cool beans, i’ll get onto this tomorrow and report back to everyone.



Cheers Aleks

I think AleksB and I have cracked it and it is a bug in 2.1.x of CS-CART. I went to admin and unticked "When the customer clicks on any Checkout button/link in the store, redirect to the Cart content page first "



Then I have manually changed checkout.checkout to checkout.cart in the following post [url]http://forum.cs-cart.com/showpost.php?p=75511&postcount=8[/url]



Now everything works as it should after &cc and when pressing place order in paypal with paypal express it now takes me through to checkout.checkout with all the fields filled and immediately going to step_four in checkout.checkout,



people are more than willing to try it out at www.custom-cable.co.uk



Regards

[quote name=‘AmitP’]I think AleksB and I have cracked it and it is a bug in 2.1.x of CS-CART. I went to admin and unticked "When the customer clicks on any Checkout button/link in the store, redirect to the Cart content page first "



Then I have manually changed checkout.checkout to checkout.cart in the following post [url]http://forum.cs-cart.com/showpost.php?p=75511&postcount=8[/url]



Now everything works as it should after &cc and when pressing place order in paypal with paypal express it now takes me through to checkout.checkout with all the fields filled and immediately going to step_four in checkout.checkout,



people are more than willing to try it out at www.custom-cable.co.uk



Regards[/QUOTE]



Yep, I can confirm it works fine on your site now. I just tried a test order.

I will contact CS Cart now and point them to this post so they can see that I was not the only one with this problem.



Regards,

Aleks

I put in a bug report today, you may want to add to it.

Bob

Hi,

I put in a bug report the other day for this problem. The answer was that cs-cart support can not reproduce the problem and want to know the steps to reproduce the problem.

I don’t use PayPal Express, so if anyone wants to have this problem solved, please contribute to the bug report, [QUOTE][url]http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=2215[/url][/QUOTE]

Thanks,

Bob

Cs-Cart posted a fix in Bug Tracker today and is requesting that it be checked and let them know.

Bob

i think the code might be working. it now brings me to step 3. Payment and Shipping .



But I have a problem:



Unfortunately, no shipping options are available for your location.

Please contact us and we will see about delivering to you.



This problem is because the state/province is not auto filled in with the information from paypal.



The Step 2 billing address has it all populated correctly, but if I click on CHANGE ADDRESS I can see the State/province field says SELECT STATE.



It does not have this problem if I am using a US address that has a STATE. If I use canadian address it will have this problem.



Using the US address I now can click on the orange place ORDER BUTTON so the code in the bug tracker fix probably works.

Purelife,

I updated the bug report with your problem. CS-CART is looking into it.

Bob

they gave me a code yesterday to fix into paypal_express.php. it fixed the no shipping options are available for your location problem for me.



all is well now! :stuck_out_tongue:

[quote name=‘purelife’]they gave me a code yesterday to fix into paypal_express.php. it fixed the no shipping options are available for your location problem for me.



all is well now! :p[/quote]

Hi, would you pls post the fix here on the forum to help another users with the same problem?



Thanks

below is the code they gave me. note* it is only for fixing problem of “Unfortunately, no shipping options are available for your location. Please contact us and we will see about delivering to you.”



this error is probably only for people who accept orders with canadian addresses using paypal express



paypal_express.php file, located in the “payments” directory



replace code


}
$address = array (
's_firstname' => $s_firstname,
's_lastname' => $s_lastname,
's_address' => $result['address']['Street1'],
's_address_2' => !empty($result['address']['Street2']) ? $result['address']['Street2'] : '',
's_city' => $result['address']['CityName'],
's_county' => $result['address']['StateOrProvince'],
's_state' => $result['address']['StateOrProvince'],
's_country' => $result['address']['Country'],
's_zipcode' => $result['address']['PostalCode']
);




with


}
$s_state = $result['address']['StateOrProvince'];
$s_state_codes = db_get_hash_array("SELECT ?:states.code, lang_code FROM ?:states LEFT JOIN ?:state_descriptions ON ?:state_descriptions.state_id = ?:states.state_id WHERE ?:states.country_code = ?s AND ?:state_descriptions.state = ?s", 'lang_code', $result['address']['Country'], $s_state);
if (!empty($s_state_codes[CART_LANGUAGE])) {
$s_state = $s_state_codes[CART_LANGUAGE]['code'];
} elseif (!empty($s_state_codes)) {
$s_state = array_pop($s_state_codes);
$s_state = $s_state['code'];
}
$address = array (
's_firstname' => $s_firstname,
's_lastname' => $s_lastname,
's_address' => $result['address']['Street1'],
's_address_2' => !empty($result['address']['Street2']) ? $result['address']['Street2'] : '',
's_city' => $result['address']['CityName'],
's_county' => $result['address']['StateOrProvince'],
's_state' => $s_state,
's_country' => $result['address']['Country'],
's_zipcode' => $result['address']['PostalCode']
);




also have to restore the SQL file on the “Database” page of your administration panel. The link to this page is in the “Administration” tab. the file to restore is named paypal_express.sql



contents of that file is:



REPLACE INTO cscart_state_descriptions (state_id, lang_code, state) VALUES (‘146’, ‘EN’, ‘Quebec’);

REPLACE INTO cscart_state_descriptions (state_id, lang_code, state) VALUES (‘148’, ‘EN’, ‘Yukon’);