Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi @televisi,
    could you tell us the website URL so we can check?

    Thread Starter televisi

    (@televisi)

    Plugin Author YITHEMES

    (@yithemes)

    Hi @televisi,
    please add this snippet in the functions.php file of your theme:

    add_filter( 'ywctm_cart_widget_classes', 'my_ywctm_cart_widget_classes' );
    
    function my_ywctm_cart_widget_classes( $classes ) {
    
    	$classes[] = '.footer-cart-contents::before';
    	$classes[] = '.footer-cart-contents .count';
    
    	return $classes;
    }
    Thread Starter televisi

    (@televisi)

    Hi, thanks for your reply

    I edit functions.php and the following error appears:

    Your PHP code changes were rolled back due to an error on line 10 of file wp-content/themes/storefront/functions.php. Please fix and try saving again.
    
    syntax error, unexpected 'function' (T_FUNCTION)

    I added the code at the top of the functions.php:

    <?php
    /**
     * Storefront engine room
     *
     * @package storefront
     */
    
    add_filter( 'ywctm_cart_widget_classes', 'my_ywctm_cart_widget_classes' );
    
    function my_ywctm_cart_widget_classes( $classes ) {
    
    $classes[] = '.footer-cart-contents::before';
    $classes[] = '.footer-cart-contents .count';
    
    return $classes;
    }
    		   
    /**
     * Assign the Storefront version to a var
     */
    $theme              = wp_get_theme( 'storefront' );
    $storefront_version = $theme['Version'];
    
    /**
     * Set the content width based on the theme's design and stylesheet.
     */
    if ( ! isset( $content_width ) ) {
    	$content_width = 980; /* pixels */
    }
    
    $storefront = (object) array(
    	'version' => $storefront_version,
    
    	/**
    	 * Initialize all the things.
    	 */
    	'main'       => require 'inc/class-storefront.php',
    	'customizer' => require 'inc/customizer/class-storefront-customizer.php',
    );
    
    require 'inc/storefront-functions.php';
    require 'inc/storefront-template-hooks.php';
    require 'inc/storefront-template-functions.php';
    
    if ( class_exists( 'Jetpack' ) ) {
    	$storefront->jetpack = require 'inc/jetpack/class-storefront-jetpack.php';
    }
    
    if ( storefront_is_woocommerce_activated() ) {
    	$storefront->woocommerce = require 'inc/woocommerce/class-storefront-woocommerce.php';
    
    	require 'inc/woocommerce/storefront-woocommerce-template-hooks.php';
    	require 'inc/woocommerce/storefront-woocommerce-template-functions.php';
    }
    
    if ( is_admin() ) {
    	$storefront->admin = require 'inc/admin/class-storefront-admin.php';
    
    	require 'inc/admin/class-storefront-plugin-install.php';
    }
    
    /**
     * NUX
     * Only load if wp version is 4.7.3 or above because of this issue;
     * https://core.trac.www.ads-software.com/ticket/39610?cversion=1&cnum_hist=2
     */
    if ( version_compare( get_bloginfo( 'version' ), '4.7.3', '>=' ) && ( is_admin() || is_customize_preview() ) ) {
    	require 'inc/nux/class-storefront-nux-admin.php';
    	require 'inc/nux/class-storefront-nux-guided-tour.php';
    
    	if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '3.0.0', '>=' ) ) {
    		require 'inc/nux/class-storefront-nux-starter-content.php';
    	}
    }
    
    /**
     * Note: Do not add any custom code here. Please use a custom plugin so that your customizations aren't lost during updates.
     * https://github.com/woocommerce/theme-customisations
     */
    
    Plugin Author YITHEMES

    (@yithemes)

    Hi,
    I checked the snipped and is right.
    Please try to add it at end of file functions.php .

    Thread Starter televisi

    (@televisi)

    Thank you, it works!

    One more thing, how about removing the “My Account” icon? (so that what’s left is the “Search” icon)

    Note: I did not update the functions.php, as it is not recommended, what I did is installed “Code Snippet” add-on and add your code there

    Plugin Author YITHEMES

    (@yithemes)

    Hi,

    One more thing, how about removing the “My Account” icon? (so that what’s left is the “Search” icon)

    Sorry can you explain me better your needs?
    I can’t see the “My Account” icon in your site.

    Thread Starter televisi

    (@televisi)

    When viewing the page in mobile-view, you can see the “person” icon (https://imgur.com/a/ulpF9tM) which then brings the user to “my account” screen.

    Can this icon be removed/hidden?

    Plugin Author YITHEMES

    (@yithemes)

    Hi,
    Try to add this custom css in your theme

    ul.columns-3 li.my-account a:before  {
        display:none!important;
    }
    Thread Starter televisi

    (@televisi)

    Fantastic!

    Thanks for this! Appreciate it!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Shopping cart icon on mobile-view still showing’ is closed to new replies.