Home Forums WoodMart support forum Add html Block in the cart page

Add html Block in the cart page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #240571

    dweb360
    Participant

    Hello
    Please see attached image
    I want to add an html block at the bottom of the cart page

    Thank you

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

    Hello,

    Unfortunately, it is not possible to add to the bottom. You can create a custom sidebar and set in the page settings and then add the HTML block in the sidar: https://xtemos.com/docs/woodmart/options-for-pages/

    Best Regards

    #240663

    dweb360
    Participant

    Hello
    I just added
    [html_block id="10940"]
    in the cart page via Elementor and seems working
    please see attached image

    What I’m doing worong?

    Thank you

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

    Hello,

    It is ok, if you have any problems, remove all the content from the functional pages.

    Best Regards

    #240749

    dweb360
    Participant

    Hello
    I finally add this code to my child theme

    
    add_action( 'woocommerce_after_cart_table', 'emabllage_cart_page' );
     
    function emabllage_cart_page(){
    
    	if (sizeof( WC()->cart->get_cart() ) > 0 ) { 
           echo do_shortcode( '[html_block id="10940"]' );	
         }	
    }
    

    It working but i don’t know if you can help me
    When I empty the cart and click “update the cart” button, the html block is not removed until i refresh the page

    Do I need to add a code to refresh the cart page?

    Thank you in advance

    #240864

    Hello,

    You are trying to add content to the places where is not designed to be added. We have not tied this case with Woocommerce as it is not covered by our support. That is why we can hardly suggest a solution.

    Best Regards

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