'; woocommerce_result_count(); woocommerce_catalog_ordering(); echo ''; } } add_action('woocommerce_before_shop_loop', 'bigmart_woocommerce_result_count_catalog_ordering', 30); if (!function_exists('bigmart_woocommerce_breadcrumb')) { function bigmart_woocommerce_breadcrumb() { if (is_woocommerce()) { echo '
'; echo '
'; woocommerce_breadcrumb(); echo '
'; echo '
'; } } } add_action('bigmart_header', 'bigmart_woocommerce_breadcrumb', 50); if (!function_exists('bigmart_woocommerce_scripts')) { /** * WooCommerce specific scripts & stylesheets. * * @return void */ function bigmart_woocommerce_scripts() { wp_enqueue_style('bigmart-woocommerce-style', get_template_directory_uri() . '/woocommerce.css'); $font_path = esc_url(WC()->plugin_url() . '/assets/fonts/'); $inline_font = '@font-face { font-family: "star"; src: url("' . $font_path . 'star.eot"); src: url("' . $font_path . 'star.eot?#iefix") format("embedded-opentype"), url("' . $font_path . 'star.woff") format("woff"), url("' . $font_path . 'star.ttf") format("truetype"), url("' . $font_path . 'star.svg#star") format("svg"); font-weight: normal; font-style: normal; }'; wp_add_inline_style('bigmart-woocommerce-style', $inline_font); } } add_action('wp_enqueue_scripts', 'bigmart_woocommerce_scripts', 5); /** * Disable the default WooCommerce stylesheet. */ add_filter('woocommerce_enqueue_styles', '__return_empty_array'); if (!function_exists('bigmart_woocommerce_active_body_class')) { /** * Add 'woocommerce-active' class to the body tag. */ function bigmart_woocommerce_active_body_class($classes) { $classes[] = 'woocommerce-active'; return $classes; } } add_filter('body_class', 'bigmart_woocommerce_active_body_class'); if (!function_exists('bigmart_woocommerce_wrapper_before')) { /** * Before Content. * * Wraps all WooCommerce content in wrappers which match the theme markup. * * @return void */ function bigmart_woocommerce_wrapper_before() { echo '
'; echo '
'; echo '
'; } } add_action('woocommerce_before_main_content', 'bigmart_woocommerce_wrapper_before'); if (!function_exists('bigmart_woocommerce_wrapper_after')) { /** * After Content. * * Closes the wrapping divs. * * @return void */ function bigmart_woocommerce_wrapper_after() { echo '
'; get_sidebar(); echo '
'; echo '
'; } } add_action('woocommerce_after_main_content', 'bigmart_woocommerce_wrapper_after'); if (!function_exists('bigmart_woocommerce_cart_link_fragment')) { /** * Cart Fragments. * * Ensure cart contents update when products are added to the cart via AJAX. * * @param array $fragments Fragments to refresh via AJAX. * @return array Fragments to refresh via AJAX. */ function bigmart_woocommerce_cart_link_fragment($fragments) { ob_start(); bigmart_woocommerce_cart_link(); $fragments['a.ms-cart-contents'] = ob_get_clean(); return $fragments; } } add_filter('woocommerce_add_to_cart_fragments', 'bigmart_woocommerce_cart_link_fragment'); if (!function_exists('bigmart_woocommerce_cart_link')) { /** * Cart Link. * * Displayed a link to the cart including the number of items present and the cart total. * * @return void */ function bigmart_woocommerce_cart_link() { ?> cart->get_cart_contents_count()), 'bigmart'), absint(WC()->cart->get_cart_contents_count()) ); ?> cart->get_cart_subtotal()); ?> -
'product_cat', 'show_option_all' => __('All Category', 'bigmart'), 'name' => 'product_category', 'selected' => $selected_category, 'id' => 'ms-product-category', 'class' => 'ms-postform', 'hide_if_empty' => true ); wp_dropdown_categories($cat_args); } ?>
'product_cat', 'show_option_all' => __('All Category', 'bigmart'), 'name' => 'product_category', 'selected' => $selected_category, 'id' => 'ms-product-category', 'class' => 'ms-postform', 'hide_if_empty' => true ); wp_dropdown_categories($cat_args); } ?>
'; echo ''; echo esc_html(get_the_title()); echo ''; echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } if (!function_exists('bigmart_product_thumb_wrap_open')) { function bigmart_product_thumb_wrap_open() { echo '
'; } } if (!function_exists('bigmart_product_thumb_wrap_close')) { function bigmart_product_thumb_wrap_close() { echo '
'; } } if (!function_exists('bigmart_product_title_wrap_open')) { function bigmart_product_title_wrap_open() { echo '
'; } } if (!function_exists('bigmart_product_title_wrap_close')) { function bigmart_product_title_wrap_close() { echo '
'; } } if (!function_exists('bigmart_flash_sale')) { function bigmart_flash_sale() { echo '
' . esc_html__('Sale', 'bigmart') . '
'; } } add_filter('woocommerce_get_image_size_thumbnail', function( $size ) { return array( 'width' => 400, 'height' => 400, 'crop' => 1, ); });