Dom Sudan II 0 Posted January 30, 2015 Posted January 30, 2015 I have installed the Paypal module. I am getting this error: The link you have used to enter the PayPal system contains an incorrectly formatted item amount. When I go to click the checkout button and expect to be take to the Paypal page. My analysis leaves me to believe that the Paypal module or cart.php code has a bug in it and requires a fix. For every product that has PRICE RULES (aka Discounts) on products, this error is happening. Prestashop version is 1.6.0.11 PayPal USA, Canada v1.3.8 Any assistance would be greatly appreciated. Share this post Link to post Share on other sites
tdr170 679 Posted February 25, 2015 Posted February 25, 2015 This issue still exist in the just released 1.6.0.13 have bug reports but no one seems to be in a hurry to fix it. Share this post Link to post Share on other sites
thumper338 0 Posted March 7, 2015 Posted March 7, 2015 This issue occurred for me with % discount in volume pricing. Changing to fixed discount worked. I haven't yet tested % coupons to see if it behaves the same way. Share this post Link to post Share on other sites
lecairelinens 1 Posted March 9, 2015 Posted March 9, 2015 (edited) I originally posted a solution here but that solution with combined issues with express check out, it creates more problems with the final order status. So I am removing it. Edited March 13, 2015 by lecairelinens (see edit history) 1 Share this post Link to post Share on other sites
web-port.pl 6 Posted March 21, 2015 Posted March 21, 2015 Can you send this solution ? Share this post Link to post Share on other sites
chvchd 1 Posted April 1, 2015 Posted April 1, 2015 I have the same issue on PS 1.6.0.14 any leads on this problem ? Share this post Link to post Share on other sites
finlanderid 5 Posted April 5, 2015 Posted April 5, 2015 (edited) My shop is in USA. PS 1.6.0.14 clean install, everything working fine. Using default PayPal USA module that came with PS 1.6.0.14. I allow GBP and EURO in the shop, in addition to USD. I only get this error if the customer transfers to PayPal with GBP or EURO. If the customer transfers to PayPal with USD in the cart, everything is fine. Also, it doesn't matter if the item in the cart is discounted or not. The error on GBP and EURO occurs for all items. The error does not occur for USD on any items. The error must have something to do with the PayPal USA module being designed for USD. Even though a customer in a foreign country (non-USA country) can pay with his own currency after arriving at PayPal, the transfer has to be done in USD. There must be some restriction placed on the transferring currency. The PayPal Europe module does not place a restriction on the transferring currency. However, an older PayPal Europe module that I used with PS 1.4.11.0 added the state sales tax to the item sub-total, rather than making it a separate line-item. No big deal, but having the tax on a separate line, after the customer arrives at PayPal, was nice. So, either disable GBP and EURO in my shop, and use the PayPal USA module that line-items tax, OR revert to the PayPal Europe module, keep GBP and EURO in the shop, and lose separate line-item for tax after transfer to PayPal. Does anyone know if the PS developers are working on a fix? Edited April 5, 2015 by finlanderid (see edit history) Share this post Link to post Share on other sites
finlanderid 5 Posted April 8, 2015 Posted April 8, 2015 (edited) In standard.tpl, about line 45, just use Smarty to format the float to two decimal places. Tested and worked flawlessly with USD, GBP and EUR, both to and from paypal.com (including purchase). Remember to re-compile or else you won't see the effect. Change this: <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|floatval}" /> To this: <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|floatval|number_format:2}" /> Edited April 8, 2015 by finlanderid (see edit history) 1 Share this post Link to post Share on other sites
crowder.dr 1 Posted June 3, 2015 Posted June 3, 2015 In standard.tpl, about line 45, just use Smarty to format the float to two decimal places. Tested and worked flawlessly with USD, GBP and EUR, both to and from paypal.com (including purchase). Remember to re-compile or else you won't see the effect. Change this: <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|floatval}" /> To this: <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|floatval|number_format:2}" /> Works perfectly thanks for the fix ! 1 Share this post Link to post Share on other sites
casys123 0 Posted June 8, 2015 Posted June 8, 2015 Can you please explain step by step....thanks Share this post Link to post Share on other sites
casys123 0 Posted June 8, 2015 Posted June 8, 2015 i did it..Thanks a lot..... Share this post Link to post Share on other sites
Samanta88 0 Posted June 19, 2015 Posted June 19, 2015 thank finlanderidit realy nice. Issue Solve Share this post Link to post Share on other sites
sakhihosting 1 Posted August 2, 2015 Posted August 2, 2015 change this code In modules/paypalusa/views/templates/hook/standard.tpl, just use Smarty to format the float to two decimal places. Tested and worked with USD, GBP and EUR. Change this: <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|floatval}" /> To this: <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|floatval|number_format:2}" /> Share this post Link to post Share on other sites
Recommended Posts