PATH:
home
/
letacommog
/
entrepro
/
wp-content
/
themes
/
rehub
/
woocommerce
/
single-product
<?php /** * Single Product Sale Flash * * This template can be overridden by copying it to yourtheme/woocommerce/single-product/sale-flash.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.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } global $post, $product; ?> <?php if ( $product->is_featured() ) : ?> <?php echo apply_filters( 'woocommerce_featured_flash', '<span class="onfeatured">' . esc_html__( 'Featured!', 'rehub_framework' ) . '</span>', $post, $product ); ?> <?php endif; ?> <?php if ( $product->is_on_sale()) : ?> <?php $percentage=0; $featured = ($product->is_featured()) ? ' onsalefeatured' : ''; if ($product->get_regular_price() && $product->get_regular_price() !=0) { $percentage = round( ( ( $product->get_regular_price() - $product->get_price() ) / $product->get_regular_price() ) * 100 ); } if ($percentage && $percentage>0 && !$product->is_type( 'variable' )) { $sales_html = apply_filters( 'woocommerce_sale_flash', '<span class="onsale'.$featured.'"><span>- ' . $percentage . '%</span></span>', $post, $product ); } else { $sales_html = apply_filters( 'woocommerce_sale_flash', '<span class="onsale'.$featured.'">' . esc_html__( 'Sale!', 'rehub_framework' ) . '</span>', $post, $product ); } ?> <?php echo ''.$sales_html; ?> <?php endif; ?>
[+]
..
[+]
tabs
[-] sale-flash.php
[edit]
[-] upsell-compact.php
[edit]
[-] full-width-upsell.php
[edit]
[-] full-width-related.php
[edit]
[-] related-with-sidebar.php
[edit]
[-] product-thumbnails.php
[edit]
[-] meta.php
[edit]
[-] share.php
[edit]
[-] product-image.php
[edit]
[-] full-width-upsell-no-margin.php
[edit]
[-] related-compact.php
[edit]
[-] upsell-with-sidebar.php
[edit]
[-] full-width-related-no-margin.php
[edit]
[+]
add-to-cart