Home › Forums › WoodMart support forum › What php file is this sidebar cart ?
What php file is this sidebar cart ?
- This topic has 7 replies, 2 voices, and was last updated 5 years, 7 months ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
September 16, 2019 at 8:57 am #144182
pogopieParticipantHello where do I find the php file for this sidebar cart on mobile phone?
Attachments:
You must be logged in to view attached files.September 16, 2019 at 9:45 am #144205
Aizaz Imtiaz AwanKeymasterHello,
You have to customize the mini-cart.php file under wp-content/themes/woodmart/woocommerce/cart as per your requirements.
Best Regards.
September 16, 2019 at 10:16 am #144214
pogopieParticipantThanks, 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.
September 16, 2019 at 11:57 am #144258
Aizaz Imtiaz AwanKeymasterHello,
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/kxd62i3Best Regards.
September 16, 2019 at 12:51 pm #144278
pogopieParticipantCool, 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 ?
September 16, 2019 at 1:00 pm #144286
Aizaz Imtiaz AwanKeymasterMost 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.
September 16, 2019 at 1:44 pm #144304
pogopieParticipantOh, now it seems like it works fine, must have been the caches.
ThanksSeptember 16, 2019 at 1:50 pm #144306
Aizaz Imtiaz AwanKeymasterSound’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. -
AuthorPosts
The topic ‘What php file is this sidebar cart ?’ is closed to new replies.
- You must be logged in to create new topics. Login / Register