Home › Forums › Themes Support › Claue › i want to display cart amount in header
- This topic has 9 replies, 2 voices, and was last updated 3 years, 4 months ago by Harry.
-
AuthorPosts
-
-
December 14, 2020 at 3:50 pm #39592smohdsalimansariSupport Expired
hi,
i want to display cart amount beside the cart logo in header.
Thanks.
-
December 14, 2020 at 4:13 pm #39593HarrySupport Expired
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 #39594smohdsalimansariSupport Expired
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 #39596HarrySupport Expired
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 #39597smohdsalimansariSupport Expired
got too many errors after adding this
-
December 14, 2020 at 5:23 pm #39598HarrySupport Expired
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 #39599smohdsalimansariSupport Expired
check the file i wont be able to provide the ftp details now..
- This reply was modified 3 years, 4 months ago by smohdsalimansari.
Attachments:
You must be logged in to view attached files. -
December 14, 2020 at 5:55 pm #39602HarrySupport Expired
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 #39603smohdsalimansariSupport ExpiredThis reply has been marked as private.
-
December 16, 2020 at 8:33 am #39617HarrySupport Expired
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.