Home › Forums › WoodMart support forum › How to show paypal button in custom single product page template?
How to show paypal button in custom single product page template?
- This topic has 28 replies, 4 voices, and was last updated 1 year, 8 months ago by Artem Temos.
-
AuthorPosts
-
January 25, 2023 at 8:53 am #437627
chardbracerosParticipantAs title says i cant figure it out how to show paypal buttons under add to cart on our single product page
Attachments:
You must be logged in to view attached files.January 25, 2023 at 4:36 pm #437776
Aizaz Imtiaz AwanKeymasterHello,
If you are using Custom Single Product layout on your Site for the Product pages, then you might need to ask the Plugin Support in this regard that if they can provide you with some Shortcode or any other way to use them under the Custom layout because as you know the PayPal button is by default isn’t offered by the Theme or the WooCommerce itself. You need to install the Plugin to show it.
So, please try to contact the Plugin Support in this regard the way as mentioned above. Hope they can provide you with some insight in this regard.
Best Regards
January 26, 2023 at 11:49 am #437957
chardbracerosParticipantI got it working but can you pls atleast help me aligning it? because its a little bit overflowing on the left side.
Attachments:
You must be logged in to view attached files.January 26, 2023 at 4:44 pm #438048
Aizaz Imtiaz AwanKeymasterHello,
Please try using the below Custom CSS code and paste it to Dashboard >> Theme Settings >> Custom CSS >> Global CSS section:
#zoid-paypal-buttons-uid_665a0a442d_mti6mzq6mze > iframe { left: 10px !important; width: 98% !important; top: 10px !important; }
Hope this works out for you!
Best Regards
January 26, 2023 at 6:43 pm #438086
chardbracerosParticipantIt did not work the uid seems only for specific product page?can that css code be for all product page?
January 27, 2023 at 9:56 am #438225
Aizaz Imtiaz AwanKeymasterHello,
Sorry to say but right now as we are seeing your Products, the PayPal seems not to be showing.
Could you please enable it again if it is disabled or if there are certain Products showing it then kindly share those Product URLs with us so that we can better check this and assist you accordingly.
Best Regards.
February 1, 2023 at 9:52 am #439446
farahParticipantI have the same issue Paypal payment buttons are available on the default theme but not on the woodmart theme. So how to show it on a single product page? Is there any hook for it?
February 1, 2023 at 4:26 pm #439594
Aizaz Imtiaz AwanKeymasterHello,
@farah: Sorry to hear about the inconvenience. Kindly, please share your Site WP-ADMIN Login details in the Private Content field so that we can check this concern on your Site and help you out accordingly.Best Regards
February 1, 2023 at 5:08 pm #439626
farahParticipantI’m using a custom single-product layout design. In my staging website, I switch the theme and it displays a Paypal button on a single product page. On the PayPal plugin page, there is a code mentioned to show PayPal buttons on the single product page, but I don’t know where to add it. I don’t even they are related to this issue or not.
Another thing is when I removed the custom layout design on the woodmart theme it display Paypal buttons but on the elementor editor page not on the live page, strange.
February 1, 2023 at 5:48 pm #439642
farahParticipantWooCommerce PayPal Payments URL: https://woocommerce.com/document/woocommerce-paypal-payments/#faq-paypal-smart-buttons-not-loading
Attachments:
You must be logged in to view attached files.February 2, 2023 at 12:29 pm #439848
farahParticipantDid you get any on it?
February 2, 2023 at 2:06 pm #439874
Aizaz Imtiaz AwanKeymasterHello,
As far as we have checked the Custom Single Product layout created on your Site > the PayPal button element isn’t added which comes through the plugin you are using on your Site: https://snipboard.io/nRGI8U.jpg
So, we have added that in your Custom Layout and it shows the button now on the Single Product page. You need to configure its options under the Custom Single Product layout for the added element.
Please check back your Site after completely clearing browser and server cache.
Best Regards.
February 2, 2023 at 2:30 pm #439881
farahParticipantI want to add these Paypal buttons (see screenshot) not the one which you added.
Attachments:
You must be logged in to view attached files.February 2, 2023 at 5:00 pm #439951
Aizaz Imtiaz AwanKeymasterHello,
Then you would need to ask the PayPal plugin support to provide you with a HTML Code snippet (not the PHP script for the function.php file) which you can add under the Custom Product layout. If they don’t have any right now, then you might need to disable the Custom Product layout and use the default WooCommerce Single Product layout because the Theme isn’t responsible for the Payment button. It is coming from the third party Plugin. Hope you can understand !
Best Regards
February 2, 2023 at 5:18 pm #439956
farahParticipantI already wrote an email to them (see screenshot).
And when I disable the custom product layout and use the default WooCommmerce single product layout the Paypal smart button still does not appear. But on my staging website when I switched the theme to the default theme the Paypal smart buttons showed up. Now I don’t understand where is the problem. If you want to check my staging website I can give you my credentials.
I need to solve this issue ASAP. Please help me resolve it.
Attachments:
You must be logged in to view attached files.February 2, 2023 at 5:50 pm #439963
farahParticipantHi,
I found the HTML Code by watching this video: https://www.youtube.com/watch?v=A750NenORJE . And after designing the Paypal smart buttons on Paypal I got the code and added it to my live website on the custom product layout page. But while loading the page buttons showed up for a little time and then disappears!!! Now I don’t understand where is the problem.
February 3, 2023 at 1:13 pm #440190
Aizaz Imtiaz AwanKeymasterHello,
It looks like the plugin adds its custom button on the single product page using the standard WooCommerce hook. When you create a custom layout with Elementor it doesn’t contain any default elements and hooks. It contains only those elements that you added with Elementor manually.
We have a special “Hook” element in Elementor that you can place to your custom layout and then the plugin will be able to add its custom content there. But we don’t know which one exactly it needs. You can either try to select all hooks one by one or contact plugin developers for help.
Regarding the Custom Code that you are using to show the buttons, we can’t say much about that because it is not generated by the Theme itself. So, maybe there is some issue with the code you are using because it is not getting generated when the Product preview is checked and there is an Error being generated with the code under the Elementor editor too: https://snipboard.io/Rmw6Dp.jpg
Best Regards.
February 3, 2023 at 1:23 pm #440208
farahParticipantI tried every single woocommerce hook and none of them is working for Paypal smart buttons. When I switch to the default theme on the staging website the Paypal smart button appears. And these smart buttons also not working with the default woocommmerce single product page on the woodmart theme.
February 3, 2023 at 8:40 pm #440324
farahParticipantNow I found another thing the HTML code which I added to the custom product layout is working everywhere on the website except on the product pages!!! Is it an elementor page builder problem?
February 6, 2023 at 7:28 am #440647
farahParticipantHi @chardbraceros,
Could you please help me? I just want to know how you add PayPal smart button on the custom product layout.
Kind Regards
February 6, 2023 at 9:44 am #440667
chardbracerosParticipanti just add this code to woodmart function.php
add_filter(‘woocommerce_paypal_payments_single_product_renderer_hook’, function() {
return ‘woocommerce_after_add_to_cart_form’;
});But its has major problem for me, it doesnt work properly on pc but on mobile it work and on some android phone it doesnt work too just keep on loading and does nothing. So i decided to disable it for now. But will definitely go back to it coz that button really helpful for faster transaction.
February 6, 2023 at 9:50 am #440669
farahParticipant@chardbraceros thanks for your reply
I added PayPal smart buttons via HTML code on the custom product layout and it has the same problem. It appears while the page is loading and then disappears.
February 6, 2023 at 10:12 am #440678
Artem TemosKeymasterHello @farah,
This plugin may not work in case you display multiple products on the product page before the actual single product. Try to do the following to fix this:
1. Remove all the products elements from the mega menu dropdowns.
2. Disable the “Products navigation” option in Theme Settings -> Single product -> Elements.
Kind Regards
February 6, 2023 at 10:16 am #440682February 6, 2023 at 10:48 am #440702
Artem TemosKeymasterThey might be in the header when you move your mouse over your menu items. Dropdowns that contain products may conflict with the plugin.
February 7, 2023 at 2:40 pm #441064
farahParticipant@artem thanks for your help. I removed the “Products navigation” option in Theme Settings -> Single product -> Elements and also did the same for the custom product layout, and then the smart Paypal buttons appear on my website. Now the question is why it has an issue with the product navigation element? What if I also want to display product navigation, because this element is very helpful for customer ease.
hey @chardbraceros, you can do the same maybe it also works for you. But yeah you may need some CSS code to fix the size of the buttons on the single product page.
February 7, 2023 at 3:07 pm #441078
Artem TemosKeymasterHello,
The problem is that the plugin takes the first product on the page and not exactly the product which is actually a single product currently displayed. We can’t do anything in this case.
Kind Regards
April 3, 2023 at 1:19 pm #456661
chardbracerosParticipantI put back the paypal button again on our site. And the position still the same, it still overlap a little bit on the left side. Can you pls help us fix its position or size to be the same as add to cart to all single product page?
Thanks
Attachments:
You must be logged in to view attached files.April 3, 2023 at 2:34 pm #456692
Artem TemosKeymasterHello,
1. Try to edit the add-to-cart element and disable quantity option https://take.ms/HKcgj
2. In this element, go to advanced and set margin-left to 0 https://take.ms/Wp5wL
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register