New Landing How can we help? Themeforest Theme Support Neighborhood Cart item count instead of total price

Viewing 15 posts - 16 through 30 (of 63 total)
  • #57863
    michaelagwunobi21
    Member
    Post count: 93

    please do not update the theme or delete any plugins

    #57865
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have fixed your issue so please check it now .

    Thanks
    With Best Regards
    Swift Ideas

    #57866
    michaelagwunobi21
    Member
    Post count: 93

    hi,

    May I ask what you did, because my custom css was deleted and my cache plugin doesn’t seem to work anymore?

    Also do you have a personal email?

    #57875
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    HI,
    Sorry ! I forgot to enable cache plugin . Please enable your cache plugin .

    Thanks
    With Best Regards
    Swift Ideas

    #58101
    studioenigma
    Member
    Post count: 56

    Hi, I am working on the same thing. Have the same flashing problem. I would like to know what you did in the backend as well, so I know how to fix it, and don’t have to ask you to do it everytime i update the theme / move it, etc.

    thanks

    #58104
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please add this code at functions.php end of file

    add_filter('add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment');
     
    function woocommerce_header_add_to_cart_fragment( $fragments ) {
    global $woocommerce;
    $cart_count = $woocommerce->cart->cart_contents_count;
    $cart_count = empty($cart_count) ? '0' : $cart_count ;
    ob_start();
    $fragments['a.cart-contents'] = '';
    echo '<a class="cart-contents" href="'.$woocommerce->cart->get_cart_url().'" title="'.__("View your shopping cart", "swiftframework").'"><i class="sf-cart"></i>'.$cart_count.' Items</a>';
    $fragments['a.cart-contents'] = ob_get_clean();
    return $fragments;
    }

    Hope it will work sure .
    Thanks

    #58135
    studioenigma
    Member
    Post count: 56

    thanks for the quick reply.

    I still have it flashing though… ๐Ÿ™

    #58149
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Have you made changes in sf-header.php as defined at previous reply ?

    Thanks

    #58161
    studioenigma
    Member
    Post count: 56

    In themes/neighborhood./… I have replaced the original code in sf-header with:

    $cart_output .= '<li class="parent shopping-bag-item"><a class="cart-contents" href="'.$woocommerce->cart->get_cart_url().'" title="'.__("View your shopping cart", "swiftframework").'"><i class="sf-cart"></i>'.$cart_count_text.'</a>';

    in neighborhood child there is no such file (only style.css and functions.php), so i dont exactlye understand what you mean by:

    Please open to edit sf-header.php line 695 at /wp-content/themes/neighborhood/includes/swift-framework/sf-content-display/ and sf-header.php line 695 at /wp-content/themes/neighborhood-child/

    in sf-woocommerce.php i replace the original code (line 27) with:

    function sf_product_items_text($count) {
            
            $product_item_text = "";
            
        	if ( $count > 1 ) {
            	$product_item_text = str_replace('%', number_format_i18n($count), __('(%)', 'swiftframework'));
            } elseif ( $count == 0 ) {
            	$product_item_text = __('(0)', 'swiftframework');
            } else {
            	$product_item_text = __('(1)', 'swiftframework');
            }
            
            return $product_item_text;
        }
    
    

    anything i’m doing wrong here?

    Regards

    #58164
    studioenigma
    Member
    Post count: 56

    also, it would be great if you could take a look at my question:

    http://support.swiftideas.net/forums/topic/shopping-bag-and-wishlist-wrong-links/

    thanks!

    #58165
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please share website URL with wordpress admin login detail so i can check and fix the issue easily .
    Thanks

    #58171
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit sf-woocommerce.php at /neighborhood/includes/swift-framewwork/

    Find this code at line 111
    <a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'swiftframework'); ?>"><i class="sf-cart"></i><?php echo $woocommerce->cart->get_cart_total(); ?></a>
    
    Replace with 
    
    <a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'swiftframework'); ?>"><i class="sf-cart"></i><?php echo $cart_count_text; ?></a>

    Thanks

    #58177
    studioenigma
    Member
    Post count: 56

    That did the trick! Maybe an idea to add this information to the knowledgebase?

    great job Mohammad

    #58181
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Most welcome ! I will add this knowledgebase sure .
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #62400
    michaelagwunobi21
    Member
    Post count: 93

    hi, i made a slight change and it keeps flashing like normal. May I ask what you did to clear the cache?

Viewing 15 posts - 16 through 30 (of 63 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register