Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Cart item count instead of total price › Reply To: Cart item count instead of total price
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