HOME › Forums › Support › Automobile Hub Theme
Tagged: cart
hi how to change link for cart on the top menu?
thank you
Hello,
Thanks for choosing us.
You can not change cart link as it is a woocommerce function which navigate on the cart page.
If you have any other query, do let us know.
Thanks
Hi Thank you but I’d like to know which file I need to open and modify ?
Thank you
Hi,
We would suggest you to take backup of your site and modify the code carefully.
Go to theme folder automobile-hub-pro >> template-parts >> header >> top-bar.php code is from line 76 to 96
Thank You
Thank you and happy new year~ I have to let you know first that I don’t know about the writing the code, If I am wrong please excuse me~
Ok, When I click the cart icon top menu it says can not find the page error
So I looked up the line 76 to 96 I think ‘where to url ‘ is missing missing Could you check it for me please? Here is line 76 to 96
/* <?php if ( class_exists( ‘WooCommerce’ ) ) { ?> <div class=”col-lg-2 col-md-2 col-sm-4 cart-btn-box”> <div class=”row contact-topbar”> <?php if(get_theme_mod(‘automobile_hub_pro_header_cart’,true) != ”){ ?> <div class=”col-lg-4″> <?php echo ‘(‘ ?> <?php echo wp_kses_data( WC()->cart->get_cart_contents_count() ); echo ‘ )’?>” title=”<?php esc_html_e( ‘View your shopping cart’,’automobile-hub-pro’ ); ?>”><?php if(function_exists(‘get_cart_total’)){ echo WC()->cart->get_cart_total(); } ?> <span class=”hi_cart”><i class=”fas fa-shopping-cart”></i></span> </div> <div class=”col-lg-8″> <?php if(get_theme_mod(‘automobile_hub_pro_header_cart_text’) != ”){ ?> <span class=”hi_normal”><?php echo esc_html(get_theme_mod(‘automobile_hub_pro_header_cart_text’));?></span> <?php } ?> <div class=”shop-count”> <span class=”cart_no”> <?php echo wp_kses_data( WC()->cart->get_cart_contents_count() );?></span> </div> <?php } ?> </div> </div> </div> <?php } ?> */
Happy New Year to you as well.
Yes, you have given correct code which you have to remove.
We would suggest you to take backup of your site before modify the code.
Copyright@2018. All Right Reserved Themespride