init
This commit is contained in:
29
wp-content/themes/flatsome/woocommerce/archive-product.php
Normal file
29
wp-content/themes/flatsome/woocommerce/archive-product.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* The Template for displaying product archives, including the main shop page which is a post type archive
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/archive-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.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
get_header( 'shop' );
|
||||
|
||||
// Add Custom Shop Content if set
|
||||
if(is_shop() && flatsome_option('html_shop_page_content') && ! $wp_query->is_search() && $wp_query->query_vars['paged'] < 1 ){
|
||||
echo do_shortcode('<div class="shop-page-content">'.flatsome_option('html_shop_page_content').'</div>');
|
||||
} else {
|
||||
wc_get_template_part( 'layouts/category', flatsome_option( 'category_sidebar' ) );
|
||||
}
|
||||
|
||||
get_footer( 'shop' );
|
41
wp-content/themes/flatsome/woocommerce/cart/cart-empty.php
Normal file
41
wp-content/themes/flatsome/woocommerce/cart/cart-empty.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Empty cart page
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-empty.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.5.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit; ?>
|
||||
<div class="text-center pt pb">
|
||||
<?php
|
||||
/**
|
||||
* @hooked wc_empty_cart_message - 10
|
||||
*/
|
||||
do_action( 'woocommerce_cart_is_empty' );
|
||||
|
||||
if ( wc_get_page_id( 'shop' ) > 0 ) : ?>
|
||||
<p class="return-to-shop">
|
||||
<a class="button primary wc-backward" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
|
||||
<?php
|
||||
/**
|
||||
* Filter "Return To Shop" text.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @param string $default_text Default text.
|
||||
*/
|
||||
echo esc_html( apply_filters( 'woocommerce_return_to_shop_text', __( 'Return to shop', 'woocommerce' ) ) );
|
||||
?>
|
||||
</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* Shipping Methods Display
|
||||
*
|
||||
* In 2.1 we show methods per package. This allows for multiple methods per order if so desired.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-shipping.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;
|
||||
|
||||
$formatted_destination = isset( $formatted_destination ) ? $formatted_destination : WC()->countries->get_formatted_address( $package['destination'], ', ' );
|
||||
$has_calculated_shipping = ! empty( $has_calculated_shipping );
|
||||
$show_shipping_calculator = ! empty( $show_shipping_calculator );
|
||||
$calculator_text = '';
|
||||
?>
|
||||
<tr class="woocommerce-shipping-totals shipping <?php if ( get_theme_mod( 'cart_boxed_shipping_labels', 0 ) && 1 < count( $available_methods ) ) echo 'shipping--boxed'; ?>">
|
||||
<td class="shipping__inner" colspan="2">
|
||||
<table class="shipping__table <?php if ( 1 < count( $available_methods ) ) : ?>shipping__table--multiple<?php endif; ?>">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th <?php if ( 1 < count( $available_methods ) ) : ?> colspan="2" <?php endif; ?>><?php echo wp_kses_post( $package_name ); ?></th>
|
||||
<td data-title="<?php echo esc_attr( $package_name ); ?>">
|
||||
<?php if ( $available_methods ) : ?>
|
||||
<ul id="shipping_method" class="shipping__list woocommerce-shipping-methods">
|
||||
<?php foreach ( $available_methods as $method ) : ?>
|
||||
<li class="shipping__list_item">
|
||||
<?php
|
||||
if ( 1 < count( $available_methods ) ) {
|
||||
printf( '<input type="radio" name="shipping_method[%1$d]" data-index="%1$d" id="shipping_method_%1$d_%2$s" value="%3$s" class="shipping_method" %4$s />', $index, esc_attr( sanitize_title( $method->id ) ), esc_attr( $method->id ), checked( $method->id, $chosen_method, false ) ); // WPCS: XSS ok.
|
||||
} else {
|
||||
printf( '<input type="hidden" name="shipping_method[%1$d]" data-index="%1$d" id="shipping_method_%1$d_%2$s" value="%3$s" class="shipping_method" />', $index, esc_attr( sanitize_title( $method->id ) ), esc_attr( $method->id ) ); // WPCS: XSS ok.
|
||||
}
|
||||
printf( '<label class="shipping__list_label" for="shipping_method_%1$s_%2$s">%3$s</label>', $index, esc_attr( sanitize_title( $method->id ) ), wc_cart_totals_shipping_method_label( $method ) ); // WPCS: XSS ok.
|
||||
do_action( 'woocommerce_after_shipping_rate', $method, $index );
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if ( is_cart() && get_theme_mod( 'cart_estimate_text', 1 ) ) : ?>
|
||||
<p class="woocommerce-shipping-destination">
|
||||
<?php
|
||||
if ( $formatted_destination ) {
|
||||
// Translators: $s shipping destination.
|
||||
printf( esc_html__( 'Shipping to %s.', 'woocommerce' ) . ' ', '<strong>' . esc_html( $formatted_destination ) . '</strong>' );
|
||||
$calculator_text = esc_html__( 'Change address', 'woocommerce' );
|
||||
} else {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_shipping_estimate_html', __( 'Shipping options will be updated during checkout.', 'woocommerce' ) ) );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
elseif ( ! $has_calculated_shipping || ! $formatted_destination ) :
|
||||
if ( is_cart() && 'no' === get_option( 'woocommerce_enable_shipping_calc' ) ) {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_shipping_not_enabled_on_cart_html', __( 'Shipping costs are calculated during checkout.', 'woocommerce' ) ) );
|
||||
} else {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_shipping_may_be_available_html', __( 'Enter your address to view shipping options.', 'woocommerce' ) ) );
|
||||
}
|
||||
elseif ( ! is_cart() ) :
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_no_shipping_available_html', __( 'There are no shipping options available. Please ensure that your address has been entered correctly, or contact us if you need any help.', 'woocommerce' ) ) );
|
||||
else :
|
||||
// Translators: $s shipping destination.
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_no_shipping_available_html', sprintf( esc_html__( 'No shipping options were found for %s.', 'woocommerce' ) . ' ', '<strong>' . esc_html( $formatted_destination ) . '</strong>' ) ) );
|
||||
$calculator_text = esc_html__( 'Enter a different address', 'woocommerce' );
|
||||
endif;
|
||||
?>
|
||||
|
||||
<?php if ( $show_package_details ) : ?>
|
||||
<?php echo '<p class="woocommerce-shipping-contents"><small>' . esc_html( $package_details ) . '</small></p>'; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $show_shipping_calculator ) : ?>
|
||||
<?php woocommerce_shipping_calculator( $calculator_text ); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
217
wp-content/themes/flatsome/woocommerce/cart/cart.php
Normal file
217
wp-content/themes/flatsome/woocommerce/cart/cart.php
Normal file
@@ -0,0 +1,217 @@
|
||||
<?php
|
||||
/**
|
||||
* Cart Page
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.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.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$row_classes = array();
|
||||
$main_classes = array();
|
||||
$sidebar_classes = array();
|
||||
|
||||
$auto_refresh = get_theme_mod( 'cart_auto_refresh' );
|
||||
$row_classes[] = 'row-large';
|
||||
$row_classes[] = 'row-divided';
|
||||
|
||||
if ( $auto_refresh ) {
|
||||
$main_classes[] = 'cart-auto-refresh';
|
||||
}
|
||||
|
||||
|
||||
$row_classes = implode( ' ', $row_classes );
|
||||
$main_classes = implode( ' ', $main_classes );
|
||||
$sidebar_classes = implode( ' ', $sidebar_classes );
|
||||
|
||||
|
||||
do_action( 'woocommerce_before_cart' ); ?>
|
||||
<div class="woocommerce row <?php echo $row_classes; ?>">
|
||||
<div class="col large-7 pb-0 <?php echo $main_classes; ?>">
|
||||
|
||||
<?php wc_print_notices(); ?>
|
||||
|
||||
<form class="woocommerce-cart-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
|
||||
<div class="cart-wrapper sm-touch-scroll">
|
||||
|
||||
<?php do_action( 'woocommerce_before_cart_table' ); ?>
|
||||
|
||||
<table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product-name" colspan="3"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-price"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th>
|
||||
<th class="product-quantity"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
|
||||
<th class="product-subtotal"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php do_action( 'woocommerce_before_cart_contents' ); ?>
|
||||
|
||||
<?php
|
||||
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
|
||||
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
||||
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
|
||||
|
||||
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
|
||||
$product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
|
||||
?>
|
||||
<tr class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
|
||||
|
||||
<td class="product-remove">
|
||||
<?php
|
||||
echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
'woocommerce_cart_item_remove_link',
|
||||
sprintf(
|
||||
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">×</a>',
|
||||
esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
|
||||
esc_html__( 'Remove this item', 'woocommerce' ),
|
||||
esc_attr( $product_id ),
|
||||
esc_attr( $_product->get_sku() )
|
||||
),
|
||||
$cart_item_key
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-thumbnail">
|
||||
<?php
|
||||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||
|
||||
if ( ! $product_permalink ) {
|
||||
echo $thumbnail; // PHPCS: XSS ok.
|
||||
} else {
|
||||
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ); // PHPCS: XSS ok.
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( ! $product_permalink ) {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . ' ' );
|
||||
} else {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key );
|
||||
|
||||
// Meta data.
|
||||
echo wc_get_formatted_cart_item_data( $cart_item ); // PHPCS: XSS ok.
|
||||
|
||||
// Backorder notification.
|
||||
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>', $product_id ) );
|
||||
}
|
||||
|
||||
// Mobile price.
|
||||
?>
|
||||
<div class="show-for-small mobile-product-price">
|
||||
<span class="mobile-product-price__qty"><?php echo $cart_item['quantity']; ?> x </span>
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="product-price" data-title="<?php esc_attr_e( 'Price', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( $_product->is_sold_individually() ) {
|
||||
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
|
||||
} else {
|
||||
$product_quantity = woocommerce_quantity_input(
|
||||
array(
|
||||
'input_name' => "cart[{$cart_item_key}][qty]",
|
||||
'input_value' => $cart_item['quantity'],
|
||||
'max_value' => $_product->get_max_purchase_quantity(),
|
||||
'min_value' => '0',
|
||||
'product_name' => $_product->get_name(),
|
||||
),
|
||||
$_product,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-subtotal" data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_contents' ); ?>
|
||||
|
||||
<tr>
|
||||
<td colspan="6" class="actions clear">
|
||||
|
||||
<?php do_action( 'woocommerce_cart_actions' ); ?>
|
||||
|
||||
<button type="submit" class="button primary mt-0 pull-left small" name="update_cart" value="<?php esc_attr_e( 'Update cart', 'woocommerce' ); ?>"><?php esc_html_e( 'Update cart', 'woocommerce' ); ?></button>
|
||||
|
||||
<?php wp_nonce_field( 'woocommerce-cart', 'woocommerce-cart-nonce' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_after_cart_contents' ); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php do_action( 'woocommerce_after_cart_table' ); ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_before_cart_collaterals' ); ?>
|
||||
|
||||
<div class="cart-collaterals large-5 col pb-0">
|
||||
<?php flatsome_sticky_column_open( 'cart_sticky_sidebar' ); ?>
|
||||
|
||||
<div class="cart-sidebar col-inner <?php echo $sidebar_classes; ?>">
|
||||
<?php
|
||||
/**
|
||||
* Cart collaterals hook.
|
||||
*
|
||||
* @hooked woocommerce_cross_sell_display
|
||||
* @hooked woocommerce_cart_totals - 10
|
||||
*/
|
||||
do_action( 'woocommerce_cart_collaterals' );
|
||||
?>
|
||||
<?php if ( wc_coupons_enabled() ) { ?>
|
||||
<form class="checkout_coupon mb-0" method="post">
|
||||
<div class="coupon">
|
||||
<h3 class="widget-title"><?php echo get_flatsome_icon( 'icon-tag' ); ?> <?php esc_html_e( 'Coupon', 'woocommerce' ); ?></h3><input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" /> <input type="submit" class="is-form expand" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>" />
|
||||
<?php do_action( 'woocommerce_cart_coupon' ); ?>
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
<?php do_action( 'flatsome_cart_sidebar' ); ?>
|
||||
</div>
|
||||
|
||||
<?php flatsome_sticky_column_close( 'cart_sticky_sidebar' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_cart' ); ?>
|
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Continue Shopping Button
|
||||
*
|
||||
* @package Flatsome/WooCommerce/Templates
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit; ?>
|
||||
|
||||
<div class="continue-shopping pull-left text-left">
|
||||
<a class="button-continue-shopping button primary is-outline" href="<?php echo esc_url( apply_filters( 'woocommerce_continue_shopping_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
|
||||
<?php echo ( is_rtl() ? '→' : '←' ) . ' ' . esc_html__( 'Continue shopping', 'woocommerce' ); ?>
|
||||
</a>
|
||||
</div>
|
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout Form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.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.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$wrapper_classes = array();
|
||||
$row_classes = array();
|
||||
$main_classes = array();
|
||||
$sidebar_classes = array();
|
||||
|
||||
$layout = get_theme_mod( 'checkout_layout' );
|
||||
|
||||
if ( ! $layout ) {
|
||||
$sidebar_classes[] = 'has-border';
|
||||
}
|
||||
|
||||
if ( $layout == 'simple' ) {
|
||||
$sidebar_classes[] = 'is-well';
|
||||
}
|
||||
|
||||
$wrapper_classes = implode( ' ', $wrapper_classes );
|
||||
$row_classes = implode( ' ', $row_classes );
|
||||
$main_classes = implode( ' ', $main_classes );
|
||||
$sidebar_classes = implode( ' ', $sidebar_classes );
|
||||
|
||||
do_action( 'woocommerce_before_checkout_form', $checkout );
|
||||
|
||||
// If checkout registration is disabled and not logged in, the user cannot checkout.
|
||||
if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in() ) {
|
||||
echo esc_html( apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) ) );
|
||||
return;
|
||||
}
|
||||
|
||||
// Social login.
|
||||
if ( flatsome_option( 'facebook_login_checkout' ) && get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' && ! is_user_logged_in() ) {
|
||||
wc_get_template( 'checkout/social-login.php' );
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="checkout" method="post" class="checkout woocommerce-checkout <?php echo esc_attr( $wrapper_classes ); ?>" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">
|
||||
|
||||
<div class="row pt-0 <?php echo esc_attr( $row_classes ); ?>">
|
||||
<div class="large-7 col <?php echo esc_attr( $main_classes ); ?>">
|
||||
<?php if ( $checkout->get_checkout_fields() ) : ?>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
|
||||
|
||||
<div id="customer_details">
|
||||
<div class="clear">
|
||||
<?php do_action( 'woocommerce_checkout_billing' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
<?php do_action( 'woocommerce_checkout_shipping' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="large-5 col">
|
||||
<?php flatsome_sticky_column_open( 'checkout_sticky_sidebar' ); ?>
|
||||
|
||||
<div class="col-inner <?php echo esc_attr( $sidebar_classes ); ?>">
|
||||
<div class="checkout-sidebar sm-touch-scroll">
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_order_review_heading' ); ?>
|
||||
|
||||
<h3 id="order_review_heading"><?php esc_html_e( 'Your order', 'woocommerce' ); ?></h3>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
|
||||
|
||||
<div id="order_review" class="woocommerce-checkout-review-order">
|
||||
<?php do_action( 'woocommerce_checkout_order_review' ); ?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php flatsome_sticky_column_close( 'checkout_sticky_sidebar' ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php do_action( 'woocommerce_after_checkout_form', $checkout ); ?>
|
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout coupon form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-coupon.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.4.4
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine.
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="woocommerce-form-coupon-toggle">
|
||||
<?php wc_print_notice( apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'woocommerce' ) . ' <a href="#" class="showcoupon">' . __( 'Click here to enter your code', 'woocommerce' ) . '</a>' ), 'notice' ); ?>
|
||||
</div>
|
||||
|
||||
<form class="checkout_coupon woocommerce-form-coupon has-border is-dashed" method="post" style="display:none">
|
||||
|
||||
<p><?php esc_html_e( 'If you have a coupon code, please apply it below.', 'woocommerce' ); ?></p>
|
||||
<div class="coupon">
|
||||
<div class="flex-row medium-flex-wrap">
|
||||
<div class="flex-col flex-grow">
|
||||
<input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" />
|
||||
</div>
|
||||
<div class="flex-col">
|
||||
<button type="submit" class="button expand" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
function flatsome_checkout_breadcrumb_class( $endpoint ) {
|
||||
$classes = array();
|
||||
if ( $endpoint == 'cart' && is_cart() ||
|
||||
$endpoint == 'checkout' && is_checkout() && ! is_wc_endpoint_url( 'order-received' ) ||
|
||||
$endpoint == 'order-received' && is_wc_endpoint_url( 'order-received' ) ) {
|
||||
$classes[] = 'current';
|
||||
} else {
|
||||
$classes[] = 'hide-for-small';
|
||||
}
|
||||
|
||||
return implode( ' ', $classes );
|
||||
}
|
||||
|
||||
$steps = get_theme_mod( 'cart_steps_numbers', 0 );
|
||||
?>
|
||||
|
||||
<nav class="breadcrumbs flex-row flex-row-start checkout-breadcrumbs text-left medium-text-center is-large <?php echo get_theme_mod( 'cart_steps_case', 'uppercase' ); ?>">
|
||||
<i class="icon-lock op-5"></i>
|
||||
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="<?php echo flatsome_checkout_breadcrumb_class( 'cart' ); ?>">
|
||||
<?php if ( $steps ) echo '<span class="breadcrumb-step hide-for-small">1</span>'; ?>
|
||||
<?php esc_html_e( 'Shopping Cart', 'flatsome' ); ?>
|
||||
</a>
|
||||
<span class="divider hide-for-small"><?php echo get_flatsome_icon( 'icon-angle-right' ); ?></span>
|
||||
<a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" class="<?php echo flatsome_checkout_breadcrumb_class( 'checkout' ); ?>">
|
||||
<?php if ( $steps ) echo '<span class="breadcrumb-step hide-for-small">2</span>'; ?>
|
||||
<?php esc_html_e( 'Checkout details', 'flatsome' ); ?>
|
||||
</a>
|
||||
<span class="divider hide-for-small"><?php echo get_flatsome_icon( 'icon-angle-right' ); ?></span>
|
||||
<a href="#" class="no-click <?php echo flatsome_checkout_breadcrumb_class( 'order-received' ); ?>">
|
||||
<?php if ( $steps ) echo '<span class="breadcrumb-step hide-for-small">3</span>'; ?>
|
||||
<?php esc_html_e( 'Order Complete', 'flatsome' ); ?>
|
||||
</a>
|
||||
</nav>
|
37
wp-content/themes/flatsome/woocommerce/checkout/header.php
Normal file
37
wp-content/themes/flatsome/woocommerce/checkout/header.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
function flatsome_checkout_breadcrumb_class($endpoint){
|
||||
$classes = array();
|
||||
if($endpoint == 'cart' && is_cart() ||
|
||||
$endpoint == 'checkout' && is_checkout() && !is_wc_endpoint_url('order-received') ||
|
||||
$endpoint == 'order-received' && is_wc_endpoint_url('order-received')) {
|
||||
$classes[] = 'current';
|
||||
} else{
|
||||
$classes[] = 'hide-for-small';
|
||||
}
|
||||
return implode(' ', $classes);
|
||||
}
|
||||
$steps = get_theme_mod('cart_steps_numbers', 0);
|
||||
?>
|
||||
|
||||
<div class="checkout-page-title page-title">
|
||||
<div class="page-title-inner flex-row medium-flex-wrap container">
|
||||
<div class="flex-col flex-grow medium-text-center">
|
||||
<nav class="breadcrumbs flex-row flex-row-center heading-font checkout-breadcrumbs text-center strong <?php echo get_theme_mod('cart_steps_size','h2'); ?> <?php echo get_theme_mod('cart_steps_case','uppercase'); ?>">
|
||||
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="<?php echo flatsome_checkout_breadcrumb_class('cart'); ?>">
|
||||
<?php if($steps) { echo '<span class="breadcrumb-step hide-for-small">1</span>'; } ?>
|
||||
<?php _e('Shopping Cart', 'flatsome'); ?>
|
||||
</a>
|
||||
<span class="divider hide-for-small"><?php echo get_flatsome_icon('icon-angle-right');?></span>
|
||||
<a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" class="<?php echo flatsome_checkout_breadcrumb_class('checkout') ?>">
|
||||
<?php if($steps) { echo '<span class="breadcrumb-step hide-for-small">2</span>'; } ?>
|
||||
<?php _e('Checkout details', 'flatsome'); ?>
|
||||
</a>
|
||||
<span class="divider hide-for-small"><?php echo get_flatsome_icon('icon-angle-right');?></span>
|
||||
<a href="#" class="no-click <?php echo flatsome_checkout_breadcrumb_class('order-received'); ?>">
|
||||
<?php if($steps) { echo '<span class="breadcrumb-step hide-for-small">3</span>'; } ?>
|
||||
<?php _e('Order Complete', 'flatsome'); ?>
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if lte IE 9 ]>
|
||||
<html class="ie lt-ie9" <?php language_attributes(); ?>> <![endif]-->
|
||||
<!--[if (gte IE 9)|!(IE)]><!-->
|
||||
<html <?php language_attributes(); ?>> <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>"/>
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11"/>
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"/>
|
||||
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<div id="main-content" class="site-main" style="max-width:1000px; margin:60px auto 60px auto;">
|
||||
|
||||
<div id="main" class="page-wrapper box-shadow page-checkout" style="padding:15px 30px 15px;">
|
||||
|
||||
<div class="focused-checkout-logo text-center" style="padding-top: 30px; padding-bottom: 30px;">
|
||||
<div id="logo" class="logo"><?php get_template_part( 'template-parts/header/partials/element', 'logo' ); ?></div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="top-divider full-width"></div>
|
||||
</div>
|
||||
|
||||
<div class="focused-checkout-header pb">
|
||||
<?php wc_get_template( 'checkout/header.php' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div id="content" class="large-12 col" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php wc_print_notices(); ?>
|
||||
<?php the_content(); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="focused-checkout-footer">
|
||||
<?php get_template_part( 'template-parts/footer/footer', 'absolute' ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if lte IE 9 ]>
|
||||
<html class="ie lt-ie9" <?php language_attributes(); ?>> <![endif]-->
|
||||
<!--[if (gte IE 9)|!(IE)]><!-->
|
||||
<html <?php language_attributes(); ?>> <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>"/>
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11"/>
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"/>
|
||||
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<div id="main-content" class="site-main">
|
||||
|
||||
<div id="main" class="page-checkout-simple">
|
||||
|
||||
<div id="content" role="main">
|
||||
<div class="container">
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<div class="cart-header text-left medium-text-center">
|
||||
<div id="logo" class="logo"><?php get_template_part( 'template-parts/header/partials/element', 'logo' ); ?></div>
|
||||
<?php wc_get_template( 'checkout/header-small.php' ); ?>
|
||||
</div>
|
||||
<?php wc_print_notices(); ?>
|
||||
<?php the_content(); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="focused-checkout-footer">
|
||||
<?php get_template_part( 'template-parts/footer/footer', 'absolute' ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
// Default checkout layout
|
||||
get_header(); ?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
wc_get_template( 'checkout/header.php' );
|
||||
|
||||
echo '<div class="cart-container container page-wrapper page-checkout">';
|
||||
wc_print_notices();
|
||||
the_content();
|
||||
echo '</div>';
|
||||
?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
<?php get_footer(); ?>
|
@@ -0,0 +1,23 @@
|
||||
<div class="text-left social-login pb-half pt-half">
|
||||
<?php if ( is_nextend_facebook_login() && get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' && ! is_user_logged_in() ) :
|
||||
$facebook_url = add_query_arg( array( 'loginSocial' => 'facebook' ), wp_login_url() );
|
||||
?>
|
||||
|
||||
<a href="<?php echo esc_url( $facebook_url ); ?>" class="button social-button large facebook circle" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="facebook" data-popupwidth="475" data-popupheight="175">
|
||||
<i class="icon-facebook"></i>
|
||||
<span><?php _e( 'Login with <strong>Facebook</strong>', 'flatsome' ); ?></span>
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_nextend_google_login() && get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' && ! is_user_logged_in() ) :
|
||||
$google_url = add_query_arg( array( 'loginSocial' => 'google' ), wp_login_url() );
|
||||
?>
|
||||
|
||||
<a href="<?php echo esc_url( $google_url ); ?>" class="button social-button large google-plus circle" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="google" data-popupwidth="600" data-popupheight="600">
|
||||
<i class="icon-google-plus"></i>
|
||||
<span><?php _e( 'Login with <strong>Google</strong>', 'flatsome' ); ?></span>
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
44
wp-content/themes/flatsome/woocommerce/checkout/terms.php
Normal file
44
wp-content/themes/flatsome/woocommerce/checkout/terms.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout terms and conditions area.
|
||||
*
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( apply_filters( 'woocommerce_checkout_show_terms', true ) && function_exists( 'wc_terms_and_conditions_checkbox_enabled' ) ) {
|
||||
do_action( 'woocommerce_checkout_before_terms_and_conditions' );
|
||||
|
||||
?>
|
||||
<div class="woocommerce-terms-and-conditions-wrapper">
|
||||
<?php
|
||||
/**
|
||||
* Terms and conditions hook used to inject content.
|
||||
*
|
||||
* @since 3.4.0.
|
||||
* @hooked wc_checkout_privacy_policy_text() Shows custom privacy policy text. Priority 20.
|
||||
* @hooked wc_terms_and_conditions_page_content() Shows t&c page content. Priority 30.
|
||||
*/
|
||||
do_action( 'woocommerce_checkout_terms_and_conditions' );
|
||||
?>
|
||||
|
||||
<?php if ( wc_terms_and_conditions_checkbox_enabled() ) : ?>
|
||||
<p class="form-row validate-required">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
|
||||
<input type="checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" name="terms" <?php checked( apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) ), true ); // WPCS: input var ok, csrf ok. ?> id="terms" />
|
||||
<?php if ( $link_style = get_theme_mod( 'checkout_terms_and_conditions' ) ) : ?>
|
||||
<span class="woocommerce-terms-and-conditions-checkbox-text"><?php flatsome_terms_and_conditions_checkbox_text( $link_style ); ?></span> <span class="required">*</span>
|
||||
<?php else : ?>
|
||||
<span class="woocommerce-terms-and-conditions-checkbox-text"><?php wc_terms_and_conditions_checkbox_text(); ?></span> <span class="required">*</span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<input type="hidden" name="terms-field" value="1" />
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
do_action( 'woocommerce_checkout_after_terms_and_conditions' );
|
||||
}
|
103
wp-content/themes/flatsome/woocommerce/checkout/thankyou.php
Normal file
103
wp-content/themes/flatsome/woocommerce/checkout/thankyou.php
Normal file
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
/**
|
||||
* Thankyou page
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou.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.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ( $order ) :
|
||||
|
||||
do_action( 'woocommerce_before_thankyou', $order->get_id() ); ?>
|
||||
|
||||
<?php if ( $order->has_status( 'failed' ) ) : ?>
|
||||
<div class="large-12 col order-failed">
|
||||
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed"><?php esc_html_e( 'Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.', 'woocommerce' ); ?></p>
|
||||
|
||||
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed-actions">
|
||||
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php esc_html_e( 'Pay', 'woocommerce' ); ?></a>
|
||||
<?php if ( is_user_logged_in() ) : ?>
|
||||
<a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>" class="button pay"><?php esc_html_e( 'My account', 'woocommerce' ); ?></a>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
<div class="large-7 col">
|
||||
|
||||
<?php
|
||||
$get_payment_method = $order->get_payment_method();
|
||||
$get_order_id = $order->get_id();
|
||||
?>
|
||||
<?php do_action( 'woocommerce_thankyou_' . $get_payment_method, $get_order_id ); ?>
|
||||
<?php do_action( 'woocommerce_thankyou', $get_order_id ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="large-5 col">
|
||||
<div class="is-well col-inner entry-content">
|
||||
<p class="success-color woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><strong><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), $order ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong></p>
|
||||
|
||||
<ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details">
|
||||
|
||||
<li class="woocommerce-order-overview__order order">
|
||||
<?php esc_html_e( 'Order number:', 'woocommerce' ); ?>
|
||||
<strong><?php echo $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
</li>
|
||||
|
||||
<li class="woocommerce-order-overview__date date">
|
||||
<?php esc_html_e( 'Date:', 'woocommerce' ); ?>
|
||||
<strong><?php echo wc_format_datetime( $order->get_date_created() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
</li>
|
||||
|
||||
<?php if ( is_user_logged_in() && $order->get_user_id() === get_current_user_id() && $order->get_billing_email() ) : ?>
|
||||
<li class="woocommerce-order-overview__email email">
|
||||
<?php esc_html_e( 'Email:', 'woocommerce' ); ?>
|
||||
<strong><?php echo $order->get_billing_email(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<li class="woocommerce-order-overview__total total">
|
||||
<?php esc_html_e( 'Total:', 'woocommerce' ); ?>
|
||||
<strong><?php echo $order->get_formatted_order_total(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
$payment_method_title = $order->get_payment_method_title();
|
||||
if ( $payment_method_title ) :
|
||||
?>
|
||||
<li class="woocommerce-order-overview__payment-method method">
|
||||
<?php esc_html_e( 'Payment method:', 'woocommerce' ); ?>
|
||||
<strong><?php echo wp_kses_post( $payment_method_title ); ?></strong>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), null ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product category thumbnails within loops
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-product-cat.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.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$cat_style = get_theme_mod( 'cat_style', 'badge' );
|
||||
$color = '';
|
||||
$text_pos = '';
|
||||
|
||||
if ( $cat_style == 'overlay' || $cat_style == 'shade' ) {
|
||||
$color = 'dark';
|
||||
}
|
||||
if ( $cat_style == 'overlay' ) {
|
||||
$text_pos = 'box-text-middle text-shadow-5';
|
||||
}
|
||||
if ( $cat_style == 'badge' ) {
|
||||
$text_pos .= ' hover-dark';
|
||||
}
|
||||
|
||||
$classes = array( 'product-category', 'col' );
|
||||
?>
|
||||
<div <?php wc_product_cat_class( $classes, $category ); ?>>
|
||||
<div class="col-inner">
|
||||
<?php
|
||||
/**
|
||||
* The woocommerce_before_subcategory hook.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_category_link_open - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_subcategory', $category );
|
||||
?>
|
||||
|
||||
<div class="box box-<?php echo $cat_style; ?> <?php echo $text_pos; ?> <?php echo $color; ?>">
|
||||
<div class="box-image">
|
||||
<?php
|
||||
/**
|
||||
* The woocommerce_before_subcategory_title hook.
|
||||
*
|
||||
* @hooked woocommerce_subcategory_thumbnail - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_subcategory_title', $category );
|
||||
?>
|
||||
|
||||
<?php if ( $cat_style == 'overlay' ) { ?>
|
||||
<div class="overlay"></div><?php } ?>
|
||||
<?php if ( $cat_style == 'shade' ) { ?>
|
||||
<div class="shade"></div><?php } ?>
|
||||
</div>
|
||||
<div class="box-text text-center">
|
||||
<div class="box-text-inner">
|
||||
<h5 class="uppercase header-title">
|
||||
<?php echo $category->name; ?>
|
||||
</h5>
|
||||
<?php if ( get_theme_mod( 'category_show_count', 1 ) ) : ?>
|
||||
<p class="is-xsmall uppercase count">
|
||||
<?php if ( $category->count > 0 ) {
|
||||
echo apply_filters( 'woocommerce_subcategory_count_html', $category->count . ' ' . ( $category->count > 1 ? __( 'Products', 'woocommerce' ) : __( 'Product', 'woocommerce' ) ), $category );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
/**
|
||||
* The woocommerce_after_subcategory_title hook.
|
||||
*/
|
||||
do_action( 'woocommerce_after_subcategory_title', $category );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* The woocommerce_after_subcategory hook.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_category_link_close - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_subcategory', $category );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying lookbook product style content within loops.
|
||||
*
|
||||
* Override this template by copying it to yourtheme/woocommerce/content-product.php
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 1.6.4
|
||||
*/
|
||||
|
||||
global $product, $woocommerce_loop, $flatsome_opt;
|
||||
|
||||
/* PRODUCT QUICK VIEW HOOKS */
|
||||
add_action( 'woocommerce_single_product_flipbook_summary', 'woocommerce_template_single_price', 10 );
|
||||
add_action( 'woocommerce_single_product_flipbook_summary', 'woocommerce_template_single_excerpt', 20 );
|
||||
add_action( 'woocommerce_single_product_flipbook_summary', 'woocommerce_template_single_meta', 40 );
|
||||
|
||||
?>
|
||||
<div class="row row-collapse align-middle flip-slide" style="width:100%">
|
||||
<div class="large-6 col flip-page-one">
|
||||
<div class="featured-product col-inner">
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<div class="product-image relative">
|
||||
<div class="front-image">
|
||||
<?php echo get_the_post_thumbnail( $post->ID, apply_filters( 'woocommerce_gallery_image_size', 'woocommerce_single' )) ?>
|
||||
</div>
|
||||
<?php wc_get_template( 'loop/sale-flash.php' ); ?>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="large-6 col flip-page-two">
|
||||
<div class="product-info col-inner inner-padding">
|
||||
<h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
|
||||
<div class="is-divider medium"></div>
|
||||
<?php do_action( 'woocommerce_single_product_flipbook_summary' ); ?>
|
||||
<a href="<?php the_permalink(); ?>" class="button"><?php _e( 'Read more', 'woocommerce' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,9 @@
|
||||
<?php global $product; ?>
|
||||
<li>
|
||||
<a href="<?php echo esc_url( get_permalink( $product->get_id() ) ); ?>" title="<?php echo esc_attr( $product->get_title() ); ?>">
|
||||
<?php echo $product->get_image( 'woocommerce_gallery_thumbnail' ); ?>
|
||||
<span class="product-title"><?php echo $product->get_title(); ?></span>
|
||||
</a>
|
||||
<?php if ( ! empty( $show_rating ) ) echo $product->get_rating_html(); ?>
|
||||
<?php echo $product->get_price_html(); ?>
|
||||
</li>
|
87
wp-content/themes/flatsome/woocommerce/content-product.php
Normal file
87
wp-content/themes/flatsome/woocommerce/content-product.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?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 ) || false === wc_get_loop_product_visibility( $product->get_id() ) || ! $product->is_visible() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check stock status.
|
||||
$out_of_stock = ! $product->is_in_stock();
|
||||
|
||||
// Extra post classes.
|
||||
$classes = array();
|
||||
$classes[] = 'product-small';
|
||||
$classes[] = 'col';
|
||||
$classes[] = 'has-hover';
|
||||
|
||||
if ( $out_of_stock ) $classes[] = 'out-of-stock';
|
||||
|
||||
?><div <?php wc_product_class( $classes, $product ); ?>>
|
||||
<div class="col-inner">
|
||||
<?php do_action( 'woocommerce_before_shop_loop_item' ); ?>
|
||||
<div class="product-small box <?php echo flatsome_product_box_class(); ?>">
|
||||
<div class="box-image">
|
||||
<div class="<?php echo flatsome_product_box_image_class(); ?>">
|
||||
<a href="<?php echo get_the_permalink(); ?>" aria-label="<?php echo esc_attr( $product->get_title() ); ?>">
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @hooked woocommerce_get_alt_product_thumbnail - 11
|
||||
* @hooked woocommerce_template_loop_product_thumbnail - 10
|
||||
*/
|
||||
do_action( 'flatsome_woocommerce_shop_loop_images' );
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="image-tools is-small top right show-on-hover">
|
||||
<?php do_action( 'flatsome_product_box_tools_top' ); ?>
|
||||
</div>
|
||||
<div class="image-tools is-small hide-for-small bottom left show-on-hover">
|
||||
<?php do_action( 'flatsome_product_box_tools_bottom' ); ?>
|
||||
</div>
|
||||
<div class="image-tools <?php echo flatsome_product_box_actions_class(); ?>">
|
||||
<?php do_action( 'flatsome_product_box_actions' ); ?>
|
||||
</div>
|
||||
<?php if ( $out_of_stock ) { ?><div class="out-of-stock-label"><?php _e( 'Out of stock', 'woocommerce' ); ?></div><?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="box-text <?php echo flatsome_product_box_text_class(); ?>">
|
||||
<?php
|
||||
do_action( 'woocommerce_before_shop_loop_item_title' );
|
||||
|
||||
echo '<div class="title-wrapper">';
|
||||
do_action( 'woocommerce_shop_loop_item_title' );
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '<div class="price-wrapper">';
|
||||
do_action( 'woocommerce_after_shop_loop_item_title' );
|
||||
echo '</div>';
|
||||
|
||||
do_action( 'flatsome_product_box_after' );
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php do_action( 'woocommerce_after_shop_loop_item' ); ?>
|
||||
</div>
|
||||
</div><?php /* empty PHP to avoid whitespace */ ?>
|
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product category thumbnails within loops
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-product_cat.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 http://docs.woothemes.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 4.7.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Old template used for lower then WC 4.7.0
|
||||
* New template file is renamed to content-product-cat.php
|
||||
*
|
||||
* While the old template is still BC, the versioning in
|
||||
* WC status does not work for this template.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$cat_style = get_theme_mod( 'cat_style', 'badge' );
|
||||
$color = '';
|
||||
$text_pos = '';
|
||||
|
||||
if ( $cat_style == 'overlay' || $cat_style == 'shade' ) {
|
||||
$color = 'dark';
|
||||
}
|
||||
if ( $cat_style == 'overlay' ) {
|
||||
$text_pos = 'box-text-middle text-shadow-5';
|
||||
}
|
||||
if ( $cat_style == 'badge' ) {
|
||||
$text_pos .= ' hover-dark';
|
||||
}
|
||||
|
||||
$classes = array( 'product-category', 'col' );
|
||||
?>
|
||||
<div <?php wc_product_cat_class( $classes, $category ); ?>>
|
||||
<div class="col-inner">
|
||||
<?php do_action( 'woocommerce_before_subcategory', $category ); ?>
|
||||
|
||||
<div class="box box-<?php echo $cat_style; ?> <?php echo $text_pos; ?> <?php echo $color; ?>">
|
||||
<div class="box-image">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_subcategory_title hook
|
||||
*
|
||||
* @hooked woocommerce_subcategory_thumbnail - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_subcategory_title', $category );
|
||||
?>
|
||||
<?php if ( $cat_style == 'overlay' ) { ?>
|
||||
<div class="overlay"></div><?php } ?>
|
||||
<?php if ( $cat_style == 'shade' ) { ?>
|
||||
<div class="shade"></div><?php } ?>
|
||||
</div>
|
||||
<div class="box-text text-center">
|
||||
<div class="box-text-inner">
|
||||
<h5 class="uppercase header-title">
|
||||
<?php echo $category->name; ?>
|
||||
</h5>
|
||||
<?php if ( get_theme_mod( 'category_show_count', 1 ) ) : ?>
|
||||
<p class="is-xsmall uppercase count">
|
||||
<?php if ( $category->count > 0 ) {
|
||||
echo apply_filters( 'woocommerce_subcategory_count_html', $category->count . ' ' . ( $category->count > 1 ? __( 'Products', 'woocommerce' ) : __( 'Product', 'woocommerce' ) ), $category );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_subcategory_title hook
|
||||
*/
|
||||
do_action( 'woocommerce_after_subcategory_title', $category );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_subcategory', $category ); ?>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product content in the single-product.php template
|
||||
*
|
||||
* Override this template by copying it to yourtheme/woocommerce/content-single-product.php
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
global $product;
|
||||
|
||||
$layout = flatsome_product_block( get_the_ID() );
|
||||
$layout_id = $layout['id'];
|
||||
$layout_scope = $layout['scope'];
|
||||
|
||||
$classes = array(
|
||||
'custom-product-page',
|
||||
'ux-layout-' . $layout_id,
|
||||
'ux-layout-scope-' . $layout_scope,
|
||||
)
|
||||
|
||||
|
||||
?>
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* Hook Woocommerce_before_single_product.
|
||||
*
|
||||
* @hooked wc_print_notices - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product' );
|
||||
do_action( 'flatsome_before_single_product_custom' );
|
||||
if ( post_password_required() ) {
|
||||
echo get_the_password_form(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
return;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div id="product-<?php the_ID(); ?>" <?php wc_product_class( '', $product ); ?>>
|
||||
|
||||
<div class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
||||
|
||||
<?php echo flatsome_apply_shortcode( 'block', array( 'id' => $layout_id ) ); ?>
|
||||
<div id="product-sidebar" class="mfp-hide">
|
||||
<div class="sidebar-inner">
|
||||
<?php
|
||||
do_action( 'flatsome_before_product_sidebar' );
|
||||
/**
|
||||
* The woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if ( is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar( 'product-sidebar' );
|
||||
} elseif ( is_active_sidebar( 'shop-sidebar' ) ) {
|
||||
dynamic_sidebar( 'shop-sidebar' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_single_product' ); ?>
|
||||
|
||||
</div>
|
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Quick View
|
||||
*
|
||||
* @package Flatsome
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
global $post, $product;
|
||||
|
||||
do_action( 'wc_quick_view_before_single_product' );
|
||||
?>
|
||||
<div class="product-quick-view-container">
|
||||
<div class="row row-collapse mb-0 product" id="product-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="product-gallery large-6 col">
|
||||
<div class="slider slider-show-nav product-gallery-slider main-images mb-0">
|
||||
<?php if ( has_post_thumbnail() ) :
|
||||
|
||||
$image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );
|
||||
$image_link = wp_get_attachment_url( get_post_thumbnail_id() );
|
||||
$image = get_the_post_thumbnail( $post->ID, apply_filters( 'woocommerce_gallery_image_size', 'woocommerce_single' ), array(
|
||||
'title' => $image_title,
|
||||
) );
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<div class="slide first">%s</div>', $image ), $post->ID ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
// Additional images.
|
||||
$attachment_ids = $product->get_gallery_image_ids();
|
||||
if ( $attachment_ids ) {
|
||||
$loop = 0;
|
||||
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 3 );
|
||||
|
||||
foreach ( $attachment_ids as $attachment_id ) {
|
||||
$image_title = esc_attr( get_the_title( $attachment_id ) );
|
||||
$image = wp_get_attachment_image( $attachment_id, apply_filters( 'woocommerce_gallery_image_size', 'woocommerce_single' ), array(
|
||||
'title' => $image_title,
|
||||
'alt' => $image_title,
|
||||
) );
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<div class="slide">%s</div>', $image ), $attachment_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
};
|
||||
else :
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<img src="%s" alt="%s" />', wc_placeholder_img_src( 'woocommerce_single' ), esc_html__( 'Awaiting product image', 'woocommerce' ) ), $post->ID ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_before_single_product_lightbox_summary' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary large-6 col entry-summary" style="font-size:90%;">
|
||||
<div class="product-lightbox-inner" style="padding: 30px;">
|
||||
<a class="plain" href="<?php the_permalink(); ?>"><h1><?php the_title(); ?></h1></a>
|
||||
<div class="is-divider small"></div>
|
||||
|
||||
<?php do_action( 'woocommerce_single_product_lightbox_summary' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'wc_quick_view_after_single_product' ); ?>
|
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product content in the single-product.php template
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-single-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;
|
||||
|
||||
?>
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_before_single_product.
|
||||
*
|
||||
* @hooked wc_print_notices - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product' );
|
||||
|
||||
if ( post_password_required() ) {
|
||||
echo get_the_password_form(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
return;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div id="product-<?php the_ID(); ?>" <?php wc_product_class( '', $product ); ?>>
|
||||
<?php
|
||||
// Get product page layout.
|
||||
wc_get_template_part( 'single-product/layouts/product', flatsome_option( 'product_layout' ) );
|
||||
|
||||
do_action( 'woocommerce_after_single_product' );
|
||||
?>
|
||||
</div>
|
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product widget entries.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-widget-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.5.5
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $product;
|
||||
|
||||
if ( ! is_a( $product, 'WC_Product' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<li>
|
||||
<?php do_action( 'woocommerce_widget_product_item_start', $args ); ?>
|
||||
|
||||
<a href="<?php echo esc_url( $product->get_permalink() ); ?>">
|
||||
<?php echo $product->get_image( 'woocommerce_gallery_thumbnail' ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<span class="product-title"><?php echo wp_kses_post( $product->get_name() ); ?></span>
|
||||
</a>
|
||||
|
||||
<?php if ( ! empty( $show_rating ) ) : ?>
|
||||
<?php echo wc_get_rating_html( $product->get_average_rating() ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $product->get_price_html(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
|
||||
<?php do_action( 'woocommerce_widget_product_item_end', $args ); ?>
|
||||
</li>
|
53
wp-content/themes/flatsome/woocommerce/global/breadcrumb.php
Normal file
53
wp-content/themes/flatsome/woocommerce/global/breadcrumb.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Shop breadcrumb
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.3.0
|
||||
* @see woocommerce_breadcrumb()
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( !empty($breadcrumb) ) {
|
||||
|
||||
do_action('flatsome_before_breadcrumb');
|
||||
|
||||
echo $wrap_before;
|
||||
|
||||
foreach ( $breadcrumb as $key => $crumb ) {
|
||||
|
||||
echo $before;
|
||||
|
||||
if ( ! empty( $crumb[1] ) && sizeof( $breadcrumb ) !== $key + 1 ) {
|
||||
echo '<a href="' . esc_url( $crumb[1] ) . '">' . esc_html( $crumb[0] ) . '</a>';
|
||||
} else if(!is_product() && !flatsome_option('wc_category_page_title')) {
|
||||
echo esc_html( $crumb[0] );
|
||||
}
|
||||
|
||||
echo $after;
|
||||
|
||||
// Single product or Active title
|
||||
if(is_product() || flatsome_option('wc_category_page_title')){
|
||||
$key = $key+1;
|
||||
if ( sizeof( $breadcrumb ) > $key+1) {
|
||||
echo ' <span class="divider">'.$delimiter.'</span> ';
|
||||
}
|
||||
} else{
|
||||
|
||||
// Category pages
|
||||
if ( sizeof( $breadcrumb ) !== $key + 1 ) {
|
||||
echo ' <span class="divider">'.$delimiter.'</span> ';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo $wrap_after;
|
||||
|
||||
do_action('flatsome_after_breadcrumb');
|
||||
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
<?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;
|
||||
|
||||
$qty_start = '<input type="button" value="-" class="minus button is-form">';
|
||||
$qty_end = '<input type="button" value="+" class="plus button is-form">';
|
||||
|
||||
if ( $max_value && $min_value === $max_value ) {
|
||||
?>
|
||||
<div class="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', 'woocommerce' ), wp_strip_all_tags( $args['product_name'] ) ) : esc_html__( 'Quantity', 'woocommerce' );
|
||||
// Add wrapper classes.
|
||||
$wrapper_classes = array( 'quantity', 'buttons_added' );
|
||||
if ( get_theme_mod( 'product_info_form' ) ) {
|
||||
$wrapper_classes[] = 'form-' . get_theme_mod( 'product_info_form', 'normal' );
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo implode( ' ', $wrapper_classes ); ?>">
|
||||
<?php echo $qty_start; ?>
|
||||
<?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>
|
||||
<input
|
||||
type="number"
|
||||
id="<?php echo esc_attr( $input_id ); ?>"
|
||||
class="<?php echo esc_attr( join( ' ', (array) $classes ) ); ?>"
|
||||
step="<?php echo esc_attr( $step ); ?>"
|
||||
min="<?php echo esc_attr( $min_value ); ?>"
|
||||
max="<?php echo esc_attr( 0 < $max_value ? $max_value : '' ); ?>"
|
||||
name="<?php echo esc_attr( $input_name ); ?>"
|
||||
value="<?php echo esc_attr( $input_value ); ?>"
|
||||
title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'woocommerce' ); ?>"
|
||||
size="4"
|
||||
placeholder="<?php echo esc_attr( $placeholder ); ?>"
|
||||
inputmode="<?php echo esc_attr( $inputmode ); ?>" />
|
||||
<?php do_action( 'woocommerce_after_quantity_input_field' ); ?>
|
||||
<?php echo $qty_end; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Content wrappers
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
?>
|
||||
</div><!-- shop container -->
|
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Content wrappers
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
?>
|
||||
<div class="shop-container">
|
@@ -0,0 +1,92 @@
|
||||
<div class="row category-page-row">
|
||||
|
||||
<div class="col large-12">
|
||||
<?php
|
||||
do_action('flatsome_products_before');
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
|
||||
* @hooked woocommerce_breadcrumb - 20 (FL removed)
|
||||
* @hooked WC_Structured_Data::generate_website_data() - 30
|
||||
*/
|
||||
do_action( 'woocommerce_before_main_content' );
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_archive_description.
|
||||
*
|
||||
* @hooked woocommerce_taxonomy_archive_description - 10
|
||||
* @hooked woocommerce_product_archive_description - 10
|
||||
*/
|
||||
do_action( 'woocommerce_archive_description' );
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
if ( woocommerce_product_loop() ) {
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_shop_loop.
|
||||
*
|
||||
* @hooked wc_print_notices - 10
|
||||
* @hooked woocommerce_result_count - 20 (FL removed)
|
||||
* @hooked woocommerce_catalog_ordering - 30 (FL removed)
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop' );
|
||||
|
||||
woocommerce_product_loop_start();
|
||||
|
||||
if ( wc_get_loop_prop( 'total' ) ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_shop_loop.
|
||||
*
|
||||
* @hooked WC_Structured_Data::generate_product_data() - 10
|
||||
*/
|
||||
do_action( 'woocommerce_shop_loop' );
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
}
|
||||
}
|
||||
|
||||
woocommerce_product_loop_end();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_after_shop_loop.
|
||||
*
|
||||
* @hooked woocommerce_pagination - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop' );
|
||||
} else {
|
||||
/**
|
||||
* Hook: woocommerce_no_products_found.
|
||||
*
|
||||
* @hooked wc_no_products_found - 10
|
||||
*/
|
||||
do_action( 'woocommerce_no_products_found' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: flatsome_products_after.
|
||||
*
|
||||
* @hooked flatsome_products_footer_content - 10
|
||||
*/
|
||||
do_action( 'flatsome_products_after' );
|
||||
/**
|
||||
* Hook: woocommerce_after_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
|
||||
*/
|
||||
do_action( 'woocommerce_after_main_content' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,101 @@
|
||||
<div class="row category-page-row">
|
||||
|
||||
<div class="col large-12">
|
||||
<?php
|
||||
do_action('flatsome_products_before');
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
|
||||
* @hooked woocommerce_breadcrumb - 20 (FL removed)
|
||||
* @hooked WC_Structured_Data::generate_website_data() - 30
|
||||
*/
|
||||
do_action( 'woocommerce_before_main_content' );
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_archive_description.
|
||||
*
|
||||
* @hooked woocommerce_taxonomy_archive_description - 10
|
||||
* @hooked woocommerce_product_archive_description - 10
|
||||
*/
|
||||
do_action( 'woocommerce_archive_description' );
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
if ( woocommerce_product_loop() ) {
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_shop_loop.
|
||||
*
|
||||
* @hooked wc_print_notices - 10
|
||||
* @hooked woocommerce_result_count - 20 (FL removed)
|
||||
* @hooked woocommerce_catalog_ordering - 30 (FL removed)
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop' );
|
||||
|
||||
woocommerce_product_loop_start();
|
||||
|
||||
if ( wc_get_loop_prop( 'total' ) ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_shop_loop.
|
||||
*
|
||||
* @hooked WC_Structured_Data::generate_product_data() - 10
|
||||
*/
|
||||
do_action( 'woocommerce_shop_loop' );
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
}
|
||||
}
|
||||
|
||||
woocommerce_product_loop_end();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_after_shop_loop.
|
||||
*
|
||||
* @hooked woocommerce_pagination - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop' );
|
||||
} else {
|
||||
/**
|
||||
* Hook: woocommerce_no_products_found.
|
||||
*
|
||||
* @hooked wc_no_products_found - 10
|
||||
*/
|
||||
do_action( 'woocommerce_no_products_found' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: flatsome_products_after.
|
||||
*
|
||||
* @hooked flatsome_products_footer_content - 10
|
||||
*/
|
||||
do_action( 'flatsome_products_after' );
|
||||
/**
|
||||
* Hook: woocommerce_after_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
|
||||
*/
|
||||
do_action( 'woocommerce_after_main_content' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="shop-sidebar" class="mfp-hide">
|
||||
<div class="sidebar-inner">
|
||||
<?php
|
||||
$no_widgets_msg = '<p>You need to assign Widgets to <strong>"Shop Sidebar"</strong> in <a href="'.get_site_url().'/wp-admin/widgets.php">Appearance > Widgets</a> to show anything here</p>';
|
||||
if(is_active_sidebar('shop-sidebar')) { dynamic_sidebar('shop-sidebar'); } else{ echo $no_widgets_msg; }
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,103 @@
|
||||
<div class="row category-page-row">
|
||||
|
||||
<div class="col large-9">
|
||||
<?php
|
||||
do_action('flatsome_products_before');
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
|
||||
* @hooked woocommerce_breadcrumb - 20 (FL removed)
|
||||
* @hooked WC_Structured_Data::generate_website_data() - 30
|
||||
*/
|
||||
do_action( 'woocommerce_before_main_content' );
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_archive_description.
|
||||
*
|
||||
* @hooked woocommerce_taxonomy_archive_description - 10
|
||||
* @hooked woocommerce_product_archive_description - 10
|
||||
*/
|
||||
do_action( 'woocommerce_archive_description' );
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
if ( woocommerce_product_loop() ) {
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_shop_loop.
|
||||
*
|
||||
* @hooked wc_print_notices - 10
|
||||
* @hooked woocommerce_result_count - 20 (FL removed)
|
||||
* @hooked woocommerce_catalog_ordering - 30 (FL removed)
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop' );
|
||||
|
||||
woocommerce_product_loop_start();
|
||||
|
||||
if ( wc_get_loop_prop( 'total' ) ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_shop_loop.
|
||||
*
|
||||
* @hooked WC_Structured_Data::generate_product_data() - 10
|
||||
*/
|
||||
do_action( 'woocommerce_shop_loop' );
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
}
|
||||
}
|
||||
|
||||
woocommerce_product_loop_end();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_after_shop_loop.
|
||||
*
|
||||
* @hooked woocommerce_pagination - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop' );
|
||||
} else {
|
||||
/**
|
||||
* Hook: woocommerce_no_products_found.
|
||||
*
|
||||
* @hooked wc_no_products_found - 10
|
||||
*/
|
||||
do_action( 'woocommerce_no_products_found' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: flatsome_products_after.
|
||||
*
|
||||
* @hooked flatsome_products_footer_content - 10
|
||||
*/
|
||||
do_action( 'flatsome_products_after' );
|
||||
/**
|
||||
* Hook: woocommerce_after_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
|
||||
*/
|
||||
do_action( 'woocommerce_after_main_content' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="large-3 col hide-for-medium <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php flatsome_sticky_column_open( 'category_sticky_sidebar' ); ?>
|
||||
<div id="shop-sidebar" class="sidebar-inner">
|
||||
<?php
|
||||
$no_widgets_msg = '<p>You need to assign Widgets to <strong>"Shop Sidebar"</strong> in <a href="'.get_site_url().'/wp-admin/widgets.php">Appearance > Widgets</a> to show anything here</p>';
|
||||
if(is_active_sidebar('shop-sidebar')) { dynamic_sidebar('shop-sidebar'); } else{ echo $no_widgets_msg; }
|
||||
?>
|
||||
</div>
|
||||
<?php flatsome_sticky_column_close( 'category_sticky_sidebar' ); ?>
|
||||
</div>
|
||||
</div>
|
102
wp-content/themes/flatsome/woocommerce/layouts/category.php
Normal file
102
wp-content/themes/flatsome/woocommerce/layouts/category.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<div class="row category-page-row">
|
||||
|
||||
<div class="col large-3 hide-for-medium <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php flatsome_sticky_column_open( 'category_sticky_sidebar' ); ?>
|
||||
<div id="shop-sidebar" class="sidebar-inner col-inner">
|
||||
<?php
|
||||
if(is_active_sidebar('shop-sidebar')) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
} else{ echo '<p>You need to assign Widgets to <strong>"Shop Sidebar"</strong> in <a href="'.get_site_url().'/wp-admin/widgets.php">Appearance > Widgets</a> to show anything here</p>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php flatsome_sticky_column_close( 'category_sticky_sidebar' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="col large-9">
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_before_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
|
||||
* @hooked woocommerce_breadcrumb - 20 (FL removed)
|
||||
* @hooked WC_Structured_Data::generate_website_data() - 30
|
||||
*/
|
||||
do_action( 'woocommerce_before_main_content' );
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_archive_description.
|
||||
*
|
||||
* @hooked woocommerce_taxonomy_archive_description - 10
|
||||
* @hooked woocommerce_product_archive_description - 10
|
||||
*/
|
||||
do_action( 'woocommerce_archive_description' );
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
if ( woocommerce_product_loop() ) {
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_shop_loop.
|
||||
*
|
||||
* @hooked wc_print_notices - 10
|
||||
* @hooked woocommerce_result_count - 20 (FL removed)
|
||||
* @hooked woocommerce_catalog_ordering - 30 (FL removed)
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop' );
|
||||
|
||||
woocommerce_product_loop_start();
|
||||
|
||||
if ( wc_get_loop_prop( 'total' ) ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_shop_loop.
|
||||
*
|
||||
* @hooked WC_Structured_Data::generate_product_data() - 10
|
||||
*/
|
||||
do_action( 'woocommerce_shop_loop' );
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
}
|
||||
}
|
||||
|
||||
woocommerce_product_loop_end();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_after_shop_loop.
|
||||
*
|
||||
* @hooked woocommerce_pagination - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop' );
|
||||
} else {
|
||||
/**
|
||||
* Hook: woocommerce_no_products_found.
|
||||
*
|
||||
* @hooked wc_no_products_found - 10
|
||||
*/
|
||||
do_action( 'woocommerce_no_products_found' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: flatsome_products_after.
|
||||
*
|
||||
* @hooked flatsome_products_footer_content - 10
|
||||
*/
|
||||
do_action( 'flatsome_products_after' );
|
||||
/**
|
||||
* Hook: woocommerce_after_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
|
||||
*/
|
||||
do_action( 'woocommerce_after_main_content' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,19 @@
|
||||
<div class="shop-page-title category-page-title dark featured-title page-title <?php flatsome_header_title_classes() ?>">
|
||||
|
||||
<div class="page-title-bg fill">
|
||||
<div class="title-bg fill bg-fill" data-parallax-fade="true" data-parallax="-2" data-parallax-background data-parallax-container=".page-title"></div>
|
||||
<div class="title-overlay fill"></div>
|
||||
</div>
|
||||
|
||||
<div class="page-title-inner flex-row container medium-flex-wrap flex-has-center">
|
||||
<div class="flex-col">
|
||||
|
||||
</div>
|
||||
<div class="flex-col flex-center text-center">
|
||||
<?php do_action('flatsome_category_title') ;?>
|
||||
</div>
|
||||
<div class="flex-col flex-right text-right medium-text-center form-flat">
|
||||
<?php do_action('flatsome_category_title_alt') ;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,18 @@
|
||||
<div class="shop-page-title category-page-title page-title featured-title dark <?php flatsome_header_title_classes() ?>">
|
||||
|
||||
<div class="page-title-bg fill">
|
||||
<div class="title-bg fill bg-fill" data-parallax-fade="true" data-parallax="-2" data-parallax-background data-parallax-container=".page-title"></div>
|
||||
<div class="title-overlay fill"></div>
|
||||
</div>
|
||||
|
||||
<div class="page-title-inner flex-row medium-flex-wrap container">
|
||||
<div class="flex-col flex-grow medium-text-center">
|
||||
<?php do_action('flatsome_category_title') ;?>
|
||||
</div>
|
||||
|
||||
<div class="flex-col medium-text-center form-flat">
|
||||
<?php do_action('flatsome_category_title_alt') ;?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,10 @@
|
||||
<div class="shop-page-title category-page-title page-title <?php flatsome_header_title_classes() ?>">
|
||||
<div class="page-title-inner flex-row medium-flex-wrap container">
|
||||
<div class="flex-col flex-grow medium-text-center">
|
||||
<?php do_action('flatsome_category_title') ;?>
|
||||
</div>
|
||||
<div class="flex-col medium-text-center">
|
||||
<?php do_action('flatsome_category_title_alt') ;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$classes = array();
|
||||
$classes[] = 'is-'.get_theme_mod('breadcrumb_size', 'large');
|
||||
?>
|
||||
<div class="<?php echo implode(' ', $classes); ?>">
|
||||
<?php flatsome_breadcrumb(); ?>
|
||||
</div>
|
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Shop category filter button template
|
||||
*
|
||||
* @package flatsome
|
||||
*/
|
||||
|
||||
$layout = get_theme_mod( 'category_sidebar', 'left-sidebar' );
|
||||
if ( 'none' === $layout || ( get_theme_mod( 'html_shop_page_content' ) && ! is_product_category() && ! is_product_tag() && ! is_search() ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$after = 'data-visible-after="true"';
|
||||
$class = 'show-for-medium';
|
||||
if ( 'off-canvas' === $layout ) {
|
||||
$after = '';
|
||||
$class = '';
|
||||
}
|
||||
|
||||
$custom_filter_text = get_theme_mod( 'category_filter_text' );
|
||||
$filter_text = $custom_filter_text ? $custom_filter_text : __( 'Filter', 'woocommerce' );
|
||||
?>
|
||||
<div class="category-filtering category-filter-row <?php echo esc_attr( $class ); ?>">
|
||||
<a href="#" data-open="#shop-sidebar" <?php echo wp_kses( $after, array( 'data-visible-after' => array() ) ); ?> data-pos="left" class="filter-button uppercase plain">
|
||||
<i class="icon-equalizer"></i>
|
||||
<strong><?php echo esc_html( $filter_text ); ?></strong>
|
||||
</a>
|
||||
<div class="inline-block">
|
||||
<?php the_widget( 'WC_Widget_Layered_Nav_Filters' ); ?>
|
||||
</div>
|
||||
</div>
|
14
wp-content/themes/flatsome/woocommerce/loop/loop-end.php
Normal file
14
wp-content/themes/flatsome/woocommerce/loop/loop-end.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Product Loop End
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
</div><!-- row -->
|
18
wp-content/themes/flatsome/woocommerce/loop/loop-start.php
Normal file
18
wp-content/themes/flatsome/woocommerce/loop/loop-start.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Product Loop Start
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$cols = esc_attr( wc_get_loop_prop( 'columns' ) );
|
||||
?>
|
||||
<div class="products <?php echo flatsome_product_row_classes( $cols ); ?>">
|
||||
<?php
|
||||
|
50
wp-content/themes/flatsome/woocommerce/loop/pagination.php
Normal file
50
wp-content/themes/flatsome/woocommerce/loop/pagination.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Pagination - Show numbered pagination for catalog pages
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$total = isset( $total ) ? $total : wc_get_loop_prop( 'total_pages' );
|
||||
$current = isset( $current ) ? $current : wc_get_loop_prop( 'current_page' );
|
||||
$base = isset( $base ) ? $base : esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) );
|
||||
$format = isset( $format ) ? $format : '';
|
||||
|
||||
if ( $total <= 1 ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="container">
|
||||
<nav class="woocommerce-pagination">
|
||||
<?php
|
||||
$pages = paginate_links( apply_filters( 'woocommerce_pagination_args', array( // WPCS: XSS ok.
|
||||
'base' => $base,
|
||||
'format' => $format,
|
||||
'add_args' => false,
|
||||
'current' => max( 1, $current ),
|
||||
'total' => $total,
|
||||
'prev_text' => '<i class="icon-angle-left"></i>',
|
||||
'next_text' => '<i class="icon-angle-right"></i>',
|
||||
'type' => 'array',
|
||||
'end_size' => 3,
|
||||
'mid_size' => 3,
|
||||
) ) );
|
||||
|
||||
if ( is_array( $pages ) ) {
|
||||
$paged = ( get_query_var( 'paged' ) == 0 ) ? 1 : get_query_var( 'paged' );
|
||||
echo '<ul class="page-numbers nav-pagination links text-center">';
|
||||
foreach ( $pages as $page ) {
|
||||
$page = str_replace( 'page-numbers', 'page-number', $page );
|
||||
echo '<li>' . $page . '</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
?>
|
||||
</nav>
|
||||
</div>
|
40
wp-content/themes/flatsome/woocommerce/loop/result-count.php
Normal file
40
wp-content/themes/flatsome/woocommerce/loop/result-count.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Result Count
|
||||
*
|
||||
* Shows text: Showing x - x of x results.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/result-count.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.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<p class="woocommerce-result-count hide-for-medium">
|
||||
<?php
|
||||
// phpcs:disable WordPress.Security
|
||||
if ( 1 === intval( $total ) ) {
|
||||
_e( 'Showing the single result', 'woocommerce' );
|
||||
} elseif ( $total <= $per_page || -1 === $per_page ) {
|
||||
/* translators: %d: total results */
|
||||
printf( _n( 'Showing all %d result', 'Showing all %d results', $total, 'woocommerce' ), $total );
|
||||
} else {
|
||||
$first = ( $per_page * $current ) - $per_page + 1;
|
||||
$last = min( $total, $per_page * $current );
|
||||
/* translators: 1: first result 2: last result 3: total results */
|
||||
printf( _nx( 'Showing %1$d–%2$d of %3$d result', 'Showing %1$d–%2$d of %3$d results', $total, 'with first and last result', 'woocommerce' ), $first, $last, $total );
|
||||
}
|
||||
// phpcs:enable WordPress.Security
|
||||
?>
|
||||
</p>
|
37
wp-content/themes/flatsome/woocommerce/loop/sale-flash.php
Normal file
37
wp-content/themes/flatsome/woocommerce/loop/sale-flash.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Product loop sale flash
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 1.6.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
global $post, $product, $wc_cpdf;;
|
||||
|
||||
$badge_style = get_theme_mod('bubble_style','style1');
|
||||
|
||||
if($badge_style == 'style1') $badge_style = 'circle';
|
||||
if($badge_style == 'style2') $badge_style = 'square';
|
||||
if($badge_style == 'style3') $badge_style = 'frame';
|
||||
?>
|
||||
|
||||
<div class="badge-container absolute left top z-1">
|
||||
<?php if ( $product->is_on_sale() ) : ?>
|
||||
<?php
|
||||
$custom_text = get_theme_mod( 'sale_bubble_text' );
|
||||
$text = $custom_text ? $custom_text : __( 'Sale!', 'woocommerce' );
|
||||
|
||||
if ( get_theme_mod( 'sale_bubble_percentage' ) ) {
|
||||
$text = flatsome_presentage_bubble( $product, $text );
|
||||
}
|
||||
?>
|
||||
<?php echo apply_filters( 'woocommerce_sale_flash', '<div class="callout badge badge-'.$badge_style.'"><div class="badge-inner secondary on-sale"><span class="onsale">' . $text . '</span></div></div>', $post, $product ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php echo apply_filters( 'flatsome_product_labels', '', $post, $product, $badge_style); ?>
|
||||
</div>
|
@@ -0,0 +1,31 @@
|
||||
<?php if ( has_nav_menu( 'my_account' ) ) { ?>
|
||||
|
||||
<?php
|
||||
echo wp_nav_menu(array(
|
||||
'theme_location' => 'my_account',
|
||||
'container' => false,
|
||||
'items_wrap' => '%3$s',
|
||||
'depth' => 0,
|
||||
'walker' => new FlatsomeNavSidebar
|
||||
));
|
||||
?>
|
||||
<?php } else if(!get_theme_mod('wc_account_links', 1)) { ?>
|
||||
<li>Define your My Account dropdown menu in <b>Appearance > Menus</b> or enable default WooCommerce Account Endpoints.</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(function_exists('wc_get_account_menu_items') && get_theme_mod('wc_account_links', 1)){ ?>
|
||||
<?php foreach ( wc_get_account_menu_items() as $endpoint => $label ) : ?>
|
||||
<li class="<?php echo wc_get_account_menu_item_classes( $endpoint ); ?>">
|
||||
<?php if($endpoint == 'dashboard'){ ?>
|
||||
<a href="<?php echo esc_url( wc_get_account_endpoint_url( $endpoint )); ?>"><?php echo esc_html( $label ); ?></a>
|
||||
<!-- empty -->
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo esc_url( wc_get_endpoint_url( $endpoint, '', wc_get_page_permalink( 'myaccount' )) ); ?>"><?php echo esc_html( $label ); ?></a>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php do_action('flatsome_account_links'); ?>
|
||||
<li class="woocommerce-MyAccount-navigation-link woocommerce-MyAccount-navigation-link--customer-logout">
|
||||
<a href="<?php echo esc_url( wc_get_endpoint_url( 'customer-logout', '', wc_get_page_permalink( 'myaccount' )) ); ?>"><?php _e('Logout','woocommerce'); ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
@@ -0,0 +1,17 @@
|
||||
<div class="account-user circle">
|
||||
<span class="image mr-half inline-block">
|
||||
<?php
|
||||
$current_user = wp_get_current_user();
|
||||
$user_id = $current_user->ID;
|
||||
echo get_avatar( $user_id, 70 );
|
||||
?>
|
||||
</span>
|
||||
<span class="user-name inline-block">
|
||||
<?php
|
||||
echo $current_user->display_name;
|
||||
?>
|
||||
<em class="user-id op-5"><?php echo '#'.$user_id;?></em>
|
||||
</span>
|
||||
|
||||
<?php do_action('flatsome_after_account_user'); ?>
|
||||
</div>
|
@@ -0,0 +1,23 @@
|
||||
<ul class="dashboard-links">
|
||||
<?php if ( has_nav_menu( 'my_account' ) ) { ?>
|
||||
<?php
|
||||
wp_nav_menu(array(
|
||||
'theme_location' => 'my_account',
|
||||
'container' => false,
|
||||
'items_wrap' => '%3$s',
|
||||
'depth' => 1
|
||||
));
|
||||
?>
|
||||
<?php } else if(!function_exists('wc_get_account_menu_items')) { ?>
|
||||
<li>Define your My Account dropdown menu in <b>Appearance > Menus</b></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(function_exists('wc_get_account_menu_items') && flatsome_option('wc_account_links')){ ?>
|
||||
<?php foreach ( wc_get_account_menu_items() as $endpoint => $label ) : ?>
|
||||
<li class="<?php echo wc_get_account_menu_item_classes( $endpoint ); ?>">
|
||||
<a href="<?php echo esc_url( wc_get_account_endpoint_url( $endpoint ) ); ?>"><?php echo esc_html( $label ); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php do_action('flatsome_account_links'); ?>
|
||||
<?php } ?>
|
||||
</ul>
|
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
/**
|
||||
* Login Form - Lightbox Right Pane
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.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.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$registration = 'yes' === get_option( 'woocommerce_enable_myaccount_registration' );
|
||||
$panel_bg_color = get_theme_mod( 'account_login_lightbox_side_panel_bg_color', Flatsome_Default::COLOR_PRIMARY );
|
||||
$panel_bg_image = get_theme_mod( 'account_login_lightbox_side_panel_bg_image' );
|
||||
$panel_bg_overlay = get_theme_mod( 'account_login_lightbox_side_panel_bg_overlay' );
|
||||
$css_panel_bg_args = array();
|
||||
$css_panel_bg_overlay_args = array();
|
||||
|
||||
if ( $panel_bg_image ) {
|
||||
$css_panel_bg_args[] = array(
|
||||
'attribute' => 'background-image',
|
||||
'value' => 'url(' . do_shortcode( $panel_bg_image ) . ')',
|
||||
);
|
||||
}
|
||||
if ( $panel_bg_color ) {
|
||||
$css_panel_bg_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $panel_bg_color,
|
||||
);
|
||||
}
|
||||
|
||||
if ( $panel_bg_overlay ) {
|
||||
$css_panel_bg_overlay_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $panel_bg_overlay,
|
||||
);
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_before_customer_login_form' ); ?>
|
||||
|
||||
<div class="account-container">
|
||||
|
||||
<?php if ( $registration ) : ?>
|
||||
|
||||
<div class="col2-set row row-collapse row-large" id="customer_login">
|
||||
|
||||
<?php if ( $block = get_theme_mod( 'account_login_lightbox_side_panel_block' ) ) : ?>
|
||||
<div class="col-1 large-6 col">
|
||||
|
||||
<div class="account-register-inner">
|
||||
<?php echo flatsome_apply_shortcode( 'block', array( 'id' => $block ) ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php else : // Default. ?>
|
||||
<div class="col-1 large-6 col flex-row">
|
||||
|
||||
<?php if ( $panel_bg_image || $panel_bg_color ) : ?>
|
||||
<div class="account-register-bg fill bg-fill" <?php echo get_shortcode_inline_css( $css_panel_bg_args ); ?>>
|
||||
<?php if ( $panel_bg_overlay ) echo '<div class="account-register-bg-overlay fill"' . get_shortcode_inline_css( $css_panel_bg_overlay_args ) . '></div>'; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-register-inner relative flex-col flex-grow dark text-center">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Register', 'woocommerce' ); ?></h3>
|
||||
<p><?php esc_html_e( "Don't have an account? Register one!", 'flatsome' ); ?></p>
|
||||
<a href="<?php echo esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ); ?>" class="button white is-outline"><?php esc_html_e( 'Register an Account', 'flatsome' ); ?></a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $registration ) : ?>
|
||||
|
||||
<div class="col-2 large-6 col">
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-login-inner inner-padding">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Login', 'woocommerce' ); ?></h3>
|
||||
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" />
|
||||
<span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit" name="login" value="<?php esc_attr_e( 'Log in', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if ( $registration ) : ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_customer_login_form' ); ?>
|
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/**
|
||||
* Login Form - Lightbox Right Pane
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.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.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$panel_bg_color = get_theme_mod( 'account_login_lightbox_side_panel_bg_color', Flatsome_Default::COLOR_PRIMARY );
|
||||
$panel_bg_image = get_theme_mod( 'account_login_lightbox_side_panel_bg_image' );
|
||||
$panel_bg_overlay = get_theme_mod( 'account_login_lightbox_side_panel_bg_overlay' );
|
||||
$css_panel_bg_args = array();
|
||||
$css_panel_bg_overlay_args = array();
|
||||
|
||||
if ( $panel_bg_image ) {
|
||||
$css_panel_bg_args[] = array(
|
||||
'attribute' => 'background-image',
|
||||
'value' => 'url(' . do_shortcode( $panel_bg_image ) . ')',
|
||||
);
|
||||
}
|
||||
if ( $panel_bg_color ) {
|
||||
$css_panel_bg_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $panel_bg_color,
|
||||
);
|
||||
}
|
||||
|
||||
if ( $panel_bg_overlay ) {
|
||||
$css_panel_bg_overlay_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $panel_bg_overlay,
|
||||
);
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_before_customer_login_form' ); ?>
|
||||
|
||||
<div class="account-container">
|
||||
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
<div class="col2-set row row-collapse row-large" id="customer_login">
|
||||
|
||||
<div class="col-1 large-6 col">
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-login-inner inner-padding">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Login', 'woocommerce' ); ?></h3>
|
||||
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit" name="login" value="<?php esc_attr_e( 'Log in', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( $block = get_theme_mod( 'account_login_lightbox_side_panel_block' ) ) : ?>
|
||||
<div class="col-2 large-6 col">
|
||||
|
||||
<div class="account-register-inner">
|
||||
<?php echo flatsome_apply_shortcode( 'block', array( 'id' => $block ) ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php else : // Default. ?>
|
||||
<div class="col-2 large-6 col flex-row">
|
||||
|
||||
<?php if ( $panel_bg_image || $panel_bg_color ) : ?>
|
||||
<div class="account-register-bg fill bg-fill" <?php echo get_shortcode_inline_css( $css_panel_bg_args ); ?>>
|
||||
<?php if ( $panel_bg_overlay ) echo '<div class="account-register-bg-overlay fill"' . get_shortcode_inline_css( $css_panel_bg_overlay_args ) . '></div>'; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-register-inner relative flex-col flex-grow dark text-center">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Register', 'woocommerce' ); ?></h3>
|
||||
<p><?php esc_html_e( "Don't have an account? Register one!", 'flatsome' ); ?></p>
|
||||
<a href="<?php echo esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ); ?>" class="button white is-outline"><?php esc_html_e( 'Register an Account', 'flatsome' ); ?></a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_customer_login_form' ); ?>
|
135
wp-content/themes/flatsome/woocommerce/myaccount/form-login.php
Normal file
135
wp-content/themes/flatsome/woocommerce/myaccount/form-login.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
/**
|
||||
* Login Form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.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.1.0
|
||||
*
|
||||
* @flatsome-parallel-template {
|
||||
* form-login-lightbox-left-panel.php
|
||||
* form-login-lightbox-right-panel.php
|
||||
* }
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_before_customer_login_form' ); ?>
|
||||
|
||||
<div class="account-container lightbox-inner">
|
||||
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
<div class="col2-set row row-divided row-large" id="customer_login">
|
||||
|
||||
<div class="col-1 large-6 col pb-0">
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-login-inner">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Login', 'woocommerce' ); ?></h3>
|
||||
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit" name="login" value="<?php esc_attr_e( 'Log in', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-2 large-6 col pb-0">
|
||||
|
||||
<div class="account-register-inner">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Register', 'woocommerce' ); ?></h3>
|
||||
|
||||
<form method="post" class="woocommerce-form woocommerce-form-register register" <?php do_action( 'woocommerce_register_form_tag' ); ?> >
|
||||
|
||||
<?php do_action( 'woocommerce_register_form_start' ); ?>
|
||||
|
||||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_username"><?php esc_html_e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" autocomplete="email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( wp_unslash( $_POST['email'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
|
||||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" autocomplete="new-password" />
|
||||
</p>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p><?php esc_html_e( 'A password will be sent to your email address.', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-Button woocommerce-button button woocommerce-form-register__submit" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>"><?php esc_html_e( 'Register', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_customer_login_form' ); ?>
|
85
wp-content/themes/flatsome/woocommerce/myaccount/header.php
Normal file
85
wp-content/themes/flatsome/woocommerce/myaccount/header.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
$is_facebook_login = is_nextend_facebook_login();
|
||||
$is_google_login = is_nextend_google_login();
|
||||
|
||||
$login_text = get_theme_mod( 'facebook_login_text' );
|
||||
$login_bg_image = get_theme_mod( 'facebook_login_bg', '' );
|
||||
$login_bg_color = get_theme_mod( 'my_account_title_bg_color', '' );
|
||||
|
||||
if ( $login_bg_image ) $css_login_bg_args[] = array(
|
||||
'attribute' => 'background-image',
|
||||
'value' => 'url(' . do_shortcode( $login_bg_image ) . ')',
|
||||
);
|
||||
if ( $login_bg_color ) $css_login_bg_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $login_bg_color,
|
||||
);
|
||||
|
||||
global $wp;
|
||||
$endpoint_label = '';
|
||||
$current_url = home_url( $wp->request );
|
||||
|
||||
// Collect current WC endpoint label.
|
||||
if ( function_exists( 'wc_get_account_menu_items' ) && get_theme_mod( 'wc_account_links', 1 ) ) {
|
||||
foreach ( wc_get_account_menu_items() as $endpoint => $label ) {
|
||||
if ( untrailingslashit( wc_get_account_endpoint_url( $endpoint ) ) === $current_url ) {
|
||||
$endpoint_label = $label;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="my-account-header page-title normal-title
|
||||
<?php if ( get_theme_mod( 'my_account_title_text_color', 'dark' ) == 'light' ) echo 'dark'; ?>
|
||||
<?php if ( $login_bg_image ) echo ' featured-title'; ?>">
|
||||
|
||||
<?php if ( $login_bg_image || $login_bg_color ) : ?>
|
||||
<div class="page-title-bg fill bg-fill" <?php echo get_shortcode_inline_css( $css_login_bg_args ); ?>>
|
||||
<div class="page-title-bg-overlay fill"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="page-title-inner flex-row container
|
||||
<?php echo ' text-' . get_theme_mod( 'my_account_title_align', 'left' ); ?>">
|
||||
<div class="flex-col flex-grow <?php if ( get_theme_mod( 'logo_position' ) == 'center' ) { echo 'text-center'; } else { echo 'medium-text-center'; } ?>">
|
||||
<?php if ( is_user_logged_in() ) : ?>
|
||||
|
||||
<h1 class="uppercase mb-0"><?php the_title(); ?></h1>
|
||||
<?php if ( ! empty ( $endpoint_label ) ) echo '<small class="uppercase">' . esc_html( $endpoint_label ) . '</small>'; ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="text-center social-login">
|
||||
<?php if ( ! $is_facebook_login && ! $is_google_login ) {
|
||||
echo '<h1 class="uppercase mb-0">' . get_the_title() . '</h1>';
|
||||
} ?>
|
||||
|
||||
<?php if ( $is_facebook_login && get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' && ! is_user_logged_in() ) {
|
||||
$facebook_url = add_query_arg( array( 'loginSocial' => 'facebook' ), wp_login_url() );
|
||||
?>
|
||||
|
||||
<a href="<?php echo esc_url( $facebook_url ); ?>" class="button social-button large facebook circle" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="facebook" data-popupwidth="475" data-popupheight="175">
|
||||
<i class="icon-facebook"></i>
|
||||
<span><?php _e( 'Login with <strong>Facebook</strong>', 'flatsome' ); ?></span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( $is_google_login && get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' && ! is_user_logged_in() ) {
|
||||
$google_url = add_query_arg( array( 'loginSocial' => 'google' ), wp_login_url() );
|
||||
?>
|
||||
|
||||
<a href="<?php echo esc_url( $google_url ); ?>" class="button social-button large google-plus circle" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="google" data-popupwidth="600" data-popupheight="600">
|
||||
<i class="icon-google-plus"></i>
|
||||
<span><?php _e( 'Login with <strong>Google</strong>', 'flatsome' ); ?></span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ( $login_text ) { ?><p><?php echo do_shortcode( $login_text ); ?></p><?php } ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* My Account navigation
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/navigation.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 http://docs.woothemes.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
*/
|
||||
|
||||
?>
|
37
wp-content/themes/flatsome/woocommerce/notices/error.php
Normal file
37
wp-content/themes/flatsome/woocommerce/notices/error.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Show error messages
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/notices/error.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.9.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! $notices ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<ul class="woocommerce-error message-wrapper" role="alert">
|
||||
<?php foreach ( $notices as $notice ) : ?>
|
||||
<li<?php echo wc_get_notice_data_attr( $notice ); ?>>
|
||||
<div class="message-container container alert-color medium-text-center">
|
||||
<span class="message-icon icon-close"></span>
|
||||
<?php echo wc_kses_notice( $notice['notice'] ); ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
34
wp-content/themes/flatsome/woocommerce/notices/notice.php
Normal file
34
wp-content/themes/flatsome/woocommerce/notices/notice.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Show messages
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/notices/notice.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.9.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! $notices ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php foreach ( $notices as $notice ) : ?>
|
||||
<div class="woocommerce-info message-wrapper"<?php echo wc_get_notice_data_attr( $notice ); ?>>
|
||||
<div class="message-container container medium-text-center">
|
||||
<?php echo wc_kses_notice( $notice['notice'] ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
35
wp-content/themes/flatsome/woocommerce/notices/success.php
Normal file
35
wp-content/themes/flatsome/woocommerce/notices/success.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Show messages
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/notices/success.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.9.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! $notices ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php foreach ( $notices as $notice ) : ?>
|
||||
<div class="woocommerce-message message-wrapper"<?php echo wc_get_notice_data_attr( $notice ); ?> role="alert">
|
||||
<div class="message-container container success-color medium-text-center">
|
||||
<?php echo get_flatsome_icon( 'icon-checkmark' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php echo wc_kses_notice( $notice['notice'] ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
@@ -0,0 +1,70 @@
|
||||
<?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/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<form role="search" method="get" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<div class="flex-row relative">
|
||||
<?php if ( get_theme_mod( 'header_search_categories' ) ) { ?>
|
||||
<div class="flex-col search-form-categories">
|
||||
<?php
|
||||
$args = array(
|
||||
'number' => '999',
|
||||
'orderby' => 'name',
|
||||
'hide_empty' => true,
|
||||
);
|
||||
|
||||
$product_categories = get_terms( 'product_cat', $args );
|
||||
$selected_category = isset( $_REQUEST['product_cat'] ) ? $_REQUEST['product_cat'] : '';
|
||||
|
||||
echo '<select class="search_categories resize-select mb-0" name="product_cat">';
|
||||
echo '<option value=""' . selected( '', $selected_category, false ) . '>' . esc_html__( 'All', 'flatsome' ) . '</option>';
|
||||
|
||||
foreach ( $product_categories as $value ) {
|
||||
if ( $value && ! $value->parent ) {
|
||||
echo '<option value="' . $value->slug . '"' . selected( $value->slug, $selected_category, false ) . '>' . $value->name . '</option>';
|
||||
}
|
||||
}
|
||||
echo '</select>';
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$placeholder = __( 'Search', 'woocommerce' ) . '…';
|
||||
if ( get_theme_mod( 'search_placeholder' ) ) {
|
||||
$placeholder = get_theme_mod( 'search_placeholder' );
|
||||
}
|
||||
?>
|
||||
<div class="flex-col flex-grow">
|
||||
<label class="screen-reader-text" for="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>"><?php esc_html_e( 'Search for:', 'woocommerce' ); ?></label>
|
||||
<input type="search" id="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>" class="search-field mb-0" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
|
||||
<input type="hidden" name="post_type" value="product" />
|
||||
<?php if ( defined( 'ICL_LANGUAGE_CODE' ) ): ?>
|
||||
<input type="hidden" name="lang" value="<?php echo ICL_LANGUAGE_CODE; ?>" />
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="flex-col">
|
||||
<button type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'woocommerce' ); ?>" class="ux-search-submit submit-button secondary button icon mb-0" aria-label="<?php esc_attr_e( 'Submit', 'flatsome' ); ?>">
|
||||
<?php echo get_flatsome_icon( 'icon-search' ); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="live-search-results text-left z-top"></div>
|
||||
</form>
|
85
wp-content/themes/flatsome/woocommerce/share.php
Normal file
85
wp-content/themes/flatsome/woocommerce/share.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* Share template
|
||||
*
|
||||
* @author Your Inspiration Themes
|
||||
* @package YITH WooCommerce Wishlist
|
||||
* @version 3.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Template variables:
|
||||
*
|
||||
* @var $share_title string Title for share section
|
||||
* @var $share_facebook_enabled bool Whether to enable FB sharing button
|
||||
* @var $share_twitter_enabled bool Whether to enable Twitter sharing button
|
||||
* @var $share_pinterest_enabled bool Whether to enable Pintereset sharing button
|
||||
* @var $share_email_enabled bool Whether to enable Email sharing button
|
||||
* @var $share_whatsapp_enabled bool Whether to enable WhatsApp sharing button (mobile online)
|
||||
* @var $share_url_enabled bool Whether to enable share via url
|
||||
* @var $share_link_title string Title to use for post (where applicable)
|
||||
* @var $share_link_url string Url to share
|
||||
* @var $share_summary string Summary to use for sharing on social media
|
||||
* @var $share_image_url string Image to use for sharing on social media
|
||||
* @var $share_twitter_summary string Summary to use for sharing on Twitter
|
||||
* @var $share_facebook_icon string Icon for facebook sharing button
|
||||
* @var $share_twitter_icon string Icon for twitter sharing button
|
||||
* @var $share_pinterest_icon string Icon for pinterest sharing button
|
||||
* @var $share_email_icon string Icon for email sharing button
|
||||
* @var $share_whatsapp_icon string Icon for whatsapp sharing button
|
||||
* @var $share_whatsapp_url string Sharing url on whatsapp
|
||||
*/
|
||||
|
||||
if ( ! defined( 'YITH_WCWL' ) ) {
|
||||
exit;
|
||||
} // Exit if accessed directly
|
||||
|
||||
$classes = get_flatsome_icon_class( get_theme_mod( 'social_icons_style', 'outline' ) );
|
||||
$classes = $classes . ' tooltip';
|
||||
?>
|
||||
|
||||
<?php do_action( 'yith_wcwl_before_wishlist_share', $wishlist ); ?>
|
||||
|
||||
<div class="yith-wcwl-share social-icons share-icons share-row relative">
|
||||
<span class="yith-wcwl-share-title share-icons-title"><?php echo esc_html( $share_title ); ?></span>
|
||||
<?php if ( $share_facebook_enabled ) : ?>
|
||||
<a target="_blank" rel="noopener noreferrer nofollow" class="facebook <?php echo $classes; ?>" href="https://www.facebook.com/sharer.php?u=<?php echo urlencode( $share_link_url ); ?>&p[title]=<?php echo esc_attr( $share_link_title ); ?>" title="<?php esc_html_e( 'Facebook', 'yith-woocommerce-wishlist' ) ?>">
|
||||
<i class="icon-facebook"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $share_twitter_enabled ) : ?>
|
||||
<a target="_blank" rel="noopener noreferrer nofollow" class="twitter <?php echo $classes; ?>" href="https://twitter.com/share?url=<?php echo urlencode( $share_link_url ); ?>&text=<?php echo esc_attr( $share_twitter_summary ); ?>" title="<?php esc_html_e( 'Twitter', 'yith-woocommerce-wishlist' ); ?>">
|
||||
<i class="icon-twitter"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $share_pinterest_enabled ) : ?>
|
||||
<a target="_blank" rel="noopener noreferrer nofollow" class="pinterest <?php echo $classes; ?>" href="https://pinterest.com/pin/create/button/?url=<?php echo urlencode( $share_link_url ); ?>&description=<?php echo esc_attr( $share_summary ); ?>&media=<?php echo esc_attr( $share_image_url ); ?>" title="<?php esc_html_e( 'Pinterest', 'yith-woocommerce-wishlist' ); ?>" onclick="window.open(this.href); return false;">
|
||||
<i class="icon-pinterest"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $share_email_enabled ) : ?>
|
||||
<a rel="nofollow" class="email <?php echo $classes; ?>" href="mailto:?subject=<?php echo esc_attr( apply_filters( 'yith_wcwl_email_share_subject', $share_link_title ) ); ?>&body=<?php echo esc_attr( apply_filters( 'yith_wcwl_email_share_body', urlencode( $share_link_url ) ) ); ?>&title=<?php echo esc_attr( $share_link_title ); ?>" title="<?php esc_html_e( 'Email', 'yith-woocommerce-wishlist' ); ?>">
|
||||
<i class="icon-envelop"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $share_whatsapp_enabled ) : ?>
|
||||
<a target="_blank" rel="noopener" class="whatsapp show-for-medium <?php echo $classes; ?>" href="<?php echo esc_attr( $share_whatsapp_url ); ?>" data-action="share/whatsapp/share" title="<?php esc_html_e( 'WhatsApp', 'yith-woocommerce-wishlist' ); ?>">
|
||||
<i class="icon-whatsapp"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $share_url_enabled ) : ?>
|
||||
<div class="yith-wcwl-after-share-section">
|
||||
<input class="copy-target" readonly="readonly" type="url" name="yith_wcwl_share_url" id="yith_wcwl_share_url" value="<?php echo esc_attr( $share_link_url ); ?>"/>
|
||||
<?php echo ( ! empty( $share_link_url ) ) ? sprintf( '<small>%s <span class="copy-trigger">%s</span> %s</small>', esc_html__( '(Now', 'yith-woocommerce-wishlist' ), esc_html__( 'copy', 'yith-woocommerce-wishlist' ), esc_html__( 'this wishlist link and share it anywhere)', 'yith-woocommerce-wishlist' ) ) : ''; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'yith_wcwl_after_share_buttons', $share_link_url, $share_title, $share_link_title ); ?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'yith_wcwl_after_wishlist_share', $wishlist ); ?>
|
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/**
|
||||
* Display single product reviews (comments)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product-reviews.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.3.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
global $product;
|
||||
|
||||
if ( ! comments_open() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$tab_style = get_theme_mod( 'product_display' );
|
||||
$review_ratings_enabled = wc_review_ratings_enabled();
|
||||
?>
|
||||
<div id="reviews" class="woocommerce-Reviews row">
|
||||
<div id="comments" class="col large-<?php if ( get_comment_pages_count() == 0 || $tab_style == 'sections' || $tab_style == 'tabs_vertical' ) { echo '12'; } else { echo '7'; } ?>">
|
||||
<h3 class="woocommerce-Reviews-title normal">
|
||||
<?php
|
||||
$count = $product->get_review_count();
|
||||
if ( $count && $review_ratings_enabled ) {
|
||||
/* translators: 1: reviews count 2: product name */
|
||||
$reviews_title = sprintf( esc_html( _n( '%1$s review for %2$s', '%1$s reviews for %2$s', $count, 'woocommerce' ) ), esc_html( $count ), '<span>' . get_the_title() . '</span>' );
|
||||
echo apply_filters( 'woocommerce_reviews_title', $reviews_title, $count, $product ); // WPCS: XSS ok.
|
||||
} else {
|
||||
esc_html_e( 'Reviews', 'woocommerce' );
|
||||
}
|
||||
?>
|
||||
</h3>
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<ol class="commentlist">
|
||||
<?php wp_list_comments( apply_filters( 'woocommerce_product_review_list_args', array( 'callback' => 'woocommerce_comments' ) ) ); ?>
|
||||
</ol>
|
||||
|
||||
<?php
|
||||
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
|
||||
echo '<nav class="woocommerce-pagination">';
|
||||
$pagination = paginate_comments_links(
|
||||
apply_filters(
|
||||
'woocommerce_comment_pagination_args',
|
||||
array(
|
||||
'prev_text' => '←',
|
||||
'next_text' => '→',
|
||||
'type' => 'list',
|
||||
'echo' => false,
|
||||
)
|
||||
)
|
||||
);
|
||||
$pagination = str_replace( 'page-numbers', 'page-number', $pagination );
|
||||
$pagination = str_replace( "<ul class='page-number'>", '<ul class="page-numbers nav-pagination links text-center">', $pagination );
|
||||
echo $pagination;
|
||||
echo '</nav>';
|
||||
endif;
|
||||
?>
|
||||
<?php else : ?>
|
||||
<p class="woocommerce-noreviews"><?php esc_html_e( 'There are no reviews yet.', 'woocommerce' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_review_rating_verification_required' ) === 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->get_id() ) ) : ?>
|
||||
<div id="review_form_wrapper" class="large-<?php if ( get_comment_pages_count() == 0 || $tab_style == 'sections' || $tab_style == 'tabs_vertical' ) { echo '12'; } else { echo '5'; } ?> col">
|
||||
<div id="review_form" class="col-inner">
|
||||
<div class="review-form-inner has-border">
|
||||
<?php
|
||||
$commenter = wp_get_current_commenter();
|
||||
$comment_form = array(
|
||||
/* translators: %s is product title */
|
||||
'title_reply' => have_comments() ? esc_html__( 'Add a review', 'woocommerce' ) : sprintf( esc_html__( 'Be the first to review “%s”', 'woocommerce' ), get_the_title() ),
|
||||
/* translators: %s is product title */
|
||||
'title_reply_to' => esc_html__( 'Leave a Reply to %s', 'woocommerce' ),
|
||||
'title_reply_before' => '<h3 id="reply-title" class="comment-reply-title">',
|
||||
'title_reply_after' => '</h3>',
|
||||
'comment_notes_before' => '',
|
||||
'comment_notes_after' => '',
|
||||
'label_submit' => esc_html__( 'Submit', 'woocommerce' ),
|
||||
'logged_in_as' => '',
|
||||
'comment_field' => '',
|
||||
);
|
||||
|
||||
$name_email_required = (bool) get_option( 'require_name_email', 1 );
|
||||
$fields = array(
|
||||
'author' => array(
|
||||
'label' => __( 'Name', 'woocommerce' ),
|
||||
'type' => 'text',
|
||||
'value' => $commenter['comment_author'],
|
||||
'required' => $name_email_required,
|
||||
),
|
||||
'email' => array(
|
||||
'label' => __( 'Email', 'woocommerce' ),
|
||||
'type' => 'email',
|
||||
'value' => $commenter['comment_author_email'],
|
||||
'required' => $name_email_required,
|
||||
),
|
||||
);
|
||||
|
||||
$comment_form['fields'] = array();
|
||||
|
||||
foreach ( $fields as $key => $field ) {
|
||||
$field_html = '<p class="comment-form-' . esc_attr( $key ) . '">';
|
||||
$field_html .= '<label for="' . esc_attr( $key ) . '">' . esc_html( $field['label'] );
|
||||
|
||||
if ( $field['required'] ) {
|
||||
$field_html .= ' <span class="required">*</span>';
|
||||
}
|
||||
|
||||
$field_html .= '</label><input id="' . esc_attr( $key ) . '" name="' . esc_attr( $key ) . '" type="' . esc_attr( $field['type'] ) . '" value="' . esc_attr( $field['value'] ) . '" size="30" ' . ( $field['required'] ? 'required' : '' ) . ' /></p>';
|
||||
|
||||
$comment_form['fields'][ $key ] = $field_html;
|
||||
}
|
||||
|
||||
$account_page_url = wc_get_page_permalink( 'myaccount' );
|
||||
if ( $account_page_url ) {
|
||||
/* translators: %s opening and closing link tags respectively */
|
||||
$comment_form['must_log_in'] = '<p class="must-log-in">' . sprintf( esc_html__( 'You must be %1$slogged in%2$s to post a review.', 'woocommerce' ), '<a href="' . esc_url( $account_page_url ) . '">', '</a>' ) . '</p>';
|
||||
}
|
||||
|
||||
if ( $review_ratings_enabled ) {
|
||||
$comment_form['comment_field'] = '<div class="comment-form-rating"><label for="rating">' . esc_html__( 'Your rating', 'woocommerce' ) . ( wc_review_ratings_required() ? ' <span class="required">*</span>' : '' ) . '</label><select name="rating" id="rating" required>
|
||||
<option value="">' . esc_html__( 'Rate…', 'woocommerce' ) . '</option>
|
||||
<option value="5">' . esc_html__( 'Perfect', 'woocommerce' ) . '</option>
|
||||
<option value="4">' . esc_html__( 'Good', 'woocommerce' ) . '</option>
|
||||
<option value="3">' . esc_html__( 'Average', 'woocommerce' ) . '</option>
|
||||
<option value="2">' . esc_html__( 'Not that bad', 'woocommerce' ) . '</option>
|
||||
<option value="1">' . esc_html__( 'Very poor', 'woocommerce' ) . '</option>
|
||||
</select></div>';
|
||||
}
|
||||
|
||||
$comment_form['comment_field'] .= '<p class="comment-form-comment"><label for="comment">' . esc_html__( 'Your review', 'woocommerce' ) . ' <span class="required">*</span></label><textarea id="comment" name="comment" cols="45" rows="8" required></textarea></p>';
|
||||
|
||||
comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
<div id="review_form_wrapper" class="large-<?php if ( get_comment_pages_count() == 0 || $tab_style == 'sections' || $tab_style == 'tabs_vertical' ) { echo '12'; } else { echo '5'; } ?> col">
|
||||
<div id="review_form" class="col-inner">
|
||||
<div class="review-form-inner has-border">
|
||||
<p class="woocommerce-verification-required"><?php esc_html_e( 'Only logged in customers who have purchased this product may leave a review.', 'woocommerce' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
59
wp-content/themes/flatsome/woocommerce/single-product.php
Normal file
59
wp-content/themes/flatsome/woocommerce/single-product.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* The Template for displaying all single products.
|
||||
*
|
||||
* Override this template by copying it to yourtheme/woocommerce/single-product.php
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 1.6.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
get_header( 'shop' );
|
||||
|
||||
do_action( 'flatsome_before_product_page' );
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_main_content hook
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
|
||||
* @hooked woocommerce_breadcrumb - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_main_content' );
|
||||
?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
if ( flatsome_product_block( get_the_ID() ) ) {
|
||||
wc_get_template_part( 'content', 'single-product-custom' );
|
||||
} else {
|
||||
wc_get_template_part( 'content', 'single-product' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_main_content hook
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
|
||||
*/
|
||||
do_action( 'woocommerce_after_main_content' );
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
do_action( 'flatsome_after_product_page' );
|
||||
|
||||
get_footer( 'shop' );
|
||||
|
||||
?>
|
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$custom_filter_text = get_theme_mod( 'category_filter_text' );
|
||||
$filter_text = $custom_filter_text ? $custom_filter_text : __( 'Filter', 'woocommerce' );
|
||||
?>
|
||||
<div class="category-filtering container text-center product-filter-row show-for-medium">
|
||||
<a href="#product-sidebar"
|
||||
data-open="#product-sidebar"
|
||||
data-pos="left"
|
||||
class="filter-button uppercase plain">
|
||||
<i class="icon-equalizer"></i>
|
||||
<strong><?php echo $filter_text ?></strong>
|
||||
</a>
|
||||
</div>
|
@@ -0,0 +1,19 @@
|
||||
<div class="shop-page-title product-page-title dark featured-title page-title <?php flatsome_header_title_classes() ?>">
|
||||
|
||||
<div class="page-title-bg fill">
|
||||
<div class="title-bg fill bg-fill" data-parallax-fade="true" data-parallax="-2" data-parallax-background data-parallax-container=".page-title"></div>
|
||||
<div class="title-overlay fill"></div>
|
||||
</div>
|
||||
|
||||
<div class="page-title-inner flex-row container medium-flex-wrap flex-has-center">
|
||||
<div class="flex-col">
|
||||
|
||||
</div>
|
||||
<div class="flex-col flex-center text-center">
|
||||
<?php do_action('flatsome_product_title') ;?>
|
||||
</div>
|
||||
<div class="flex-col flex-right nav-right text-right medium-text-center">
|
||||
<?php do_action('flatsome_product_title_tools') ;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,17 @@
|
||||
<div class="shop-page-title product-page-title dark page-title featured-title <?php flatsome_header_title_classes() ?>">
|
||||
|
||||
<div class="page-title-bg fill">
|
||||
<div class="title-bg fill bg-fill" data-parallax-fade="true" data-parallax="-2" data-parallax-background data-parallax-container=".page-title"></div>
|
||||
<div class="title-overlay fill"></div>
|
||||
</div>
|
||||
|
||||
<div class="page-title-inner flex-row medium-flex-wrap container">
|
||||
<div class="flex-col flex-grow medium-text-center">
|
||||
<?php do_action('flatsome_product_title') ;?>
|
||||
</div>
|
||||
|
||||
<div class="flex-col nav-right medium-text-center">
|
||||
<?php do_action('flatsome_product_title_tools') ;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,11 @@
|
||||
<div class="page-title shop-page-title product-page-title">
|
||||
<div class="page-title-inner flex-row medium-flex-wrap container">
|
||||
<div class="flex-col flex-grow medium-text-center">
|
||||
<?php do_action('flatsome_product_title') ;?>
|
||||
</div>
|
||||
|
||||
<div class="flex-col medium-text-center">
|
||||
<?php do_action('flatsome_product_title_tools') ;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,69 @@
|
||||
<div class="product-container">
|
||||
|
||||
<div class="product-gallery product-gallery-wide">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col large-12">
|
||||
<div class="product-info">
|
||||
<div class="row">
|
||||
<div class="large-7 col">
|
||||
<div class="entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
<?php
|
||||
flatsome_breadcrumb();
|
||||
woocommerce_template_single_title();
|
||||
woocommerce_template_single_rating();
|
||||
woocommerce_template_single_excerpt();
|
||||
|
||||
if(get_theme_mod('product_info_share', 1)){
|
||||
woocommerce_template_single_sharing();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="large-5 col">
|
||||
<div class="is-well add-to-cart-wrapper <?php flatsome_product_summary_classes( false, false, true );?>">
|
||||
<?php
|
||||
|
||||
if(!flatsome_option('catalog_mode')){
|
||||
woocommerce_template_single_price();
|
||||
flatsome_before_add_to_cart_html();
|
||||
woocommerce_template_single_add_to_cart();
|
||||
flatsome_after_add_to_cart_html();
|
||||
} else {
|
||||
if(flatsome_option('catalog_mode_prices')){
|
||||
woocommerce_template_single_price();
|
||||
}
|
||||
echo '<div class="catalog-product-text pb relative">';
|
||||
echo do_shortcode(flatsome_option('catalog_mode_product'));
|
||||
echo '</div>';
|
||||
}
|
||||
woocommerce_template_single_meta();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="product-footer" style="margin-top: 30px;">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,72 @@
|
||||
<div class="product-main">
|
||||
<div class="row content-row row-divided row-large">
|
||||
|
||||
<div id="product-sidebar" class="col large-3 hide-for-medium shop-sidebar <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="col large-9">
|
||||
<div class="row">
|
||||
<div class="large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="product-info summary entry-summary col col-fit <?php flatsome_product_summary_classes();?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_template_single_title - 5
|
||||
* @hooked woocommerce_template_single_rating - 10
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="product-footer">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,66 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div id="product-sidebar" class="col large-2 hide-for-medium product-sidebar-small <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-gallery large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col col-fit entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_template_single_title - 5
|
||||
* @hooked woocommerce_template_single_rating - 10
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,71 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div class="product-gallery large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col col-fit entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_template_single_title - 5
|
||||
* @hooked woocommerce_template_single_rating - 10
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="product-sidebar" class="col col-divided large-3 col-first hide-for-medium <?php flatsome_sidebar_classes(); ?>">
|
||||
<div class="sidebar-inner">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,71 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div class="product-gallery large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col-fit col entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_template_single_title - 5
|
||||
* @hooked woocommerce_template_single_rating - 10
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="product-sidebar" class="mfp-hide">
|
||||
<div class="sidebar-inner">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,67 @@
|
||||
<div class="row content-row row-divided row-large row-reverse">
|
||||
<div id="product-sidebar" class="col large-3 hide-for-medium shop-sidebar <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="col large-9">
|
||||
<div class="product-main">
|
||||
<div class="row">
|
||||
<div class="large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="product-info summary entry-summary col col-fit <?php flatsome_product_summary_classes();?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_template_single_title - 5
|
||||
* @hooked woocommerce_template_single_rating - 10
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="product-footer">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,70 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row mb-0 content-row">
|
||||
|
||||
|
||||
<div class="product-gallery large-<?php echo flatsome_option('product_image_width'); ?> col">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col-fit col-divided col entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_template_single_title - 5
|
||||
* @hooked woocommerce_template_single_rating - 10
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="product-sidebar" class="col large-3 hide-for-medium <?php flatsome_sidebar_classes(); ?>">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
} else if(is_active_sidebar( 'shop-sidebar' )) {
|
||||
dynamic_sidebar('shop-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,78 @@
|
||||
<div class="product-container">
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div class="product-gallery col large-<?php echo flatsome_option('product_image_width'); ?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col-fit col entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
<?php flatsome_sticky_column_open(); ?>
|
||||
<div class="product-stacked-info">
|
||||
<?php if(!get_theme_mod('product_header') && get_theme_mod('product_next_prev_nav',1)) { ?>
|
||||
<div class="product-stacked-next-prev-nav absolute top right hide-for-medium">
|
||||
<?php flatsome_product_next_prev_nav('nav-right'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_template_single_title - 5
|
||||
* @hooked woocommerce_template_single_rating - 10
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php flatsome_sticky_column_close(); ?>
|
||||
</div>
|
||||
|
||||
<div id="product-sidebar" class="mfp-hide">
|
||||
<div class="sidebar-inner">
|
||||
<?php
|
||||
do_action( 'flatsome_before_product_sidebar' );
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if ( is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar( 'product-sidebar' );
|
||||
} else if ( is_active_sidebar( 'shop-sidebar' ) ) {
|
||||
dynamic_sidebar( 'shop-sidebar' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,67 @@
|
||||
<div class="product-container">
|
||||
|
||||
<div class="product-main">
|
||||
<div class="row content-row mb-0">
|
||||
|
||||
<div class="product-gallery col large-<?php echo flatsome_option('product_image_width'); ?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_before_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="product-info summary col-fit col entry-summary <?php flatsome_product_summary_classes();?>">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_template_single_title - 5
|
||||
* @hooked woocommerce_template_single_rating - 10
|
||||
* @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
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="product-sidebar" class="col large-2 hide-for-medium product-sidebar-small">
|
||||
<?php
|
||||
do_action('flatsome_before_product_sidebar');
|
||||
/**
|
||||
* woocommerce_sidebar hook
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
if (is_active_sidebar( 'product-sidebar' ) ) {
|
||||
dynamic_sidebar('product-sidebar');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-footer">
|
||||
<div class="container">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_after_single_product_summary hook
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* Photoswipe markup
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/photoswipe.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.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Root element of PhotoSwipe. Must have class pswp. -->
|
||||
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
<!-- Background of PhotoSwipe. It's a separate element as animating opacity is faster than rgba(). -->
|
||||
<div class="pswp__bg"></div>
|
||||
|
||||
<!-- Slides wrapper with overflow:hidden. -->
|
||||
<div class="pswp__scroll-wrap">
|
||||
|
||||
<!-- Container that holds slides.
|
||||
PhotoSwipe keeps only 3 of them in the DOM to save memory.
|
||||
Don't modify these 3 pswp__item elements, data is added later on. -->
|
||||
<div class="pswp__container">
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
</div>
|
||||
|
||||
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
|
||||
<div class="pswp__ui pswp__ui--hidden">
|
||||
|
||||
<div class="pswp__top-bar">
|
||||
|
||||
<!-- Controls are self-explanatory. Order can be changed. -->
|
||||
|
||||
<div class="pswp__counter"></div>
|
||||
|
||||
<button class="pswp__button pswp__button--close" aria-label="<?php esc_attr_e( 'Close (Esc)', 'woocommerce' ); ?>"></button>
|
||||
|
||||
<button class="pswp__button pswp__button--zoom" aria-label="<?php esc_attr_e( 'Zoom in/out', 'woocommerce' ); ?>"></button>
|
||||
|
||||
<div class="pswp__preloader">
|
||||
<div class="loading-spin"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
|
||||
<div class="pswp__share-tooltip"></div>
|
||||
</div>
|
||||
|
||||
<button class="pswp__button--arrow--left" aria-label="<?php esc_attr_e( 'Previous (arrow left)', 'woocommerce' ); ?>"></button>
|
||||
|
||||
<button class="pswp__button--arrow--right" aria-label="<?php esc_attr_e( 'Next (arrow right)', 'woocommerce' ); ?>"></button>
|
||||
|
||||
<div class="pswp__caption">
|
||||
<div class="pswp__caption__center"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Price, including microdata for SEO
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/price.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.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
global $product;
|
||||
|
||||
$classes = array();
|
||||
if($product->is_on_sale()) $classes[] = 'price-on-sale';
|
||||
if(!$product->is_in_stock()) $classes[] = 'price-not-in-stock'; ?>
|
||||
<div class="price-wrapper">
|
||||
<p class="price product-page-price <?php echo implode(' ', $classes); ?>">
|
||||
<?php echo $product->get_price_html(); ?></p>
|
||||
</div>
|
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
global $post, $product;
|
||||
|
||||
$attachment_ids = $product->get_gallery_image_ids();
|
||||
$post_thumbnail = has_post_thumbnail();
|
||||
$thumb_count = count( $attachment_ids );
|
||||
|
||||
if ( $post_thumbnail ) $thumb_count++;
|
||||
|
||||
// Disable thumbnails if there is only one extra image.
|
||||
if ( $post_thumbnail && $thumb_count == 1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$rtl = 'false';
|
||||
$thumb_cell_align = 'left';
|
||||
|
||||
if ( is_rtl() ) {
|
||||
$rtl = 'true';
|
||||
$thumb_cell_align = 'right';
|
||||
}
|
||||
|
||||
if ( $attachment_ids ) {
|
||||
$loop = 0;
|
||||
$image_size = 'thumbnail';
|
||||
$gallery_class = array( 'product-thumbnails', 'thumbnails' );
|
||||
|
||||
// Check if custom gallery thumbnail size is set and use that.
|
||||
$image_check = wc_get_image_size( 'gallery_thumbnail' );
|
||||
if ( $image_check['width'] !== 100 ) {
|
||||
$image_size = 'gallery_thumbnail';
|
||||
}
|
||||
|
||||
$gallery_thumbnail = wc_get_image_size( apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_' . $image_size ) );
|
||||
|
||||
if ( $thumb_count < 5 ) {
|
||||
$gallery_class[] = 'slider-no-arrows';
|
||||
}
|
||||
|
||||
$gallery_class[] = 'slider row row-small row-slider slider-nav-small small-columns-4';
|
||||
?>
|
||||
<div class="<?php echo implode( ' ', $gallery_class ); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "<?php echo $thumb_cell_align; ?>",
|
||||
"wrapAround": false,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons": true,
|
||||
"asNavFor": ".product-gallery-slider",
|
||||
"percentPosition": true,
|
||||
"imagesLoaded": true,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>,
|
||||
"contain": true
|
||||
}'>
|
||||
<?php
|
||||
|
||||
|
||||
if ( $post_thumbnail ) :
|
||||
?>
|
||||
<div class="col is-nav-selected first">
|
||||
<a>
|
||||
<?php
|
||||
$image_id = get_post_thumbnail_id( $post->ID );
|
||||
$image = wp_get_attachment_image_src( $image_id, apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_' . $image_size ) );
|
||||
$image_alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true );
|
||||
$image = '<img src="' . $image[0] . '" alt="' . $image_alt . '" width="' . $gallery_thumbnail['width'] . '" height="' . $gallery_thumbnail['height'] . '" class="attachment-woocommerce_thumbnail" />';
|
||||
|
||||
echo $image;
|
||||
?>
|
||||
</a>
|
||||
</div><?php
|
||||
endif;
|
||||
|
||||
foreach ( $attachment_ids as $attachment_id ) {
|
||||
|
||||
$classes = array( '' );
|
||||
$image_class = esc_attr( implode( ' ', $classes ) );
|
||||
$image = wp_get_attachment_image_src( $attachment_id, apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_' . $image_size ) );
|
||||
|
||||
if ( empty( $image ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$image_alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true );
|
||||
$image = '<img src="' . $image[0] . '" alt="' . $image_alt . '" width="' . $gallery_thumbnail['width'] . '" height="' . $gallery_thumbnail['height'] . '" class="attachment-woocommerce_thumbnail" />';
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<div class="col"><a>%s</a></div>', $image ), $attachment_id, $post->ID, $image_class );
|
||||
|
||||
$loop ++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
global $product;
|
||||
|
||||
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 );
|
||||
$post_thumbnail_id = $product->get_image_id();
|
||||
$wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_classes', array(
|
||||
'woocommerce-product-gallery',
|
||||
'woocommerce-product-gallery--' . ( $product->get_image_id() ? 'with-images' : 'without-images' ),
|
||||
'woocommerce-product-gallery--columns-' . absint( $columns ),
|
||||
'images',
|
||||
) );
|
||||
?>
|
||||
<div class="product-gallery-default has-hover relative">
|
||||
|
||||
<?php do_action('flatsome_sale_flash'); ?>
|
||||
|
||||
<div class="image-tools absolute top show-on-hover right z-3">
|
||||
<?php do_action('flatsome_product_image_tools_top'); ?>
|
||||
</div>
|
||||
|
||||
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>" style="opacity: 0; transition: opacity .25s ease-in-out;">
|
||||
<figure class="woocommerce-product-gallery__wrapper">
|
||||
<?php
|
||||
if ( $product->get_image_id() ) {
|
||||
$html = flatsome_wc_get_gallery_image_html( $post_thumbnail_id, true );
|
||||
} else {
|
||||
$html = '<div class="woocommerce-product-gallery__image--placeholder">';
|
||||
$html .= sprintf( '<img src="%s" alt="%s" class="wp-post-image" />', esc_url( wc_placeholder_img_src( 'woocommerce_single' ) ), esc_html__( 'Awaiting product image', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
?>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
global $product;
|
||||
|
||||
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 );
|
||||
$post_thumbnail_id = $product->get_image_id();
|
||||
$wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_classes', array(
|
||||
'woocommerce-product-gallery',
|
||||
'woocommerce-product-gallery--' . ( $product->get_image_id() ? 'with-images' : 'without-images' ),
|
||||
'woocommerce-product-gallery--columns-' . absint( $columns ),
|
||||
'images',
|
||||
) );
|
||||
|
||||
$slider_classes = array('product-gallery-stacked', 'product-gallery-slider', 'slider', 'slider-nav-small', 'mb-half');
|
||||
|
||||
// Image Zoom
|
||||
if(get_theme_mod('product_zoom', 0)){
|
||||
$slider_classes[] = 'has-image-zoom';
|
||||
}
|
||||
|
||||
$rtl = 'false';
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
if(get_theme_mod('product_lightbox','default') == 'disabled'){
|
||||
$slider_classes[] = 'disable-lightbox';
|
||||
}
|
||||
|
||||
?>
|
||||
<?php do_action('flatsome_before_product_images'); ?>
|
||||
|
||||
<div class="product-images relative mb-half has-hover <?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>">
|
||||
|
||||
<?php do_action('flatsome_sale_flash'); ?>
|
||||
|
||||
<div class="image-tools absolute top show-on-hover right z-3">
|
||||
<?php do_action('flatsome_product_image_tools_top'); ?>
|
||||
</div>
|
||||
|
||||
<figure class="woocommerce-product-gallery__wrapper <?php echo implode(' ', $slider_classes); ?>"
|
||||
data-flickity='{
|
||||
"cellAlign": "center",
|
||||
"wrapAround": true,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons": false,
|
||||
"adaptiveHeight": true,
|
||||
"imagesLoaded": true,
|
||||
"lazyLoad": 1,
|
||||
"dragThreshold" : 15,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>
|
||||
}'>
|
||||
<?php
|
||||
|
||||
if ( $product->get_image_id() ) {
|
||||
$html = flatsome_wc_get_gallery_image_html( $post_thumbnail_id, true );
|
||||
} else {
|
||||
$html = '<div class="woocommerce-product-gallery__image--placeholder">';
|
||||
$html .= sprintf( '<img src="%s" alt="%s" class="wp-post-image" />', esc_url( wc_placeholder_img_src( 'woocommerce_single' ) ), esc_html__( 'Awaiting product image', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
?>
|
||||
</figure>
|
||||
</div>
|
||||
<?php do_action('flatsome_after_product_images'); ?>
|
||||
|
||||
<div class="show-for-medium product-gallery-stacked-thumbnails">
|
||||
<?php wc_get_template( 'woocommerce/single-product/product-gallery-thumbnails.php' ); ?>
|
||||
</div>
|
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
global $product;
|
||||
|
||||
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 );
|
||||
$post_thumbnail_id = $product->get_image_id();
|
||||
$wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_classes', array(
|
||||
'woocommerce-product-gallery',
|
||||
'woocommerce-product-gallery--' . ( $product->get_image_id() ? 'with-images' : 'without-images' ),
|
||||
'woocommerce-product-gallery--columns-' . absint( $columns ),
|
||||
'images',
|
||||
) );
|
||||
|
||||
$slider_classes = array('product-gallery-slider','slider','slider-nav-small','mb-0');
|
||||
$rtl = 'false';
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
// Image Zoom
|
||||
if(get_theme_mod('product_zoom', 0)){
|
||||
$slider_classes[] = 'has-image-zoom';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="row row-small">
|
||||
<div class="col large-10">
|
||||
<?php do_action('flatsome_before_product_images'); ?>
|
||||
|
||||
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?> relative mb-half has-hover" data-columns="<?php echo esc_attr( $columns ); ?>">
|
||||
|
||||
<?php do_action('flatsome_sale_flash'); ?>
|
||||
|
||||
<div class="image-tools absolute top show-on-hover right z-3">
|
||||
<?php do_action('flatsome_product_image_tools_top'); ?>
|
||||
</div>
|
||||
|
||||
<figure class="woocommerce-product-gallery__wrapper <?php echo implode(' ', $slider_classes); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "center",
|
||||
"wrapAround": true,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons":true,
|
||||
"adaptiveHeight": true,
|
||||
"imagesLoaded": true,
|
||||
"lazyLoad": 1,
|
||||
"dragThreshold" : 15,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>
|
||||
}'>
|
||||
<?php
|
||||
if ( $product->get_image_id() ) {
|
||||
$html = flatsome_wc_get_gallery_image_html( $post_thumbnail_id, true );
|
||||
} else {
|
||||
$html = '<div class="woocommerce-product-gallery__image--placeholder">';
|
||||
$html .= sprintf( '<img src="%s" alt="%s" class="wp-post-image" />', esc_url( wc_placeholder_img_src( 'woocommerce_single' ) ), esc_html__( 'Awaiting product image', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
|
||||
?>
|
||||
</figure>
|
||||
|
||||
<div class="image-tools absolute bottom left z-3">
|
||||
<?php do_action('flatsome_product_image_tools_bottom'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php do_action('flatsome_after_product_images'); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
$attachment_ids = $product->get_gallery_image_ids();
|
||||
$thumb_count = count($attachment_ids)+1;
|
||||
|
||||
$rtl = 'false';
|
||||
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
$thumb_cell_align = "left";
|
||||
|
||||
if ( $attachment_ids ) {
|
||||
$loop = 0;
|
||||
$image_size = 'gallery_thumbnail';
|
||||
$gallery_class = array( 'product-thumbnails', 'thumbnails' );
|
||||
$gallery_thumbnail = wc_get_image_size( apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_' . $image_size ) );
|
||||
|
||||
if($thumb_count <= 5){
|
||||
$gallery_class[] = 'slider-no-arrows';
|
||||
}
|
||||
|
||||
$gallery_class[] = 'slider row row-small row-slider slider-nav-small small-columns-4';
|
||||
|
||||
?>
|
||||
<div class="col large-2 large-col-first vertical-thumbnails pb-0">
|
||||
|
||||
<div class="<?php echo implode(' ', $gallery_class); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "left",
|
||||
"wrapAround": false,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons": false,
|
||||
"asNavFor": ".product-gallery-slider",
|
||||
"percentPosition": true,
|
||||
"imagesLoaded": true,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>,
|
||||
"contain": true
|
||||
}'
|
||||
><?php
|
||||
|
||||
if ( has_post_thumbnail() ) :
|
||||
?>
|
||||
<div class="col is-nav-selected first">
|
||||
<a>
|
||||
<?php
|
||||
$image_id = get_post_thumbnail_id($post->ID);
|
||||
$image = wp_get_attachment_image_src( $image_id, apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_'.$image_size ) );
|
||||
$image_alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true );
|
||||
$image = '<img src="'.$image[0].'" alt="'.$image_alt.'" width="'.$gallery_thumbnail['width'].'" height="'.$gallery_thumbnail['height'].'" class="attachment-woocommerce_thumbnail" />';
|
||||
|
||||
echo $image;
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
foreach ( $attachment_ids as $attachment_id ) {
|
||||
|
||||
$classes = array( '' );
|
||||
$image_class = esc_attr( implode( ' ', $classes ) );
|
||||
$image = wp_get_attachment_image_src( $attachment_id, apply_filters( 'woocommerce_gallery_thumbnail_size', 'woocommerce_'.$image_size ));
|
||||
$image_alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true );
|
||||
$image = '<img src="'.$image[0].'" alt="'.$image_alt.'" width="'.$gallery_thumbnail['width'].'" height="'.$gallery_thumbnail['height'].'" class="attachment-woocommerce_thumbnail" />';
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<div class="col"><a>%s</a></div>', $image ), $attachment_id, $post->ID, $image_class );
|
||||
|
||||
$loop++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
global $product;
|
||||
|
||||
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 );
|
||||
$post_thumbnail_id = $product->get_image_id();
|
||||
$wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_classes', array(
|
||||
'woocommerce-product-gallery',
|
||||
'woocommerce-product-gallery--' . ( $product->get_image_id() ? 'with-images' : 'without-images' ),
|
||||
'woocommerce-product-gallery--columns-' . absint( $columns ),
|
||||
'images',
|
||||
) );
|
||||
|
||||
$slider_classes = array( 'product-gallery-slider', 'slider', 'slider-nav-circle', 'mb-half', 'slider-style-container', 'slider-nav-light', 'slider-load-first', 'no-overflow' );
|
||||
$rtl = 'false';
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
?>
|
||||
<?php do_action( 'flatsome_before_product_images' ); ?>
|
||||
|
||||
<div class="product-images slider-wrapper relative mb-half has-hover <?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?> " data-columns="<?php echo esc_attr( $columns ); ?>">
|
||||
<div class="absolute left right">
|
||||
<div class="container relative">
|
||||
<?php do_action( 'flatsome_sale_flash' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<figure class="woocommerce-product-gallery__wrapper <?php echo implode( ' ', $slider_classes ); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "center",
|
||||
"wrapAround": true,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons":true,
|
||||
"adaptiveHeight": true,
|
||||
"imagesLoaded": true,
|
||||
"lazyLoad": 1,
|
||||
"dragThreshold" : 15,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>
|
||||
}'
|
||||
style="background-color: #333;">
|
||||
<?php
|
||||
|
||||
if ( $product->get_image_id() ) {
|
||||
$html = flatsome_wc_get_gallery_image_html( $post_thumbnail_id, true, 'full' );
|
||||
} else {
|
||||
$html = '<div class="woocommerce-product-gallery__image--placeholder">';
|
||||
$html .= sprintf( '<img src="%s" alt="%s" class="wp-post-image" />', esc_url( wc_placeholder_img_src( 'woocommerce_single' ) ), esc_html__( 'Awaiting product image', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
?>
|
||||
</figure>
|
||||
|
||||
<div class="loading-spin centered dark"></div>
|
||||
|
||||
<div class="absolute bottom left right">
|
||||
<div class="container relative image-tools">
|
||||
<div class="image-tools absolute bottom right z-3">
|
||||
<?php do_action( 'flatsome_product_image_tools_bottom' ); ?>
|
||||
<?php do_action( 'flatsome_product_image_tools_top' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php do_action( 'flatsome_after_product_images' ); ?>
|
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Image
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disable check, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
if(get_theme_mod('product_gallery_woocommerce')) {
|
||||
wc_get_template_part( 'single-product/product-image', 'default' );
|
||||
return;
|
||||
}
|
||||
|
||||
if(get_theme_mod('product_layout') == 'gallery-wide'){
|
||||
wc_get_template_part( 'single-product/product-image', 'wide' );
|
||||
return;
|
||||
}
|
||||
|
||||
if(get_theme_mod('product_layout') == 'stacked-right'){
|
||||
wc_get_template_part( 'single-product/product-image', 'stacked' );
|
||||
return;
|
||||
}
|
||||
|
||||
if(get_theme_mod('product_image_style') == 'vertical'){
|
||||
wc_get_template_part( 'single-product/product-image', 'vertical' );
|
||||
return;
|
||||
}
|
||||
|
||||
global $product;
|
||||
|
||||
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 );
|
||||
$post_thumbnail_id = $product->get_image_id();
|
||||
$wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_classes', array(
|
||||
'woocommerce-product-gallery',
|
||||
'woocommerce-product-gallery--' . ( $product->get_image_id() ? 'with-images' : 'without-images' ),
|
||||
'woocommerce-product-gallery--columns-' . absint( $columns ),
|
||||
'images',
|
||||
) );
|
||||
|
||||
$slider_classes = array('product-gallery-slider','slider','slider-nav-small','mb-half');
|
||||
|
||||
// Image Zoom
|
||||
if(get_theme_mod('product_zoom', 0)){
|
||||
$slider_classes[] = 'has-image-zoom';
|
||||
}
|
||||
|
||||
$rtl = 'false';
|
||||
if(is_rtl()) $rtl = 'true';
|
||||
|
||||
if(get_theme_mod('product_lightbox','default') == 'disabled'){
|
||||
$slider_classes[] = 'disable-lightbox';
|
||||
}
|
||||
|
||||
?>
|
||||
<?php do_action('flatsome_before_product_images'); ?>
|
||||
|
||||
<div class="product-images relative mb-half has-hover <?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>">
|
||||
|
||||
<?php do_action('flatsome_sale_flash'); ?>
|
||||
|
||||
<div class="image-tools absolute top show-on-hover right z-3">
|
||||
<?php do_action('flatsome_product_image_tools_top'); ?>
|
||||
</div>
|
||||
|
||||
<figure class="woocommerce-product-gallery__wrapper <?php echo implode(' ', $slider_classes); ?>"
|
||||
data-flickity-options='{
|
||||
"cellAlign": "center",
|
||||
"wrapAround": true,
|
||||
"autoPlay": false,
|
||||
"prevNextButtons":true,
|
||||
"adaptiveHeight": true,
|
||||
"imagesLoaded": true,
|
||||
"lazyLoad": 1,
|
||||
"dragThreshold" : 15,
|
||||
"pageDots": false,
|
||||
"rightToLeft": <?php echo $rtl; ?>
|
||||
}'>
|
||||
<?php
|
||||
if ( $product->get_image_id() ) {
|
||||
$html = flatsome_wc_get_gallery_image_html( $post_thumbnail_id, true );
|
||||
} else {
|
||||
$html = '<div class="woocommerce-product-gallery__image--placeholder">';
|
||||
$html .= sprintf( '<img src="%s" alt="%s" class="wp-post-image" />', esc_url( wc_placeholder_img_src( 'woocommerce_single' ) ), esc_html__( 'Awaiting product image', 'woocommerce' ) );
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
do_action( 'woocommerce_product_thumbnails' );
|
||||
?>
|
||||
</figure>
|
||||
|
||||
<div class="image-tools absolute bottom left z-3">
|
||||
<?php do_action('flatsome_product_image_tools_bottom'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php do_action('flatsome_after_product_images'); ?>
|
||||
|
||||
<?php wc_get_template( 'woocommerce/single-product/product-gallery-thumbnails.php' ); ?>
|
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Thumbnails
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-thumbnails.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.5.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// FL: Disabled, Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
|
||||
//if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
global $product;
|
||||
|
||||
$attachment_ids = $product->get_gallery_image_ids();
|
||||
$image_size = get_theme_mod( 'product_layout' ) == 'gallery-wide' ? 'full' : 'woocommerce_single';
|
||||
|
||||
|
||||
if ( $attachment_ids && $product->get_image_id() ) {
|
||||
foreach ( $attachment_ids as $attachment_id ) {
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', flatsome_wc_get_gallery_image_html( $attachment_id, $main_image = false, $image_size ), $attachment_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Rating
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/rating.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
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
global $product;
|
||||
$review_ratings_enabled = wc_review_ratings_enabled();
|
||||
if ( ! $review_ratings_enabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$rating_count = $product->get_rating_count();
|
||||
$review_count = $product->get_review_count();
|
||||
$average = $product->get_average_rating();
|
||||
|
||||
if ( $rating_count > 0 ) : ?>
|
||||
|
||||
<div class="woocommerce-product-rating">
|
||||
<?php echo flatsome_get_rating_html( $average, $rating_count ); // WPCS: XSS ok. ?>
|
||||
<?php if ( get_theme_mod( 'product_info_review_count' ) && get_theme_mod( 'product_info_review_count_style' ) != 'tooltip' ) : ?>
|
||||
<?php if ( comments_open() ) : ?>
|
||||
<?php //phpcs:disable ?>
|
||||
<a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'woocommerce' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a>
|
||||
<?php // phpcs:enable ?>
|
||||
<?php endif ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* Related Products
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/related.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.9.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Get Type.
|
||||
$type = get_theme_mod( 'related_products', 'slider' );
|
||||
$repeater_classes = array();
|
||||
|
||||
if ( $type == 'hidden' ) return;
|
||||
if ( $type == 'grid' ) $type = 'row';
|
||||
|
||||
if ( get_theme_mod('category_force_image_height' ) ) $repeater_classes[] = 'has-equal-box-heights';
|
||||
if ( get_theme_mod('equalize_product_box' ) ) $repeater_classes[] = 'equalize-box';
|
||||
|
||||
$repeater['type'] = $type;
|
||||
$repeater['columns'] = get_theme_mod( 'related_products_pr_row', 4 );
|
||||
$repeater['columns__md'] = get_theme_mod( 'related_products_pr_row_tablet', 3 );
|
||||
$repeater['columns__sm'] = get_theme_mod( 'related_products_pr_row_mobile', 2 );
|
||||
$repeater['class'] = implode( ' ', $repeater_classes );
|
||||
$repeater['slider_style'] = 'reveal';
|
||||
$repeater['row_spacing'] = 'small';
|
||||
|
||||
|
||||
if ( $related_products ) : ?>
|
||||
|
||||
<div class="related related-products-wrapper product-section">
|
||||
|
||||
<?php
|
||||
$heading = apply_filters( 'woocommerce_product_related_products_heading', __( 'Related products', 'woocommerce' ) );
|
||||
|
||||
if ( $heading ) :
|
||||
?>
|
||||
<h3 class="product-section-title container-width product-section-title-related pt-half pb-half uppercase">
|
||||
<?php echo esc_html( $heading ); ?>
|
||||
</h3>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php get_flatsome_repeater_start( $repeater ); ?>
|
||||
|
||||
<?php foreach ( $related_products as $related_product ) : ?>
|
||||
|
||||
<?php
|
||||
$post_object = get_post( $related_product->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php get_flatsome_repeater_end( $repeater ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* Review Comments Template
|
||||
*
|
||||
* Closing li is left out on purpose!.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/review.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 http://docs.woothemes.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
} ?>
|
||||
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
|
||||
<div id="comment-<?php comment_ID(); ?>" class="comment_container review-item flex-row align-top">
|
||||
|
||||
<div class="flex-col">
|
||||
<?php
|
||||
/**
|
||||
* The woocommerce_review_before hook
|
||||
*
|
||||
* @hooked woocommerce_review_display_gravatar - 10
|
||||
*/
|
||||
do_action( 'woocommerce_review_before', $comment );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="comment-text flex-col flex-grow">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* The woocommerce_review_before_comment_meta hook.
|
||||
*
|
||||
* @hooked woocommerce_review_display_rating - 10
|
||||
*/
|
||||
do_action( 'woocommerce_review_before_comment_meta', $comment );
|
||||
|
||||
/**
|
||||
* The woocommerce_review_meta hook.
|
||||
*
|
||||
* @hooked woocommerce_review_display_meta - 10
|
||||
*/
|
||||
do_action( 'woocommerce_review_meta', $comment );
|
||||
|
||||
do_action( 'woocommerce_review_before_comment_text', $comment );
|
||||
|
||||
/**
|
||||
* The woocommerce_review_comment_text hook
|
||||
*
|
||||
* @hooked woocommerce_review_display_comment_text - 10
|
||||
*/
|
||||
do_action( 'woocommerce_review_comment_text', $comment );
|
||||
|
||||
do_action( 'woocommerce_review_after_comment_text', $comment ); ?>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* Product loop sale flash
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 1.6.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
global $post, $product;
|
||||
|
||||
$badge_style = flatsome_option('bubble_style');
|
||||
|
||||
// Fix depricated
|
||||
if($badge_style == 'style1') $badge_style = 'circle';
|
||||
if($badge_style == 'style2') $badge_style = 'square';
|
||||
if($badge_style == 'style3') $badge_style = 'frame';
|
||||
|
||||
?>
|
||||
<div class="badge-container is-larger absolute left top z-1">
|
||||
<?php if ( $product->is_on_sale() ) : ?>
|
||||
<?php
|
||||
$custom_text = get_theme_mod( 'sale_bubble_text' );
|
||||
$text = $custom_text ? $custom_text : __( 'Sale!', 'woocommerce' );
|
||||
|
||||
if ( get_theme_mod( 'sale_bubble_percentage' ) ) {
|
||||
$text = flatsome_presentage_bubble( $product, $text );
|
||||
}
|
||||
?>
|
||||
<?php echo apply_filters( 'woocommerce_sale_flash', '<div class="callout badge badge-'.$badge_style.'"><div class="badge-inner secondary on-sale"><span class="onsale">' . $text . '</span></div></div>', $post, $product ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php echo apply_filters( 'flatsome_product_labels', '', $post, $product, $badge_style); ?>
|
||||
</div>
|
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Share
|
||||
*
|
||||
* Sharing plugins can hook into here or you can add your own code directly.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/share.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.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_share' ); // Sharing plugins can hook into here.
|
||||
|
||||
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
|
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Single product short description
|
||||
*
|
||||
* @author Automattic
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
global $post;
|
||||
|
||||
$short_description = apply_filters( 'woocommerce_short_description', $post->post_excerpt );
|
||||
|
||||
if ( ! $short_description ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="product-short-description">
|
||||
<?php echo $short_description; // WPCS: XSS ok. ?>
|
||||
</div>
|
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product tabs
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter tabs and allow third parties to add their own
|
||||
*
|
||||
* Each tab is an array containing title, callback and priority.
|
||||
* @see woocommerce_default_product_tabs()
|
||||
*/
|
||||
$product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
|
||||
|
||||
if ( ! empty( $product_tabs ) ) : ?>
|
||||
<div class="product-page-accordian">
|
||||
<div class="accordion" rel="<?php echo get_theme_mod( 'product_display', 'tabs' ) === 'accordian-collapsed' ? 0 : 1; ?>">
|
||||
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
||||
<div class="accordion-item">
|
||||
<a class="accordion-title plain" href="javascript:void();">
|
||||
<button class="toggle"><i class="icon-angle-down"></i></button>
|
||||
<?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', $product_tab['title'], $key ); ?>
|
||||
</a>
|
||||
<div class="accordion-inner">
|
||||
<?php
|
||||
if ( isset( $product_tab['callback'] ) ) {
|
||||
call_user_func( $product_tab['callback'], $key, $product_tab );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product tabs
|
||||
*
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter tabs and allow third parties to add their own
|
||||
*
|
||||
* Each tab is an array containing title, callback and priority.
|
||||
* @see woocommerce_default_product_tabs()
|
||||
*/
|
||||
$product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
|
||||
|
||||
if ( ! empty( $product_tabs ) ) : ?>
|
||||
<div class="product-page-sections">
|
||||
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
||||
<div class="product-section">
|
||||
<div class="row">
|
||||
<div class="large-2 col pb-0 mb-0">
|
||||
<h5 class="uppercase mt"><?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', $product_tab['title'], $key ); ?></h5>
|
||||
</div>
|
||||
|
||||
<div class="large-10 col pb-0 mb-0">
|
||||
<div class="panel entry-content">
|
||||
<?php
|
||||
if ( isset( $product_tab['callback'] ) ) {
|
||||
call_user_func( $product_tab['callback'], $key, $product_tab );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product tabs
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/tabs/tabs.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.8.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$tabs_style = get_theme_mod( 'product_display', 'tabs' );
|
||||
|
||||
// Get sections instead of tabs if set.
|
||||
if ( $tabs_style == 'sections' ) {
|
||||
wc_get_template_part( 'single-product/tabs/sections' );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Get accordion instead of tabs if set.
|
||||
if ( $tabs_style == 'accordian' || $tabs_style == 'accordian-collapsed' ) {
|
||||
wc_get_template_part( 'single-product/tabs/accordian' );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter tabs and allow third parties to add their own.
|
||||
*
|
||||
* Each tab is an array containing title, callback and priority.
|
||||
*
|
||||
* @see woocommerce_default_product_tabs()
|
||||
*/
|
||||
$product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
|
||||
|
||||
$tab_count = 0;
|
||||
$panel_count = 0;
|
||||
|
||||
if ( ! empty( $product_tabs ) ) : ?>
|
||||
|
||||
<div class="woocommerce-tabs wc-tabs-wrapper container tabbed-content">
|
||||
<ul class="tabs wc-tabs product-tabs small-nav-collapse <?php flatsome_product_tabs_classes(); ?>" role="tablist">
|
||||
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
||||
<li class="<?php echo esc_attr( $key ); ?>_tab <?php if ( $tab_count == 0 ) echo 'active'; ?>" id="tab-title-<?php echo esc_attr( $key ); ?>" role="tab" aria-controls="tab-<?php echo esc_attr( $key ); ?>">
|
||||
<a href="#tab-<?php echo esc_attr( $key ); ?>">
|
||||
<?php echo wp_kses_post( apply_filters( 'woocommerce_product_' . $key . '_tab_title', $product_tab['title'], $key ) ); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php $tab_count++; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<div class="tab-panels">
|
||||
<?php foreach ( $product_tabs as $key => $product_tab ) : ?>
|
||||
<div class="woocommerce-Tabs-panel woocommerce-Tabs-panel--<?php echo esc_attr( $key ); ?> panel entry-content <?php if ( $panel_count == 0 ) echo 'active'; ?>" id="tab-<?php echo esc_attr( $key ); ?>" role="tabpanel" aria-labelledby="tab-title-<?php echo esc_attr( $key ); ?>">
|
||||
<?php if ( $key == 'description' && ux_builder_is_active() ) echo flatsome_dummy_text(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php
|
||||
if ( isset( $product_tab['callback'] ) ) {
|
||||
call_user_func( $product_tab['callback'], $key, $product_tab );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php $panel_count++; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_product_after_tabs' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product title
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/title.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 1.6.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
?>
|
||||
<h1 class="product-title product_title entry-title">
|
||||
<?php the_title(); ?>
|
||||
</h1>
|
||||
|
||||
<?php if ( get_theme_mod( 'product_title_divider', 1 ) ) { ?>
|
||||
<div class="is-divider small"></div>
|
||||
<?php } ?>
|
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/**
|
||||
* Single Product Up-Sells
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/up-sells.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.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $upsells ) : ?>
|
||||
|
||||
<?php
|
||||
if ( get_theme_mod( 'product_upsell', 'sidebar' ) !== 'sidebar' ) :
|
||||
|
||||
$type = get_theme_mod( 'related_products', 'slider' );
|
||||
$repeater_classes = array();
|
||||
|
||||
if ( $type == 'grid' ) {
|
||||
$type = 'row';
|
||||
}
|
||||
|
||||
if ( get_theme_mod('category_force_image_height' ) ) $repeater_classes[] = 'has-equal-box-heights';
|
||||
if ( get_theme_mod('equalize_product_box' ) ) $repeater_classes[] = 'equalize-box';
|
||||
|
||||
$repeater['type'] = $type;
|
||||
$repeater['columns'] = get_theme_mod( 'related_products_pr_row', 4 );
|
||||
$repeater['columns__md'] = get_theme_mod( 'related_products_pr_row_tablet', 3 );
|
||||
$repeater['columns__sm'] = get_theme_mod( 'related_products_pr_row_mobile', 2 );
|
||||
$repeater['class'] = implode( ' ', $repeater_classes );
|
||||
$repeater['slider_style'] = 'reveal';
|
||||
$repeater['row_spacing'] = 'small';
|
||||
|
||||
if ( count( $upsells ) < $repeater['columns'] ) {
|
||||
$repeater['type'] = 'row';
|
||||
}
|
||||
?>
|
||||
<div class="up-sells upsells products upsells-wrapper product-section">
|
||||
<?php
|
||||
$heading = apply_filters( 'woocommerce_product_upsells_products_heading', __( 'You may also like…', 'woocommerce' ) );
|
||||
|
||||
if ( $heading ) :
|
||||
?>
|
||||
<h3 class="product-section-title product-section-title-upsell pt-half pb-half uppercase">
|
||||
<?php echo esc_html( $heading ); ?>
|
||||
</h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php get_flatsome_repeater_start( $repeater ); ?>
|
||||
|
||||
<?php foreach ( $upsells as $upsell ) : ?>
|
||||
|
||||
<?php
|
||||
$post_object = get_post( $upsell->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php get_flatsome_repeater_end( $repeater ); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
|
||||
<aside class="widget widget-upsell">
|
||||
<?php
|
||||
$heading = apply_filters( 'woocommerce_product_upsells_products_heading', __( 'You may also like…', 'woocommerce' ) );
|
||||
|
||||
if ( $heading ) :
|
||||
?>
|
||||
<h3 class="widget-title shop-sidebar">
|
||||
<?php echo esc_html( $heading ); ?>
|
||||
<div class="is-divider small"></div>
|
||||
</h3>
|
||||
<?php endif; ?>
|
||||
<!-- Upsell List style -->
|
||||
<ul class="product_list_widget">
|
||||
<?php foreach ( $upsells as $upsell ) : ?>
|
||||
|
||||
<?php
|
||||
$post_object = get_post( $upsell->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product-small' );
|
||||
?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
Reference in New Issue
Block a user