Changeset 2939992
- Timestamp:
- 07/18/2023 04:06:34 PM (3 years ago)
- Location:
- wpf-product-countdown-timer
- Files:
-
- 12 added
- 1 deleted
- 3 edited
-
assets/screenshot-5.png (added)
-
tags/1.1.3 (deleted)
-
tags/1.1.4 (added)
-
tags/1.1.4/assets (added)
-
tags/1.1.4/assets/css (added)
-
tags/1.1.4/assets/css/style.css (added)
-
tags/1.1.4/assets/js (added)
-
tags/1.1.4/assets/js/campaign-timer.js (added)
-
tags/1.1.4/index.php (added)
-
tags/1.1.4/readme.txt (added)
-
tags/1.1.4/wpf-product-countdown-timer.php (added)
-
trunk/assets/css/style.css (modified) (5 diffs)
-
trunk/assets/js (added)
-
trunk/assets/js/campaign-timer.js (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wpf-product-countdown-timer.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpf-product-countdown-timer/trunk/assets/css/style.css
r2936118 r2939992 1 1 .wpfound_countdown_wrap { 2 margin: 30px 0; 2 margin: 30px 0 16px; 3 3 4 } 5 4 6 .wpfound_countdown_timer { 5 7 display: flex; … … 9 11 background: #1f1e1e; 10 12 color: #fff; 11 width: 60px;12 height: 5 5px;13 width: 55px; 14 height: 50px; 13 15 display: flex; 14 16 align-items: center; … … 33 35 display: inline-block; 34 36 margin-bottom: 15px; 35 font-size: 1 8px;37 font-size: 16px; 36 38 font-weight: 700; 37 39 color: red; … … 39 41 40 42 .wpf-product-progress-bar-container { 41 margin-bottom: 15px;43 margin-bottom: 20px; 42 44 43 45 } … … 57 59 58 60 } 61 62 .offer-title { 63 margin-bottom: 12px; 64 65 } 66 67 /*======================== 68 Product page 69 ========================*/ 70 /* .wpfund-product-page-timer-wrap .wpfound_countdown_timer .date { 71 background: none; 72 color: #212121; 73 width: 50px; 74 height: 50px; 75 font-size: 18px; 76 border-radius: 50%; 77 border: 1px solid #ececec; 78 } */ 79 80 .wpfund-product-page-timer-wrap .wpfound_countdown_wrap { 81 margin: 15px 0; 82 } 83 84 .wpfund-product-page-timer-wrap p { 85 margin-bottom: 12px; 86 87 } 88 89 .wpfund-product-page-timer-wrap { 90 text-align: center; 91 padding: 15px 0; 92 93 } 94 95 .wpfund-product-page-timer-wrap .woo-sctr-progress-bar-message { 96 font-size: 15px; 97 margin-top: 2px; 98 } -
wpf-product-countdown-timer/trunk/readme.txt
r2936118 r2939992 3 3 Donate link: https://github.com/ariful93/wpf-product-countdown-timer 4 4 Tags: woocommerce, products, sales, countdown, timer 5 Requires at least: 6.16 Tested up to: 5.87 WC requires at least: 7.8.18 WC tested up to: 5.5.29 Requires PHP: 7. 410 Stable tag: 1.1. 35 Requires at least: 5.4 6 Tested up to: 6.2.2 7 WC requires at least: 5.0.0 8 WC tested up to: 7.8.0 9 Requires PHP: 7.2 10 Stable tag: 1.1.4 11 11 License: GPLv2 or later 12 12 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 24 24 * Choose the time and date from the visual calendar 25 25 * Allow setting separate time & date range 26 * Enable/disable pro gress bar26 * Enable/disable product sold progress bar 27 27 * Add progress bar of the product sold in single page 28 * Add product sold progress product archive page 29 * Add countdown timer product archive page 28 30 29 31 == Installation == … … 40 42 3. Timer Settings 41 43 4. Frontend Veiw 44 4. Frontend Product Archive Veiw 42 45 43 46 -
wpf-product-countdown-timer/trunk/wpf-product-countdown-timer.php
r2936131 r2939992 6 6 * Author: WPFound 7 7 * Author URI https://github.com/ariful93 8 * Version: 1.1. 38 * Version: 1.1.4 9 9 * License: GPL v2 or later 10 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 88 88 add_action( 'woocommerce_process_product_meta', [ $this, 'wpfpct_countdown_timer_save_fields' ] ); 89 89 add_action( 'woocommerce_single_product_summary', [ $this, 'wpfpct_display_countdown_timer' ], 20); 90 add_action( 'wp_enqueue_scripts', array( $this, 'wpfpct_load_enqueue' ) ); 90 add_action( 'woocommerce_after_shop_loop_item', [ $this, 'wpfpct_product_shop_loop_timer' ] ); 91 add_action( 'wp_enqueue_scripts', [ $this, 'wpfpct_load_enqueue' ] ); 91 92 92 93 } … … 178 179 } 179 180 181 public function wpfpct_product_shop_loop_timer() { 182 global $product; 183 184 $wpfound_date_range = $product->get_meta( 'wpfound_date_range', true ); 185 $wpfound_date_time = $product->get_meta( 'wpfound_date_time', true ); 186 $wpfound_timer_heading_text = $product->get_meta( 'wpfound_timer_heading_text', true ); 187 $wpfound_enable_timer = $product->get_meta( 'wpfound_enable_timer', true ); 188 $wpfound_enable_progress_bar = $product->get_meta( 'wpfound_enable_progress_bar', true ); 189 190 $total_sold = $product->get_total_sales(); 191 $total_stock = $product->get_stock_quantity(); 192 193 if ( $total_stock > 0 ) { 194 $sold_percentage = $total_sold / $total_stock * 100; 195 } 196 197 ?> 198 <?php if ( 'yes' === $wpfound_enable_timer && ! empty( $wpfound_date_range ) ) { 199 ?> 200 201 <div class="wpfund-product-page-timer-wrap"> 202 203 <p><?php echo esc_html( $wpfound_timer_heading_text ); ?></p> 204 205 <div class="wpfound_shop_page_timer" data-date-range="<?php echo esc_attr( $wpfound_date_range .' '. $wpfound_date_time ); ?>"></div> 206 207 <?php if ( 'yes' === $wpfound_enable_progress_bar ) { ?> 208 <div class="wpf-product-progress-bar-container"> 209 <div class="wpf-product-progress-bar-wrap"> 210 <div class="wpf-product-progress-bar-fill" style="width:<?php echo floor( $sold_percentage ); ?>%"></div> 211 </div> 212 <div class="woo-sctr-progress-bar-message"><?php echo $total_sold . '/' . $total_stock; ?> sold</div> 213 214 </div> 215 <?php } ?> 216 </div> 217 <?php 218 } ?> 219 220 <?php 221 222 } 223 224 180 225 /** 181 226 * Display Data Showing Function … … 203 248 <?php if ( 'yes' === $wpfound_enable_timer && ! empty( $wpfound_date_range ) ) { 204 249 ?> 205 < p id="wpfound_view_timer"></p>250 <div id="wpfound_view_timer"></div> 206 251 <?php if ( 'yes' === $wpfound_enable_progress_bar && $total_stock !== NULL ) { ?> 207 252 <div class="wpf-product-progress-bar-container"> … … 214 259 <?php } ?> 215 260 216 217 218 261 <script> 219 262 window.onload = () => { … … 233 276 getTimerViewId.innerHTML = 234 277 `<div class="wpfound_countdown_wrap"> 235 <p ><?php echo esc_html( $wpfound_timer_heading_text ); ?></p>278 <p class="offer-title""><?php echo esc_html( $wpfound_timer_heading_text ); ?></p> 236 279 237 280 <div class="wpfound_countdown_timer"> … … 279 322 280 323 wp_enqueue_style( 'wpfound-countdown-timer-style', WPFPCT_ASSETS . '/css/style.css' ); 324 325 wp_enqueue_script( 'wpfound-campaign-timer-script', WPFPCT_ASSETS . '/js/campaign-timer.js', array('jquery'), '1.0', true ); 281 326 282 327 }
Note: See TracChangeset
for help on using the changeset viewer.