/** * woocommerce_show_product_images hook * * @hooked woocommerce_show_product_sale_flash - 10 * @hooked woocommerce_show_product_images - 20 */ do_action('woocommerce_before_single_product_summary'); ?> <div class="summary entry-summary"> <?php if (!is_shop_enabled() || !yit_get_option('shop-detail-show-price')) { remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 25); } if (!is_shop_enabled() || !yit_get_option('shop-detail-add-to-cart')) { remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30); } remove_action('woocommerce_single_product_summary', ''); // add a separator after title and price add_action('woocommerce_single_product_summary', create_function('', 'echo do_shortcode("[line]");')); /** * woocommerce_single_product_summary hook * * @hooked woocommerce_template_single_title - 5 * @hooked woocommerce_template_single_price - 10 * @hooked woocommerce_template_single_excerpt - 20 * @hooked woocommerce_template_single_add_to_cart - 30 * @hooked woocommerce_template_single_meta - 40 * @hooked woocommerce_template_single_sharing - 50 */
<?php /** * Loop Add to Cart * * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly if (!is_shop_enabled() || !yit_get_option('shop-view-show-add-to-cart')) { return; } global $product; ?> <?php if (!$product->is_in_stock()) { ?> <a href="<?php echo apply_filters('out_of_stock_add_to_cart_url', get_permalink($product->id)); ?> " class="out-of-stock button"><?php echo apply_filters('out_of_stock_add_to_cart_text', __('Out Of Stock', 'yit')); ?> </a>
} if ( ! ( yit_get_option( 'shop-view-show-wishlist' ) && get_option( 'yith_wcwl_enabled' ) == 'yes' ) ) { $wishlist = ''; } //if ( ! yit_get_option('shop-view-show-share') ) { $share = ''; } //if ( !( isset( $woocommerce->integrations->integrations['sharethis'] ) && $woocommerce->integrations->integrations['sharethis']->publisher_id ) ) { $share = ''; } $buttons = array( $details, $wishlist, $compare, $share ); foreach ( array( 'details', 'wishlist', 'compare', 'share' ) as $var ) { if ( empty( ${$var} ) ) { $count_buttons --; } } if ( ! is_shop_enabled() || ! yit_get_option( 'shop-view-show-add-to-cart' ) || ! $product->is_purchasable() ) { $add_to_cart = ''; $out_of_stock = ''; if ( $product->product_type == 'external' ) { $link = apply_filters( 'external_add_to_cart_url', get_permalink( $product->id ) ); $label = apply_filters( 'external_add_to_cart_text', __( 'Read More', 'yit' ) ); $add_to_cart = sprintf( '<a href="%s" rel="nofollow" class="view-options" title="%s">%s</a>', apply_filters( 'yit_external_add_to_cart_link_loop', $link, $product ), $label, $label ); } } elseif ( ! $product->is_in_stock() ) { $add_to_cart = ''; $label = apply_filters( 'out_of_stock_add_to_cart_text', __( 'Out of stock', 'yit' ) ); ?>
if (!yit_get_option('shop-view-show-title')) { $title_class[] = 'hide'; } if (yit_get_option('shop-title-uppercase')) { $title_class[] = 'upper'; } $title_class = empty($title_class) ? '' : ' class="' . implode(' ', $title_class) . '"'; yit_detect_span_catalog_image(); //automatically add the classes if (0 == ($woocommerce_loop['loop'] - 1) % $woocommerce_loop['columns'] || 1 == $woocommerce_loop['columns']) { $woocommerce_loop['li_class'][] = 'first'; } if (0 == $woocommerce_loop['loop'] % $woocommerce_loop['columns']) { $woocommerce_loop['li_class'][] = 'last'; } if (!is_shop_enabled() || !yit_get_option('shop-view-show-price')) { remove_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price'); } $image = yit_image("size=shop_catalog&output=array"); $height = isset($image[2]) ? $image[2] : 0; //quick view js do_action('yit_quick_view_load_static'); ?> <li <?php post_class($woocommerce_loop['li_class']); if ($woocommerce_loop['view'] == 'list') { ?> style="min-height: <?php echo $height; ?> px;"<?php
<?php global $woocommerce, $product; $id = isset($id) ? (int) $id : ''; $attribute_id = isset($attribute_id) ? (int) $attribute_id : ''; $show_price = isset($show_price) && $show_price == 'yes' ? true : false; $show_cart = isset($show_cart) && $show_cart == 'yes' ? true : false; $product = get_product($id); if (!$product->is_purchasable()) { return; } ?> <?php if ($product->is_in_stock() && is_shop_enabled()) { ?> <?php if ($product->product_type == 'simple') { ?> <?php if ($show_price) { echo $product->get_price_html(); } ?> <?php if ($show_cart) { ?> <form action="<?php echo esc_url($product->add_to_cart_url());
static function admin_init() { if (!is_shop_enabled() || basename($_SERVER['PHP_SELF']) != 'nav-menus.php') { return; } wp_enqueue_script('nav-menu-query', YIT_THEME_ASSETS_URL . '/js/metabox_nav_menu.js', 'nav-menu', false, true); add_meta_box('products-by-prices', 'Prices Filter', array(__CLASS__, 'nav_menu_meta_box'), 'nav-menus', 'side', 'low'); }
$class_subscription = "subscription"; $woo_option = get_option( 'woocommerce_subscriptions_add_to_cart_button_text' ); $label = $woo_option ? $woo_option : apply_filters( 'subscription_add_to_cart_text', __( 'Sign Up Now', 'yit' ) ); } else { $label = apply_filters( 'single_add_to_cart_text',yit_icl_translate( "theme", "yit", "add_to_cart_text", yit_get_option( 'add-to-cart-text' ) )); } ?> <?php do_action( 'woocommerce_before_add_to_cart_form' ); ?> <form action="<?php echo esc_url( $product->add_to_cart_url() ); ?>" class="variations_form cart group" method="post" enctype='multipart/form-data' data-product_id="<?php echo $post->ID; ?>" data-product_variations="<?php echo esc_attr( json_encode( $available_variations ) ) ?>"> <?php if ( is_shop_enabled() && yit_get_option( 'shop-detail-add-to-cart' ) && yit_product_form_position_is( 'in-sidebar' ) ) : ?> <div class="quantity-wrap group"> <label><?php _e( 'Quantity', 'yit' ) ?></label> <?php woocommerce_quantity_input(); ?> </div> <?php endif; ?> <div class="variations"> <?php $loop = 0; foreach ( $attributes as $name => $options ) : $loop ++; ?> <label for="<?php echo sanitize_title( $name ); ?>"><?php echo wc_attribute_label( $name ); ?></label> <div class="select-wrapper"> <select id="<?php echo esc_attr( sanitize_title( $name ) ); ?>" name="attribute_<?php echo sanitize_title( $name ); ?>"> <option value=""><?php echo __( 'Choose an option', 'yit' ) ?>…</option> <?php if ( is_array( $options ) ) {
?> > <?php } ?> </div> <?php } ?> <?php if ($show_breadcrumb) { ?> <!-- BREDCRUMB --> <div class="breadcrumbs"> <?php do_action('yit_before_breadcrumb'); if (!is_shop_installed() || is_shop_enabled() && !is_woocommerce()) { yit_breadcrumb(apply_filters('yit_breadcrumb_delimiter', '|')); } ?> </div> <?php } ?> </div></div></div> </div> <!-- END PAGE META --> <?php }
<?php /** * Your Inspiration Themes * * @package WordPress * @subpackage Your Inspiration Themes * @author Your Inspiration Themes Team <*****@*****.**> * * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-3.0.txt */ if (!is_shop_installed() || !is_shop_enabled() || !yit_get_option('show-header-woocommerce-cart')) { return; } ?> <div class="woo_cart<?php if (!yit_get_option('responsive-show-header-cart')) { echo ' hidden-phone'; } ?> "> <?php the_widget('YIT_Widget_Cart'); ?> </div>
/** * Your Inspiration Themes * * @package WordPress * @subpackage Your Inspiration Themes * @author Your Inspiration Themes Team <*****@*****.**> * * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-3.0.txt */ $show_cart = yit_get_option('show-header-woocommerce-cart'); $show_cart_widget = yit_get_option('show-header-woocommerce-cart-widget'); $show_search = yit_get_option('show-header-search'); if (!is_shop_installed() || !is_shop_enabled()) { $show_cart = $show_cart_widget = false; } $responsive_header_cart = yit_get_option('responsive-show-header-cart'); $responsive_header_search = yit_get_option('responsive-show-header-search'); if (!$show_cart && !$show_cart_widget && !$show_search) { return; } global $woocommerce; ?> <div id="header-cart-search"> <?php if ($show_cart || $show_cart_widget) { ?> <div class="cart-row group<?php if (!$responsive_header_cart) {
* * @package WordPress * @subpackage Your Inspiration Themes * @author Your Inspiration Themes Team <*****@*****.**> * * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-3.0.txt */ $show_cart = yit_get_option('show-header-woocommerce-cart'); $show_cart_widget = yit_get_option('show-header-woocommerce-cart-widget'); $show_search = yit_get_option('show-header-search'); if( ! is_shop_installed() || ! is_shop_enabled() ) $show_cart = $show_cart_widget = false; $responsive_header_cart = yit_get_option('responsive-show-header-cart'); $responsive_header_search = yit_get_option('responsive-show-header-search'); if ( ! $show_cart && ! $show_cart_widget && ! $show_search ) return; global $woocommerce; ?> <div id="header-cart-search"> <?php if( ( $show_cart || $show_cart_widget ) && !yit_ywctm_hide_cart_page() ): ?> <div class="cart-row group<?php if ( ! $responsive_header_cart ) echo ' hidden-phone' ?>"> <?php if( $show_cart == '1' ): ?> <?php list( $cart_items, $cart_subtotal, $cart_currency ) = yit_get_current_cart_info(); ?>
<a href="<?php echo $profile_link; ?> "><?php echo $user_name; ?> <span class="sf-sub-indicator"> +</span></a> </div> <div class="welcome_menu hidden-phone"> <div class="welcome_menu_inner"> <?php if (!$logged_in) { ?> <?php if (is_shop_installed() && is_shop_enabled()) { global $woocommerce; ?> <form method="post" action="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?> " class="group"> <input type="text" name="username" id="header_username" placeholder="<?php _e('Username', 'yit'); ?> " /> <input type="password" name="password" id="header_password" placeholder="<?php _e('Password', 'yit'); ?> " />