donnytkc Posted January 7, 2013 Share Posted January 7, 2013 (edited) Hi, Prestashop Masters Just a quick question, how can i move paypal express checkout button from my product footer to product actions section ?i just add: public function hookProductActions() { return $this->renderExpressCheckoutButton('product').$this->renderExpressCheckoutForm('product'); } into paypal_abstract.php but it doesnt work, it seems nearly correct but i just can't figure it out .... any people have any ideas ? thanks in advanced Edited January 7, 2013 by donnytkc (see edit history) 1 Link to comment Share on other sites More sharing options...
shacker Posted January 10, 2013 Share Posted January 10, 2013 after this, you need to go to modules, positions and transplant the module to this hook 1 Link to comment Share on other sites More sharing options...
bissio Posted November 17, 2014 Share Posted November 17, 2014 Hi all, i did the modify described to move the express paypal button and it works, but no action are set clicking on paypal button. I mean it seems that button has no actions. Thanks Link to comment Share on other sites More sharing options...
shacker Posted November 17, 2014 Share Posted November 17, 2014 site url? Link to comment Share on other sites More sharing options...
bissio Posted November 17, 2014 Share Posted November 17, 2014 Hi, follows below a product url. As you can see the button is visible (cursor pointer as css) and placed on product action hook, but if you click on it, nothing happens http://www.wellnessglobalservice.com/en/depilatory-wax-promotions/1022237-cosmetic-wax-honey-liposoluble-400-ml.html Thanks Link to comment Share on other sites More sharing options...
printerink Posted November 18, 2014 Share Posted November 18, 2014 For Prestashop 1.5.4 This will move ( Express Checkout ) button to above ( Add to Cart ) button and keep it mobile responsive etc. It worked for me anyway!!! You can go to my site at printink.com.au and click on any product to see where it is placed. SO..., Go to modules/paypal/paypal.php IN paypal.php SCROLL DOWN TO FIND: /** * Hooks methods */ THEN INSERT THIS CODE DIRECTLY BELOW: public function hookProductActions(){$content = (!$this->context->getMobileDevice()) ? $this->renderExpressCheckoutButton('product') : '';return $content.$this->renderExpressCheckoutForm('product');} THEN GOTO TRANSPANT MODULE AND TRANSPLANT PAYPAL MODULE INTO HOOK BELOW: displayProductButtons (product page actions) THEN GOTO MODULES THEN POSITIONS in Back Office scroll down to Product Footer Hook and click trashcanlogo to remove PAYPAL MODULE from Product Footer Hook 4 Link to comment Share on other sites More sharing options...
bissio Posted November 19, 2014 Share Posted November 19, 2014 Hi, i did what you suggested, and the button is correctly visible, but nothing appears clicking on it (you can take e look at: http://www.wellnessglobalservice.com/en/depilatory-wax-promotions/1022237-cosmetic-wax-honey-liposoluble-400-ml.html). My PS version is 1.5.6.2 and Paypal module is: 3.8.0. Thanks Link to comment Share on other sites More sharing options...
bissio Posted November 19, 2014 Share Posted November 19, 2014 Hi, i think i solved the problem. I just moved the $HOOK_PRODUCT_ACTIONS in product.tpl over the Cart form. Thanks Link to comment Share on other sites More sharing options...
shacker Posted November 20, 2014 Share Posted November 20, 2014 thanks for sharing. Link to comment Share on other sites More sharing options...
stylepop Posted December 1, 2014 Share Posted December 1, 2014 Hi, i think i solved the problem. I just moved the $HOOK_PRODUCT_ACTIONS in product.tpl over the Cart form. Thanks Can you elaborate a bit more on what you did here? I have 1.6.0.9 and have the same issue not being able to get a response when the button is clicked. I found $HOOK_PRODUCT_ACTIONS in product.tpl in two places: The first was this line, which was just above the <form id="buy_block"> line: {if ($product->show_price && !isset($restricted_country_mode)) || isset($groups) || $product->reference || (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)} I moved it so that it was contained inside of the form but nothing changed, it still cannot be clicked on. The second was this line, which appears inside the form just before the closing </form> tag: {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} I haven't tried removing the PayPal Express module from the footer hook yet though, is that also part of the problem? Link to comment Share on other sites More sharing options...
bissio Posted December 1, 2014 Share Posted December 1, 2014 Hi Stylepop, yes first of all you should delete the footer product hook and then link the module on product Action hook (after you have put this function on paypal.php). Then you should move this line: {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} over the cart form tag (</form>). Clear the cache on your site and try. Bye 1 Link to comment Share on other sites More sharing options...
mbrodrigues Posted December 4, 2014 Share Posted December 4, 2014 HelloThe joint solution of "printerink" and "bissio", worked perfectly for me.Thank you both for sharing your knowledge. 1 Link to comment Share on other sites More sharing options...
stylepop Posted December 11, 2014 Share Posted December 11, 2014 Hi Stylepop, yes first of all you should delete the footer product hook and then link the module on product Action hook (after you have put this function on paypal.php). Then you should move this line: {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} over the cart form tag (</form>). Clear the cache on your site and try. Bye Hi bissio, My Paypal module is version 3.7.2 with Presta 1.6.0.9 and when I try to click "update" to get the 3.8 version like you say you have, it does not show it as having any updates available. I however updated the paypal.php to include the hookProductActions() function, then transplanted the module into displayProductButtons() and removed from productFooterHook(). I moved the line {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} from it's original location to just over the </form> tag and cleared the cache but it didn't work. I took a look at the source and firefox showed it in red with a message saying that it does not support nested <form> tags. I then moved the line so it was underneath the </form> tag and while I do not get the error anymore, I still cannot click on the link! Any more suggestions? Could you take a quick look at stylepop.com.au ? Thanks so much for your assistance! Link to comment Share on other sites More sharing options...
bissio Posted December 11, 2014 Share Posted December 11, 2014 Hi stylepop, honestly i do not know exactly if these actions work on ps 1.6.x themes (i guess yes), however you should install Paypal version 3.8.1 first of all. Also, the "hookProductActions()" is not included into this version but you have to put it manually inside the paypal.php file (read the top of this thread). Bye Link to comment Share on other sites More sharing options...
mbrodrigues Posted December 11, 2014 Share Posted December 11, 2014 Hi, I can confirm. This solution works in Prestashop 1.6.0.9, with the new Paypal module V.3.8.1.Note that I use the defaultbootstrap theme. stylepop about Paypal module update, also not appeared to me any indication update available, so I had to do the manual mode.That is, I completely deleted the previous Paypal module and installed the new module V.3.8.1 Link to comment Share on other sites More sharing options...
PabloJoy Posted January 21, 2015 Share Posted January 21, 2015 Hello Stylepop, i have prestashop 1.6.0.9 (default theme) and i had the same problem that you, and the solution of changed {HOOK_ACTION_PRODUCT} didnt worked for me (i see the button but i cant click). After more of 7 hours searching the solution i solved the problem. I went to my shopping cart and i see that these paypal button is worked. Then i open firebug and compare the two bottoms and found the answer. The paypal button of the shopping cart have one line more and i tryed to run in the bottom of products pages and is working! Thats the line, but you have to catch then in your firebug because have info for your web: <form id="paypal_payment_form" action="http://www.example.com/modules/paypal/express_checkout/payment.php" title="Pay with PayPal" method="post" data-ajax="false"> You have to put that in modules/paypal/views/template/hook/express_checkout_shortcut_button.tpl just in the end, over this </div> <div class="clearfix"></div>. I hope that work for you, bye Link to comment Share on other sites More sharing options...
shacker Posted February 5, 2015 Share Posted February 5, 2015 i tested in your site and works fine. Link to comment Share on other sites More sharing options...
protechtrader Posted February 8, 2015 Share Posted February 8, 2015 Hello all, Would anyone be able to tell me how to apply this to the Paypal USA version? The file mentioned (paypal.php) does not even exists in the USA module. It seems to have a total different format, and I assume I can not use the Europe module. Link to comment Share on other sites More sharing options...
shacker Posted February 10, 2015 Share Posted February 10, 2015 wich version of the module you have? Link to comment Share on other sites More sharing options...
trevorgilligan Posted May 7, 2015 Share Posted May 7, 2015 hi folks, in modules / paypal you get this option twice it seems: Choose Express Checkout and Express Checkout shortcut Offer your customers a 3-click checkout experience what difference do they both make to PS? Also i have both set to yes, however it shows me a paypal type button, but i cant click it. anyone who wants to get this to work needs to modify code? thank you have a nice day Link to comment Share on other sites More sharing options...
trevorgilligan Posted May 7, 2015 Share Posted May 7, 2015 sorry for replying twice, quick update. i had the paypal button but could not click. to sort this modules -> positions you should have it in displayheader. sorry if i am going over this if someone else has done it Link to comment Share on other sites More sharing options...
trevorgilligan Posted May 11, 2015 Share Posted May 11, 2015 @printerink just to let you know on your site if you type in a number on a product such as 10 , rather than 1, it gives error when you click paypal button. Link to comment Share on other sites More sharing options...
trevorgilligan Posted May 11, 2015 Share Posted May 11, 2015 hi me again so adding code to paypal.php, express checkout button.php , hook onto product actions, all this worked. and i still have 2 paypal buttons, the top one works fine the bottom doesnt click. however if i remove from product footer hook, then i have 1 paypal button and that doesnt work. anyway a) to get them both to work or remove bottom button so top button works? thank you Link to comment Share on other sites More sharing options...
shacker Posted May 11, 2015 Share Posted May 11, 2015 check if your paypal is the latest version 3.8.x Link to comment Share on other sites More sharing options...
trevorgilligan Posted May 12, 2015 Share Posted May 12, 2015 yes it is, thanks @shacker Link to comment Share on other sites More sharing options...
trevorgilligan Posted May 12, 2015 Share Posted May 12, 2015 hi @printerink just wondering did you have to do anything else to any files, or hooks to get paypal express to work on mobile? cant seem to get it working, thank you. Link to comment Share on other sites More sharing options...
qiqiy_888 Posted August 14, 2015 Share Posted August 14, 2015 Hi Stylepop, yes first of all you should delete the footer product hook and then link the module on product Action hook (after you have put this function on paypal.php). Then you should move this line: {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} over the cart form tag (</form>). Clear the cache on your site and try. Bye Hi Dear Bissio, can you kindly tell me how to " link the module on product Action hook " ? i am new..\ thank you so much Link to comment Share on other sites More sharing options...
qiqiy_888 Posted August 14, 2015 Share Posted August 14, 2015 Sorry bissio, i know that now, thank you :~) Link to comment Share on other sites More sharing options...
afshop Posted December 15, 2015 Share Posted December 15, 2015 hi me again so adding code to paypal.php, express checkout button.php , hook onto product actions, all this worked. and i still have 2 paypal buttons, the top one works fine the bottom doesnt click. however if i remove from product footer hook, then i have 1 paypal button and that doesnt work. anyway a) to get them both to work or remove bottom button so top button works? thank you Hi, I added the paypal module in the hook ('productActions') the button appears and it is clickable while the button in the productFooter is not clickable. Only 1 button works correctly. I add also the button of paypal express in the blockcart, it works but the buttons in the shopping cart doesn't work. Ps.1.6.08 and Paypal 3.10.2 How do you solve it? Many thanks Angela I add the paypal button in the product Link to comment Share on other sites More sharing options...
qiqiy_888 Posted January 25, 2016 Share Posted January 25, 2016 Add some JS in your product.js, do like this : Open the product.js file /themes/YOURTHEME/js/product.js Find this code: $(document).ready(function() { var url_found = checkUrl(); } then add the js like this: $(document).ready(function() { var url_found = checkUrl(); $('#payment_paypal_express_checkout').insertAfter('#add_to_cart'); $('#payment_paypal_express_checkout').css('float', 'right'); $('#payment_paypal_express_checkout').css('margin-top', '10px'); $('#container_express_checkout').hide(); } Works perfect for me ! 1 Link to comment Share on other sites More sharing options...
fantastef Posted January 31, 2016 Share Posted January 31, 2016 add also this $('#payment_paypal_express_checkout').css('margin-left', '60px'); looks beter! Thanks! qiqiy_888 Link to comment Share on other sites More sharing options...
CarpalWatch.com Posted February 28, 2016 Share Posted February 28, 2016 Ok, works now. Check it out on my webstore : http://www.carpalwatch.com/shop Had to add target="_blank" in xXX_form.tpl to make it work in quick view...Anyone knows how to close quick view and load the form? Steps: 1) Add the following above hookProductFooter() - Not sure if that affects it but nevertheless. public function hookProductActions() { $content = (!$this->useMobile()) ? $this->renderExpressCheckoutButton('product') : null; return $content.$this->renderExpressCheckoutForm('product'); } Save the file. 2) Add target="_blank" in <form> in express_checkout_shortcut_form.tpl 3) Remove {if isset($include_form) && $include_form} /if> in express_checkout_shortcut_button.tpl 3) Go to Transplant a module and hook Paypal to DisplayProductButtons 4) Remove Paypal from DisplayFooterProduct 5) Clear Cache and good luck! Link to comment Share on other sites More sharing options...
zklid Posted April 7, 2016 Share Posted April 7, 2016 Hello, following this post I was able to move paypal express checkout button from my product footer to product actions section, under the cart button on product page. But I have a problem with quick view function: the paypal express checkout button appears in the quick view but it does not work. Link to comment Share on other sites More sharing options...
vucumbra Posted October 9, 2016 Share Posted October 9, 2016 Hi Stylepop, yes first of all you should delete the footer product hook and then link the module on product Action hook (after you have put this function on paypal.php). Then you should move this line: {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} over the cart form tag (</form>). Clear the cache on your site and try. Bye not work for me Link to comment Share on other sites More sharing options...
gritstonecycles Posted March 22, 2017 Share Posted March 22, 2017 Hi, I've made this mod and it works for me apart from a couple of hicups. 1. The button doesn't appear on mobiles 2. If you click on the button in quick view it works but if you cancel the transaction at the paypal screen it doesn't return you to the your site properly. You get the quick view pop up as a full page with no way to navigate off it. Any suggestions welcome. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now