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?

Viewing 29 posts - 1 through 29 (of 29 total)
  • Author
    Posts
  • #437627

    chardbraceros
    Participant

    As 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.
    #437776

    Hello,

    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

    #437957

    chardbraceros
    Participant

    I 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.
    #438048

    Hello,

    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

    #438086

    chardbraceros
    Participant

    It did not work the uid seems only for specific product page?can that css code be for all product page?

    #438225

    Hello,

    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.

    #439446

    farah
    Participant

    I 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?

    #439594

    Hello,


    @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

    #439626

    farah
    Participant

    I’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.

    #439642

    farah
    Participant

    WooCommerce 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.
    #439848

    farah
    Participant

    Did you get any on it?

    #439874

    Hello,

    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.

    #439881

    farah
    Participant

    I want to add these Paypal buttons (see screenshot) not the one which you added.

    Attachments:
    You must be logged in to view attached files.
    #439951

    Hello,

    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

    #439956

    farah
    Participant

    I 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.
    #439963

    farah
    Participant

    Hi,

    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.

    #440190

    Hello,

    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.

    #440208

    farah
    Participant

    I 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.

    #440324

    farah
    Participant

    Now 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?

    #440647

    farah
    Participant

    Hi @chardbraceros,

    Could you please help me? I just want to know how you add PayPal smart button on the custom product layout.

    Kind Regards

    #440667

    chardbraceros
    Participant

    i 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.

    #440669

    farah
    Participant

    @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.

    #440678

    Artem Temos
    Keymaster

    Hello @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

    #440682

    farah
    Participant

    @artem where are the mega menu dropdowns?

    #440702

    Artem Temos
    Keymaster

    They might be in the header when you move your mouse over your menu items. Dropdowns that contain products may conflict with the plugin.

    #441064

    farah
    Participant

    @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.

    #441078

    Artem Temos
    Keymaster

    Hello,

    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

    #456661

    chardbraceros
    Participant

    I 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.
    #456692

    Artem Temos
    Keymaster

    Hello,

    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

Viewing 29 posts - 1 through 29 (of 29 total)