first commit
This commit is contained in:
84
wp-content/themes/calla/woocommerce/content-product.php
Normal file
84
wp-content/themes/calla/woocommerce/content-product.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product content within loops
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-product.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
global $product;
|
||||
|
||||
// Ensure visibility
|
||||
if ( empty( $product ) || ! $product->is_visible() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Elated function for overriding woocommerce list templates and functions
|
||||
*/
|
||||
$product_info_position = calla_elated_options()->getOptionValue('eltdf_woo_product_list_info_position');
|
||||
?>
|
||||
<li <?php wc_product_class( '', $product ); ?>>
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_shop_loop_item hook.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_product_link_open - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop_item' );
|
||||
|
||||
/**
|
||||
* woocommerce_before_shop_loop_item_title hook.
|
||||
*
|
||||
* @hooked woocommerce_show_product_loop_sale_flash - 10
|
||||
* @hooked woocommerce_template_loop_product_thumbnail - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop_item_title' );
|
||||
|
||||
/**
|
||||
* Elated action for overriding woocommerce list templates and functions
|
||||
*/
|
||||
if($product_info_position === 'info_below_image') {
|
||||
|
||||
do_action( 'calla_elated_woo_pl_info_below_image' );
|
||||
|
||||
} else if($product_info_position === 'info_on_image_hover') {
|
||||
|
||||
do_action( 'calla_elated_woo_pl_info_on_image_hover' );
|
||||
}
|
||||
|
||||
/**
|
||||
* woocommerce_shop_loop_item_title hook.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_product_title - 10
|
||||
*/
|
||||
do_action( 'woocommerce_shop_loop_item_title' );
|
||||
|
||||
/**
|
||||
* woocommerce_after_shop_loop_item_title hook.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_rating - 5
|
||||
* @hooked woocommerce_template_loop_price - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop_item_title' );
|
||||
|
||||
/**
|
||||
* woocommerce_after_shop_loop_item hook.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_product_link_close - 5
|
||||
* @hooked woocommerce_template_loop_add_to_cart - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop_item' );
|
||||
?>
|
||||
</li>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Product quantity inputs
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/global/quantity-input.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 4.0.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! isset ( $input_id ) ) {
|
||||
$input_id = uniqid( 'quantity_' );
|
||||
}
|
||||
|
||||
if ( $max_value && $min_value === $max_value ) { ?>
|
||||
<div class="eltdf-quantity-buttons quantity hidden">
|
||||
<input type="hidden" id="<?php echo esc_attr( $input_id ); ?>" class="qty" name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $min_value ); ?>" />
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
/* translators: %s: Quantity. */
|
||||
$label = ! empty( $args['product_name'] ) ? sprintf( esc_html__( '%s quantity', 'calla' ), wp_strip_all_tags( $args['product_name'] ) ) : esc_html__( 'Quantity', 'calla' );
|
||||
?>
|
||||
<div class="eltdf-quantity-buttons quantity">
|
||||
<?php do_action( 'woocommerce_before_quantity_input_field' ); ?>
|
||||
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_attr( $label ); ?></label>
|
||||
<span class="eltdf-quantity-minus icon_minus-06"></span>
|
||||
<input
|
||||
type="text"
|
||||
id="<?php echo esc_attr( $input_id ); ?>"
|
||||
class="input-text qty text eltdf-quantity-input"
|
||||
data-step="<?php echo esc_attr( $step ); ?>"
|
||||
data-min="<?php echo esc_attr( $min_value ); ?>"
|
||||
data-max="<?php echo esc_attr( 0 < $max_value ? $max_value : '' ); ?>"
|
||||
name="<?php echo esc_attr( $input_name ); ?>"
|
||||
value="<?php echo esc_attr( ! empty( $input_value ) ? $input_value : 0 ); ?>"
|
||||
title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'calla' ) ?>"
|
||||
size="4"
|
||||
placeholder="<?php echo esc_attr( $placeholder ); ?>"
|
||||
inputmode="<?php echo esc_attr( $inputmode ); ?>" />
|
||||
<span class="eltdf-quantity-plus icon_plus"></span>
|
||||
<?php do_action( 'woocommerce_after_quantity_input_field' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
31
wp-content/themes/calla/woocommerce/product-searchform.php
Normal file
31
wp-content/themes/calla/woocommerce/product-searchform.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product search form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/product-searchform.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<label class="screen-reader-text"><?php esc_html_e('Search for:', 'calla'); ?></label>
|
||||
<div class="input-holder clearfix">
|
||||
<input type="search" class="search-field" placeholder="<?php esc_attr_e('Search Products...', 'calla'); ?>" value="<?php echo get_search_query(); ?>" name="s" title="<?php esc_attr_e('Search for:', 'calla'); ?>"/>
|
||||
<button type="submit" class="eltdf-woo-search-widget-button"><?php echo calla_elated_icon_collections()->renderIcon( 'icon_search', 'font_elegant' ); ?></button>
|
||||
<input type="hidden" name="post_type" value="product"/>
|
||||
</div>
|
||||
</form>
|
||||
Reference in New Issue
Block a user