Home › Forums › Themes Support › Claue › i want to display cart amount in header
- This topic has 9 replies, 2 voices, and was last updated 4 years, 2 months ago by
Harry.
-
AuthorPosts
-
-
December 14, 2020 at 3:50 pm #39592
hi,
i want to display cart amount beside the cart logo in header.
Thanks.
-
December 14, 2020 at 4:13 pm #39593
Hi Smohdsalimansari,
Thank you for choose our theme.
By default our theme support show cart amount next to cart icon https://prnt.sc/w28frq
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 14, 2020 at 4:19 pm #39594
its showing total number of cart item with the cart icon.
but i want to show total amount (price) after the cart icon.
check the attached image
Attachments:
You must be logged in to view attached files. -
December 14, 2020 at 4:42 pm #39596
Hi,
Please copy file layout-x.php from wp-content > themes > claue > views > header to wp-content > claue-child > views > header
and replace code
echo jas_claue_wc_shopping_cart();
with below code
echo '<a class="cb chp hidden-xs" href="' . esc_url( wc_get_cart_url()) . '" title="' . esc_html__( 'View your shopping cart', 'claue' ) . '"><i class="pe-7s-shopbag"></i>'; echo '<span class="pa count bgb br__50 cw tc">' . esc_html( $woocommerce->cart->get_cart_contents_count() ) . '</span>'; echo '</a>'; echo wp_kses_post( WC()->cart->get_cart_subtotal() );
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 14, 2020 at 5:01 pm #39597
got too many errors after adding this
-
December 14, 2020 at 5:23 pm #39598
Can you send me FTP account to check?
I try on my local it still work well.
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 14, 2020 at 5:39 pm #39599
check the file i wont be able to provide the ftp details now..
-
This reply was modified 4 years, 2 months ago by
smohdsalimansari.
Attachments:
You must be logged in to view attached files. -
This reply was modified 4 years, 2 months ago by
-
December 14, 2020 at 5:55 pm #39602
Hi,
Please change code to
global $woocommerce; echo '<a class="cb chp hidden-xs" href="' . esc_url( wc_get_cart_url()) . '" title="' . esc_html__( 'View your shopping cart', 'claue' ) . '"><i class="pe-7s-shopbag"></i>'; echo '<span class="pa count bgb br__50 cw tc">' . esc_html( $woocommerce->cart->get_cart_contents_count() ) . '</span>'; echo '</a>'; echo wp_kses_post( WC()->cart->get_cart_subtotal() );
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 14, 2020 at 7:20 pm #39603This reply has been marked as private.
-
December 16, 2020 at 8:33 am #39617
Hi,
This option will off Ajax update so you have to refresh the page to update changing.
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio
-
-
AuthorPosts
You must be logged in to reply to this topic.