Jump to content

Paypal Express Checkout With Add To Cart Button


Recommended Posts

Hi everyone,

 

I'm using Prestashop 1.6.1. I'm trying allocate the paypal express checkout button beside to "add to cart" button

 

I have changed this

 

paypal.php : 

public function hookProductActions()
{
$content = (!$this->useMobile()) ? $this->renderExpressCheckoutButton('product') : null;
return $content.$this->renderExpressCheckoutForm('product');
}
and I did add on the contruct function the hook, once this, I go to Module Positions but I cannot change it.
 
Someone can help me please.
 
Thanks in advance.
Edited by Marko1985 (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Solved!
 
Copy from express_checkout_shortcut_button.tpl:

<div id="container_express_checkout" style="float:right; margin: 10px 40px 0 0">
	{if isset($use_mobile) && $use_mobile}
		<div style="margin-left:30px">
			<img id="payment_paypal_express_checkout" src="{$base_dir_ssl|escape:'htmlall':'UTF-8'}modules/paypal/views/img/logos/express_checkout_mobile/CO_{$PayPal_lang_code|escape:'htmlall':'UTF-8'}_orange_295x43.png" alt="" />
		</div>
	{else}
		{if $paypal_express_checkout_shortcut_logo != false}
		<img id="payment_paypal_express_checkout" src="{$paypal_express_checkout_shortcut_logo|escape:'htmlall':'UTF-8'}" alt="" />
		{else}
		<img id="payment_paypal_express_checkout" src="https://www.paypal.com/{$PayPal_lang_code|escape:'htmlall':'UTF-8'}/i/btn/btn_xpressCheckout.gif" alt="" />
		{/if}
	{/if}
	{if isset($include_form) && $include_form}
		{include file="$template_dir./express_checkout_shortcut_form.tpl"}
	{/if}
</div>

and paste in "box cart bottom" section of your product.tpl file.

 

All done! Enjoy

Link to comment
Share on other sites

Solved!

 

Copy from express_checkout_shortcut_button.tpl:

<div id="container_express_checkout" style="float:right; margin: 10px 40px 0 0">
	{if isset($use_mobile) && $use_mobile}
		<div style="margin-left:30px">
			<img id="payment_paypal_express_checkout" src="{$base_dir_ssl|escape:'htmlall':'UTF-8'}modules/paypal/views/img/logos/express_checkout_mobile/CO_{$PayPal_lang_code|escape:'htmlall':'UTF-8'}_orange_295x43.png" alt="" />
		</div>
	{else}
		{if $paypal_express_checkout_shortcut_logo != false}
		<img id="payment_paypal_express_checkout" src="{$paypal_express_checkout_shortcut_logo|escape:'htmlall':'UTF-8'}" alt="" />
		{else}
		<img id="payment_paypal_express_checkout" src="https://www.paypal.com/{$PayPal_lang_code|escape:'htmlall':'UTF-8'}/i/btn/btn_xpressCheckout.gif" alt="" />
		{/if}
	{/if}
	{if isset($include_form) && $include_form}
		{include file="$template_dir./express_checkout_shortcut_form.tpl"}
	{/if}
</div>

and paste in "box cart bottom" section of your product.tpl file.

 

All done! Enjoy

Thanks for the info, but can you specify where we can find these files?

 

Thanks!

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...