Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Location
  • Activity

Recent Profile Visitors

7,748,112 profile views

akashheimlich's Achievements


Newbie (1/14)



  1. If any of you are using express checkout with PayPal and wish to use the OrderInsurance module for shipping which allows you to add a percentage to all items in case of loss of parcels, you can do it by modifying just one file: /modules/paypal/express_checkout/process.php The workaround I found is to add the order insurance as an additional item - not perhaps the neatest way but it works fine. Replace the function initParameters with the following (around line 117): private function initParameters() { if (!$this->context->cart || !$this->context->cart->id) { return false; } $cart_currency = new Currency((int) $this->context->cart->id_currency); $currency_module = $this->getCurrency((int) $this->context->cart->id_currency); if ($cart_currency !== $currency_module) { $this->context->cart->id_currency = $currency_module->id; $this->context->cart->update(); } $this->context->currency = $currency_module; $this->product_list = $this->context->cart->getProducts(true); // Added by Akash on 26/1/18 - add order Insurance as a separate item require(_PS_MODULE_DIR_.'orderinsurance'.DIRECTORY_SEPARATOR.'orderinsurance.php'); $orderInsurance = new OrderInsurance(); $sql = 'SELECT inc.*, o.id_currency, o.total_paid FROM `'._DB_PREFIX_.'orderinsurance_cart` AS inc LEFT JOIN `'._DB_PREFIX_.'orders` o ON (inc.id_cart = o.id_cart) WHERE inc.id_cart='.$this->context->cart->id; $row = Db::getInstance()->getRow($sql); if ($row) { if ($row['active']) { $insurance_amount=$row['amount']; $item=array(); $item['quantity']=1; $item['active']=1; $item['price']=$insurance_amount; $item['price_wt']=$insurance_amount; $item['name']='Seguridad'; $this->product_list[]=$item; } } // end additions by Akash return (bool) count($this->product_list); }
  2. Most likely your permissions are wrong, please check the file permissions and disable write access - suPHP and other hardened PHP setups require this.
  3. christian123, did you read the comment above? You need to change the currency ID in the file before it works. Please post your error message here so we can figure it out.
  4. Can you be more specific? It works fine on my install, did you make sure to check the correct currency ID in the currencies page and paste it into the relevant place in the file?
  5. Many people have complained about not being able to make payments with PayPal when the default shop currency is not supported by PayPal. This often returns a currency not supported error. The only solution so far has been to switch the default currency to something that IS supported but requires changing of all prices in the shop. This replacement file for PayPal module 3.5.8 solves the problem by adding a define called PAYPAL_FORCE_CURRENCY which can be optionally set to the currency ID found in Localization > Currencies. This will then enforce a conversion to the desired currency no matter which store is selected. Just replace the file process.php in modules/payment/paypal/express_checkout/ and at the top of the file modify the PAYPAL_FORCE_CURRENCY to whatever you wish to use. This has been tested and works under Prestashop I have not tested the payment with discounts, so if there are any changes to be made please let me know. I hope this helps everyone who has been hunting for solutions. Enjoy! Akash process.php
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More