Your account expired support, please renew to get your support.

Home Forums Themes Support Claue Disable Minicart

  • This topic has 18 replies, 2 voices, and was last updated 4 years ago by anj.
Viewing 18 reply threads
  • Author
    Posts
    • #39273
      anj
      Support Expired

      Hi I would like to completely disable minicart.

       

      For example when I click the shopping cart icon on the menu it should redirect me to the cart page instead of the mini cart popping up

      This is my website

       

       

    • #39278
      Harry
      Support Expired

      Hi,

      Please go to WooCommerce > Settings > Products > Add to cart behavior > and uncheck 2 last fields.

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #39289
      anj
      Support Expired

      Hi

       

      The minicart still works. When I click on the shopping bag button it leads me to the minicart and not to the Cart page.

    • #39297
      anj
      Support Expired

      this code does not disable the minicart when I click on the shopping bag icon. I want it to go to the cart page not the mini cart slider.

       

      if ( ! function_exists( ‘jas_claue_wc_shopping_cart’ ) ) { function jas_claue_wc_shopping_cart() { global $woocommerce; // Catalog mode $catalog_mode = cs_get_option( ‘wc-catalog’ ); if ( $catalog_mode ) return; $output = ”; $output .= ‘

      ‘; return apply_filters( ‘jas_claue_wc_shopping_cart’, $output ); } }

       

      I am not using a child theme. I am directly using the theme.

    • #39306
      Harry
      Support Expired

      Hi,

      Please install child theme and add below code to claue-child > fucntions.php

      if ( ! function_exists( 'jas_claue_wc_shopping_cart' ) ) {
      	function jas_claue_wc_shopping_cart() {
      		global $woocommerce;
      		
      		// Catalog mode
      		$catalog_mode = cs_get_option( 'wc-catalog' );
      
      		if ( $catalog_mode ) return;
      
      		$output = '';
      		$output .= '<div class="jas-icon-cart pr">';
      			$output .= '<a class="cart-contents pr cb chp db" href="'. WC()->cart->get_cart_url().'" title="' . esc_html( 'View your shopping cart', 'claue' ) . '">';
      				$output .= '<i class="pe-7s-shopbag"></i>';
      				$output .= '<span class="pa count bgb br__50 cw tc">' . esc_html( $woocommerce->cart->get_cart_contents_count() ) . '</span>';
      			$output .= '</a>';
      		$output .= '</div>';
      		return apply_filters( 'jas_claue_wc_shopping_cart', $output );
      	}
      }

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #39313
      anj
      Support Expired

      It still does not work.

      My website is https://littleluxurycloset.com/

       

       

    • #39425
      anj
      Support Expired

      Hi do you have any update on this?

    • #39427
      Harry
      Support Expired

      Hi,

      Sorry we miss your reply.

      Please change code to

      function jas_claue_child_wc_shopping_cart() {
      	global $woocommerce;
      	
      	// Catalog mode
      	$catalog_mode = cs_get_option( 'wc-catalog' );
      
      	if ( $catalog_mode ) return;
      
      	$output = '';
      	$output .= '<div class="jas-claue-icon-cart pr">';
      		$output .= '<a class="cart-contents pr cb chp db" href="'. WC()->cart->get_cart_url().'" title="' . esc_html( 'View your shopping cart', 'claue' ) . '">';
      			$output .= '<i class="pe-7s-shopbag"></i>';
      			$output .= '<span class="pa count bgb br__50 cw tc">' . esc_html( $woocommerce->cart->get_cart_contents_count() ) . '</span>';
      		$output .= '</a>';
      	$output .= '</div>';
      	return apply_filters( 'jas_claue_child_wc_shopping_cart', $output );
      }

      and copy file from claue > views > header > layout-4.php to claue-child > views > header and change code on line 73

      from

      jas_claue_wc_shopping_cart

      to

      jas_claue_child_wc_shopping_cart

      Btw, your support expired. Please renew your support at https://themeforest.net/item/claue-clean-minimal-woocommerce-theme/18929281 that will help us continue develop new features and improve our theme.

      Thank and regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #39429
      anj
      Support Expired

      Hi it disabled the minicart, however it does not redirect to the cart, the shopping just refreshes the page.

       

      I have removed the code for now.

    • #39432
      Harry
      Support Expired

      I check on my local it work well. Please send me admin account to check.

      Thanks

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #39441
      anj
      Support Expired
      This reply has been marked as private.
    • #39443
      Harry
      Support Expired

      Hi,

      I see you did not copy file from claue > views > header > layout-4.php to claue-child > views > header

      Please copy file and change code on line 73

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #39447
      anj
      Support Expired

      I have changed the code and the shopping cart icon is not redirecting me to the cart page. So I reverted the change first.

    • #39464
      anj
      Support Expired

      Hi I have renewed support for another 6 months.

       

      Any updates on this?

    • #39465
      Harry
      Support Expired

      Hi,

      Please change code on header > views > layout-4.php to

      <?php
      /**
       * The header layout 4.
       *
       * @since   1.0.0
       * @package Claue
       */
      ?>
      <header id="jas-header" class="header-4" <?php jas_claue_schema_metadata( array( 'context' => 'header' ) ); ?>>
      <?php if ( cs_get_option( 'header-top-left' ) || cs_get_option( 'header-top-center' ) || cs_get_option( 'header-top-right' ) || cs_get_option( 'header-currency' ) ) : ?>
      	<div class="header__top bgbl pt__10 pb__10 pl__15 pr__15 fs__12">
      		<?php if ( cs_get_option( 'header-boxed' ) ) : echo '<div class="jas-container">'; endif; ?>
      			<div class="jas-row middle-xs">
      				<div class="jas-col-md-4 jas-col-sm-6 jas-col-xs-12 start-md start-sm center-xs">
      					<?php if ( cs_get_option( 'header-top-left' ) ) : ?>
      						<div class="header-text"><?php echo do_shortcode( cs_get_option( 'header-top-left' ) ); ?></div>
      					<?php endif; ?>
      				</div>
      				<div class="jas-col-md-4 jas-col-sm-6 jas-col-xs-12 center-md end-sm center-xs">
      					<?php if ( cs_get_option( 'header-top-center' ) ) : ?>
      						<div class="header-text"><?php echo do_shortcode( cs_get_option( 'header-top-center' ) ); ?></div>
      					<?php endif; ?>
      				</div>
      				<div class="jas-col-md-4 jas-col-sm-3 jas-col-xs-12 flex end-lg end-md hidden-sm hidden-xs">
      					<?php if ( cs_get_option( 'header-top-right' ) ) : ?>
      						<div class="header-text mr__15"><?php echo do_shortcode( cs_get_option( 'header-top-right' ) ); ?></div>
      					<?php endif; ?>
      					<?php
      						if ( class_exists( 'WooCommerce' ) && cs_get_option( 'header-currency' ) ) {
      							echo jas_claue_wc_currency();
      						}
      					?>
      				</div>
      			</div><!-- .jas-row -->
      		<?php if ( cs_get_option( 'header-boxed' ) ) : echo '</div>'; endif; ?>
      	</div><!-- .header__top -->
      <?php endif; ?>
      	<div class="header__mid pl__15 pr__15<?php echo ( cs_get_option( 'header-transparent' ) ? ' header__transparent pa w__100' : '' ); ?>">
      		<?php if ( cs_get_option( 'header-boxed' ) ) : echo '<div class="jas-container">'; endif; ?>
      			<div class="jas-row middle-xs pt__10 pb__10">
      				<div class="jas-col-md-2 jas-col-sm-3 jas-col-xs-3 flex start-md flex">
      					<a href="javascript:void(0);" class="jas-push-menu-btn hide-md visible-sm visible-xs">
      						<?php
      							if ( cs_get_option( 'mobile-icon' ) ) :
      								$icon = wp_get_attachment_image_src( cs_get_option( 'mobile-icon' ), 'full', true );
      								echo '<img src="' . esc_url( $icon[0] ) . '" width="30" height="30" alt="Menu" />';
      							else :
      								echo '<img src="' . JAS_CLAUE_URL . '/assets/images/icons/hamburger-black.svg" width="30" height="16" alt="Menu" />';
      							endif;
      						?>
      					</a>
      					<div class="hidden-xs hidden-sm">
      						<?php echo jas_claue_social(); ?>
      					</div>
      				</div>
      				<div class="jas-col-md-8 jas-col-sm-6 jas-col-xs-6 center-xs">
      					<?php jas_claue_logo(); ?>
      				</div>
      				<div class="jas-col-md-2 jas-col-sm-3 jas-col-xs-3">
      					<div class="jas-action flex end-xs middle-xs">
      						<?php if ( cs_get_option( 'header-search-icon' ) ) : ?>
      							<a class="sf-open cb chp hidden-xs" href="javascript:void(0);" title="<?php echo esc_html__( 'Search', 'claue' ); ?>"><i class="pe-7s-search"></i></a>
      						<?php endif; ?>
      						
      						<?php
      							if ( class_exists( 'WooCommerce' ) ) {
      								echo jas_claue_wc_my_account();
      								global $woocommerce;
      
      								if ( class_exists( 'YITH_WCWL' ) ) {
      									global $yith_wcwl;
      									echo '<a class="cb chp hidden-xs" href="' . esc_url( $yith_wcwl->get_wishlist_url() ) . '" title="' .  esc_html__( 'View your Wishlist', 'claue' ) . '"><i class="pe-7s-like"></i></a>';
      								}
      								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>';
      							}
      						?>
      					</div><!-- .jas-action -->
      				</div>
      			</div><!-- .jas-row -->
      			<div class="header__bot hidden-sm">
      				<nav class="jas-navigation flex center-xs">
      					<?php
      						if ( has_nav_menu( 'primary-menu' ) ) {
      							wp_nav_menu(
      								array(
      									'theme_location' => 'primary-menu',
      									'menu_class'     => 'jas-menu clearfix',
      									'menu_id'        => 'jas-menu',
      									'container'      => false,
      									'walker'         => new JAS_Claue_Menu_Walker(),
      									'fallback_cb'    => NULL
      								)
      							);
      						} else {
      							echo '<ul class="jas-menu clearfix"><li><a target="_blank" href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '">' . esc_html__( 'Add Menu', 'claue' ) . '</a></li></ul>';
      						}
      					?>
      				</nav><!-- .jas-navigation -->
      			</div><!-- .header__bot -->
      		<?php if ( cs_get_option( 'header-boxed' ) ) : echo '</div>'; endif; ?>		
      	</div><!-- .header__mid -->
      	<form class="header__search w__100 dn pf" role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" <?php jas_claue_schema_metadata( array( 'context' => 'search_form' ) ); ?>>
      		<div class="pa">
      			<input class="w__100 jas-ajax-search" type="text" name="s" placeholder="<?php echo esc_html__( 'Search for...', 'claue' ); ?>" />
      			<input type="hidden" name="post_type" value="product">
      		</div>
      		<a id="sf-close" class="pa" href="#"><i class="pe-7s-close"></i></a>
      	</form><!-- #header__search -->
      
      	<div class="jas-canvas-menu jas-push-menu">
      		<h3 class="mg__0 tc cw bgb tu ls__2"><?php esc_html_e( 'Menu', 'claue' ); ?> <i class="close-menu pe-7s-close pa"></i></h3>
      		<div class="hide-md visible-sm visible-xs mt__30 center-xs flex tc">
      			<?php if ( cs_get_option( 'header-top-right' ) ) : ?>
      				<div class="header-text mr__15"><?php echo do_shortcode( cs_get_option( 'header-top-right' ) ); ?></div>
      			<?php endif; ?>
      			<?php
      				if ( class_exists( 'WooCommerce' ) && cs_get_option( 'header-currency' ) ) {
      					echo jas_claue_wc_currency();
      				}
      			?>
      		</div>
      		<div class="jas-action flex center-xs middle-xs hide-md hidden-sm visible-xs mt__10">
      			<?php if ( cs_get_option( 'header-search-icon' ) ) : ?>
      				<a class="sf-open cb chp" href="javascript:void(0);"><i class="pe-7s-search"></i></a>
      			<?php endif; ?>
      			<?php
      				if ( class_exists( 'WooCommerce' ) ) {
      					if ( cs_get_option( 'header-my-account-icon' ) ) {
      						echo '<a class="cb chp db jas-my-account" href="' . esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) . '"><i class="pe-7s-user"></i></a>';
      					}
      					if ( class_exists( 'YITH_WCWL' ) ) {
      						global $yith_wcwl;
      						echo '<a class="cb chp wishlist-icon" href="' . esc_url( $yith_wcwl->get_wishlist_url() ) . '"><i class="pe-7s-like"></i></a>';
      					}
      				}
      			?>
      		</div><!-- .jas-action -->
      		<?php
      			wp_nav_menu(
      				array(
      					'theme_location' => 'primary-menu',
      					'container_id'   => 'jas-mobile-menu',
      					'walker'         => new JAS_Claue_Mobile_Menu_Walker(),
      					'fallback_cb'    => NULL
      				)
      			);
      		?>
      		<div class="hidden-md visible-sm visible-xs tc mt__20 mb__30">
      			<?php echo jas_claue_social(); ?>
      		</div>
      	</div><!-- .jas-canvas-menu -->
      	
      	<?php if ( class_exists( 'WooCommerce' ) ) : ?>	
      		<div class="jas-mini-cart jas-push-menu">
      			<div class="jas-mini-cart-content">
      				<h3 class="mg__0 tc cw bgb tu ls__2"><?php esc_html_e( 'Mini Cart', 'claue' );?> <i class="close-cart pe-7s-close pa"></i></h3>
      				<div class="widget_shopping_cart_content"></div>
      			</div>
      		</div><!-- .jas-mini-cart -->
      	<?php endif ?>
      </header><!-- #jas-header -->

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #39469
      anj
      Support Expired

      Hi,

       

      It still doesnt work. the link would be a # and it does not go to the cart.

       

       

    • #39470
      anj
      Support Expired

      I noticed before the page completely loads, the link leads to the cart. But after it has fully loaded, it leads to the #

    • #39471
      Harry
      Support Expired

      Hi,

      Please check again. It fixed on your site, you don’t update new code for layout-4.php

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #39480
      anj
      Support Expired

      Yes it works now. Thank you

Viewing 18 reply threads

You must be logged in to reply to this topic.