Changeset 2475943
- Timestamp:
- 02/16/2021 10:38:26 PM (5 years ago)
- Location:
- wb-product-enquiry/trunk
- Files:
-
- 5 edited
-
assets/css/wb_product_enquiry_admin.css (modified) (1 diff)
-
includes/wb-product-enquiry-admin.php (modified) (4 diffs)
-
includes/wb-product-enquiry-general.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
wb-product-enquiry.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wb-product-enquiry/trunk/assets/css/wb_product_enquiry_admin.css
r2475938 r2475943 13 13 .wbEnquiriesSingleDay{ 14 14 margin: 1em .5em; 15 background: # ddd;15 background: #b4e7ff; 16 16 padding: 0px 3px 3px 3px; 17 color: # 888;17 color: #fff; 18 18 font-size: .9em; 19 height:500px; 20 padding-top:50px; 21 position: relative; 22 min-width: 70px; 23 transition: all .2s ease-in-out; 19 24 } 25 .wbEnquiriesStats { 26 position: absolute; 27 width: 100%; 28 text-align: center; 29 left: 0; 30 bottom: 0; 31 line-height: 2; 32 } 33 .wbEnquiriesStats span{ 34 font-weight:900; 35 } 36 .wbEnquiriesSingleDay:hover { 37 background: #036898; 38 } -
wb-product-enquiry/trunk/includes/wb-product-enquiry-admin.php
r2475936 r2475943 339 339 wp_enqueue_style('wb_product_enquiry_admin_styles'); 340 340 $dashboardOutput = " <div class='postbox' style='padding-left:1em;margin-top:.5em'> 341 342 <h3>Product Enquiry Dashboard</h3> 341 343 <div class='wbEnquiriesSidebar' > 342 <h3>Product Enquiry Dashboard</h3>343 344 <p style='display:none;'>Enquiries today:</p> 344 345 <p style='display:none;'>Last 7 days today:</p> … … 354 355 } 355 356 $wb_enquiries_days = array_reverse ($wb_enquiries_days); 356 357 $maximumEnquiriesPerDay = 0; 358 359 360 // Count maximum for chart 357 361 foreach($wb_enquiries_days as $oneDay){ 358 362 … … 371 375 $query = new WP_Query( $args ); 372 376 373 $dashboardOutput.="<div class='wbEnquiriesSingleDay' style='padding-top:".$query->post_count."em'> ".$oneDay." </div>"; 377 if($maximumEnquiriesPerDay<$query->post_count){ 378 $maximumEnquiriesPerDay = $query->post_count; 374 379 } 380 } 381 // Count maximum for chart 382 383 foreach($wb_enquiries_days as $oneDay){ 384 385 $oneDaySplit = explode('/', $oneDay); 386 $args = array( 387 'post_type' => 'wb-enquiries', 388 'date_query' => array( 389 array( 390 'year' => $oneDaySplit[0], 391 'month' => $oneDaySplit[1], 392 'day' => $oneDaySplit[2], 393 ), 394 'inclusive' => true 395 ) 396 ); 397 $query = new WP_Query( $args ); 398 399 400 $dashboardOutput.="<div class='wbEnquiriesSingleDay' style='height:".(($query->post_count/$maximumEnquiriesPerDay)*100)."%'><div class='wbEnquiriesStats'> <span style='display:block;text-align:center'>(".$query->post_count.")</span>".$oneDay." </div></div>";} 375 401 376 402 … … 445 471 /*************************************************************************** END Bulk Export Enquiries **************************************************************************/ 446 472 473 474 475 447 476 ?> -
wb-product-enquiry/trunk/includes/wb-product-enquiry-general.php
r2475940 r2475943 60 60 function wb_product_enquiry_single_admin_display_callback( $post ) { 61 61 62 $enquiry_object = get_post( $enquiry_id);63 $enquiry_data = get_post_meta( $enquiry_id, 'wb_product_enquiry')[0];62 $enquiry_object = get_post(get_the_ID()); 63 $enquiry_data = get_post_meta(get_the_ID(), 'wb_product_enquiry')[0]; 64 64 65 65 … … 75 75 echo "<b>Date:</b><br/>"; 76 76 echo $enquiry_object->post_date; 77 echo "<b >Product name:</b><br/>";77 echo "<br/><b>Product name:</b><br/>"; 78 78 echo $product_name; 79 echo "<b >Customer:</b><br/>";79 echo "<br/><b>Customer:</b><br/>"; 80 80 echo $name; 81 echo "<b >Email Address:</b><br/>";81 echo "<br/><b>Email Address:</b><br/>"; 82 82 echo $email; 83 echo "<b >Phone number:</b><br/>";83 echo "<br/><b>Phone number:</b><br/>"; 84 84 echo $phone; 85 echo "<b >Postcode:</b><br/>";85 echo "<br/><b>Postcode:</b><br/>"; 86 86 echo $postcode; 87 echo "<b >Message:</b><br/>";87 echo "<br/><b>Message:</b><br/>"; 88 88 echo $message; 89 89 } -
wb-product-enquiry/trunk/readme.txt
r2475940 r2475943 65 65 * TWEAK : Enquiry admin single page brings up enquiry details. (Added metabox) 66 66 67 = 1.25 = 68 *TWEAK : Charts styling improvements 69 67 70 68 71 == Upgrade Notice == … … 83 86 Bug fixes 84 87 88 = 1.25 = 89 Charts styling improvements 90 85 91 86 92 -
wb-product-enquiry/trunk/wb-product-enquiry.php
r2475940 r2475943 3 3 * Plugin Name: WB Product Enquiry 4 4 * Description: Turn your WooCommerce store into a beautiful catalog. Let your customers quickly ask about products they like using enquiry forms on products! 5 * Version: 1.2 25 * Version: 1.25 6 6 * Author: Wojciech Borowicz 7 7 * Author URI: https://borowicz.me
Note: See TracChangeset
for help on using the changeset viewer.