Support » Plugin: WooCommerce » Use Trust Badges in WooCommerce Check Out and Cart Page

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support abwaita a11n

    (@abwaita)

    Hi @gamicord,

    I highly recommend adding such seals using Trust Badge platforms, for instance, here’s one approach – https://trustlock.co/install-trustlock-trust-badge-seals-on-woocommerce/

    That said, the following code modified from this article should display the image on your cart and checkout page respectively. Be sure to use a direct link to your high-resolution image, I just used a placeholder.

    add_action( 'woocommerce_after_cart_totals', 'add_content_on_cart' );
    
    function add_content_on_cart() {
         echo "<img src='https://www.pngfind.com/pngs/m/152-1523847_secure-checkout-png-guaranteed-safe-checkout-stripe-transparent.png' >";  
    }
    
    add_action( 'woocommerce_review_order_after_payment', 'add_content_on_checkout' );
    
    function add_content_on_checkout() {
          echo "<img src='https://www.pngfind.com/pngs/m/152-1523847_secure-checkout-png-guaranteed-safe-checkout-stripe-transparent.png' >"; 
    }

    I recommend adding custom code through the Code Snippets plugin.

    I hope this helps.
    Thanks.

    Thread Starter Gamicord

    (@gamicord)

    Thanks Sir, for your good responses.

    I attempted to follow your statement here:

    I highly recommend adding such seals using Trust Badge platforms, for instance, here’s one approach – https://trustlock.co/install-trustlock-trust-badge-seals-on-woocommerce/

    But it needs me to pay first, when I wanted to Sign Up, as you can see here– https://snipboard.io/u4vKcm.jpg

    For now, that’s not feasible. So I decided to do a manual approach.

    Now, I have achieved what I wanted for my Checkout Page as you can see here– https://snipboard.io/2cT67t.jpg and also achived it for my Cart Page as you can see here– https://snipboard.io/56ofUz.jpg

    What I want now, is to achieve the same thing on my Single Product Page. I mean something like this– https://snipboard.io/xj8ngJ.jpg

    How do I achieve it?

    Regards

    Plugin Support abwaita a11n

    (@abwaita)

    Thanks for getting back.

    But it needs me to pay first, when I wanted to Sign Up, as you can see here– https://snipboard.io/u4vKcm.jpg

    It is the body with the authority to issue these trust seals so I would recommend following their approach.

    What I want now, is to achieve the same thing on my Single Product Page. I mean something like this– https://snipboard.io/xj8ngJ.jpg

    You can modify the code above to display the image on another location but on the product page. Here’s a visual display of hooks for your reference – https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

    For instance, if you want it below the add to cart button, you could use something like:

    add_action('woocommerce_after_add_to_cart_button', 'add_badge_below_cart');
    
    function add_badge_below_cart(){
    	echo "<img src='You_image_URL.png' >"; //add the image url here
    }

    Thanks.

    Thread Starter Gamicord

    (@gamicord)

    Thanks, thanks and thanks a billion for this your reply.

    Although I’ve not tried your code, but I believe you just gave me the solution that I seek.

    From your reply, I will use “woocommerce_after_add_to_cart_button” hook.

    Now I am looking at getting something like this– https://prntscr.com/1qt03vb

    The challenge is that the Images and the Texts are clickable. How do I write this in the code?

    Suppose you want to achieve the exact same thing with the 4 images and clickable links, what would you write? I mean how would the code look like?

    Regards

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @gamicord,

    You can use any HTML in the snippet that @abwaita shared above. You could wrap the img tag in a link with something like this:

    
    echo "<a href="https://yoursite.com"><img src='You_image_URL.png' ></a>";
    

    That would make the image a clickable link pointing to yoursite.com. You can add more lines like that to include additional images/links.

    Plugin Support maykato

    (@maykato)

    Hi @gamicord

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. If you have further questions, please feel free to open a new topic.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.