If you have followed my previous Prestashop Inside Joomla, iframe with autoheight cross domains, you know how to have Prestashop in an iframe on your joomla website.

However Paypal prevents payment from within iframes (foor good security reasons), so you might think that's it is impossible to use that payment option. Rest assured it is not.

paypalprestashop
The trick is to get out of the iframe, just before reaching Paypal payment page.

 Here is how to get the standard provided paypal module from Prestashop to work in an iframe.

On your Prestashop FTP go to the following path:

/modules/paypal/views/templates/hook

paypaliframe01

And edit express_checkout_payment.tpl

You want to change 3 lines, by adding the following: target=”_top” inside the <a> and <form> tags:

Line 31 becomes:

<a href="javascript:void(0)" onclick="$('#paypal_payment_form').submit();" id="paypal_process_payment" title="{l s='Pay with PayPal' mod='paypal'}" target="_top">

Line 56 becomes:

<a href="javascript:void(0)" onclick="$('#paypal_payment_form').submit();" id="paypal_process_payment" title="{l s='Pay with PayPal' mod='paypal'}" target="_top">

Line 73 becoms:

<form id="paypal_payment_form" action="{$base_dir_ssl}modules/paypal/express_checkout/payment.php" data-ajax="false" title="{l s='Pay with PayPal' mod='paypal'}" method="post" target="_top">

Don’t forget to save the express_checkout_payment.tpl document after making the modifications.
That’s it, now you can use the Paypal option for payments in Prestashop from your iframe.