Home Forums WoodMart support forum What php file is this sidebar cart ?

What php file is this sidebar cart ?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #144182

    pogopie
    Participant

    Hello where do I find the php file for this sidebar cart on mobile phone?

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

    Hello,

    You have to customize the mini-cart.php file under wp-content/themes/woodmart/woocommerce/cart as per your requirements.

    Best Regards.

    #144214

    pogopie
    Participant

    Thanks, when i add this this code

    echo "Průměrná objednávka trvá 50 sekund <i class="fa fa-clock-o"></i><br>
    		Odesíláme do 24 hodin <i class="fa fa-truck"></i><br>
    		Záruka na všechny produkty 2 roky <i class="fa fa-calendar-check-o"></i>"

    in like this

    <div class="shopping-cart-widget-footer<?php echo ( WC()->cart->is_empty() ? ' woodmart-cart-empty' : '' ); ?>">
    	<?php if ( ! WC()->cart->is_empty() ) : ?>
    
    		<?php if ( function_exists( 'WC' ) && version_compare( WC()->version, '3.7.0', '<' ) ) : ?>
    			<p class="woocommerce-mini-cart__total total"><strong><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?>:</strong> <?php echo WC()->cart->get_cart_subtotal(); ?></p>
    		<?php else : ?>
    			<p class="woocommerce-mini-cart__total total">
    				<?php
    				/**
    				 * Woocommerce_widget_shopping_cart_total hook.
    				 *
    				 * @hooked woocommerce_widget_shopping_cart_subtotal - 10
    				 */
    				do_action( 'woocommerce_widget_shopping_cart_total' );
    				?>
    				
    			</p>
    		<?php endif; ?>
    		
    		<?php do_action( 'woocommerce_widget_shopping_cart_before_buttons' ); ?>
    
    		<p class="woocommerce-mini-cart__buttons buttons"><?php do_action( 'woocommerce_widget_shopping_cart_buttons' );
    		echo "Průměrná objednávka trvá 50 sekund <i class="fa fa-clock-o"></i><br>
    		Odesíláme do 24 hodin <i class="fa fa-truck"></i><br>
    		Záruka na všechny produkty 2 roky <i class="fa fa-calendar-check-o"></i>"
    		;?></p>
    		<?php do_action( 'woocommerce_widget_shopping_cart_after_buttons' ); ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'woocommerce_after_mini_cart' ); ?>
    </div>

    I am not able to add anything to my cart, so where do I put that ? I want it to be shown bellow the buttons.

    #144258

    Hello,

    You can write your custom code after the end of if-else condition of the empty cart. At line# 103 in the wp-content\themes\woodmart\woocommerce\cart >> mini-cart.php

    You can check the below screenshot. I have added a button in the sidebar to set an example for you.

    Code in the file: https://screenshot.net/kjyexfd
    Result:https://screenshot.net/kxd62i3

    Best Regards.

    #144278

    pogopie
    Participant

    Cool, thanks how do I break a line ? It seems like I am not able to with the <br> tag neither with seperate <span>. I tried to put them in a div with class but was not able to find the class. So how should I do this ?

    #144286

    Most Welcome,

    You can use the
    tag outside the div to break the line. You can share a screenshot of that page. So i can help you out.

    Best Regards.

    #144304

    pogopie
    Participant

    Oh, now it seems like it works fine, must have been the caches.
    Thanks

    #144306

    Sound’s Really Great!..

    Feel Free to write back if you need further assistance, I’ll be more than happy to help you out.

    Have a Fantastic Day.

    Topic Closed.
    Best Regards.

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

The topic ‘What php file is this sidebar cart ?’ is closed to new replies.