• Resolved ans11

    (@ans11)


    I am facing a problem. And the problem is that smart button does not appear in mini cart window when I am in the home page or category page. But it appears in mini cart window when we are on single product page. I want it to appear in mini cart window when I am in home page as well as category page. You can see that there is no smart button in mini cart window when I am in category page or home page at following link:

    But paypal smart button appears in mini cart window when we are in single product page as on following link:

    I am using paypal payment checkout gateway plugin for this smart button.
    Please help me in this regard. Thanks

    • This topic was modified 5 years, 7 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • melinda a11n

    (@melindahelt)

    Automattic Happiness Engineer

    HI there

    The reason for this is that the payment buttons only work on the product pages, cart or checkout page as it requires that content to work.

    The buttons will not load on any other page, homepage, or any of your other content pages.

    Thread Starter ans11

    (@ans11)

    Thank you for your reply.
    Is there any way to add it to the home page and category page.
    Thanks

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @ans11 Most likely the theme is not using the standard mini cart widget to display the cart, which enqueues the needed JavaScript to display the buttons. You would need to enqueue the script on those pages in order for it to work.

    Something like this would make sure it’s enqueued on every page of the site:

    
    function jp_enqueue_paypal_checkout_js() { 
    	wp_enqueue_script( 'wc-gateway-ppec-smart-payment-buttons' );
    }
    add_action( 'template_redirect', 'jp_enqueue_paypal_checkout_js' );
    
    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @ans11 We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Paypal smart button not appears in mini cart window’ is closed to new replies.