@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
| 1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
| 2 | + exit; |
|
| 3 | +} |
|
| 2 | 4 | ?> |
| 3 | 5 | <div class="wrap wps_statistics"> |
| 4 | 6 | <h2><span class="dashicons dashicons-chart-area" style="font-size : 30px; width : 30px; height : 30px"></span> <?php _e( 'WPShop Statistics', 'wpshop' )?></h2> |
@@ -31,6 +31,9 @@ |
||
| 31 | 31 | </div> |
| 32 | 32 | <?php endforeach; ?> |
| 33 | 33 | </div> |
| 34 | -<?php else : ?> |
|
| 35 | -<div class="wps-alert-info"><?php _e( 'No orders have been placed for the moment', 'wpshop'); ?></div> |
|
| 34 | +<?php else { |
|
| 35 | + : ?> |
|
| 36 | +<div class="wps-alert-info"><?php _e( 'No orders have been placed for the moment', 'wpshop'); |
|
| 37 | +} |
|
| 38 | +?></div> |
|
| 36 | 39 | <?php endif; ?> |
@@ -48,8 +48,11 @@ |
||
| 48 | 48 | <?php if ( null !== $orders ) : ?> |
| 49 | 49 | <div class="wps-table-cell"><?php echo esc_html( count( $orders ) ); ?></div> |
| 50 | 50 | <div class="wps-table-cell"><?php echo esc_html( number_format( $orders_total_amount, 2, '.', '' ) . ' ' . wpshop_tools::wpshop_get_currency( false ) ); ?></div> |
| 51 | - <?php else : ?> |
|
| 52 | - <div class="wps-table-cell"><?php esc_html_e( 'No orders have been placed for the moment', 'wpshop' ); ?></div> |
|
| 51 | + <?php else { |
|
| 52 | + : ?> |
|
| 53 | + <div class="wps-table-cell"><?php esc_html_e( 'No orders have been placed for the moment', 'wpshop' ); |
|
| 54 | +} |
|
| 55 | +?></div> |
|
| 53 | 56 | <div class="wps-table-cell"> </div> |
| 54 | 57 | <?php endif; ?> |
| 55 | 58 | <div class="wps-table-cell"><?php echo esc_html( $user_subscription_number->get_total() ); ?></div> |
@@ -31,6 +31,9 @@ |
||
| 31 | 31 | </div> |
| 32 | 32 | <?php endforeach; ?> |
| 33 | 33 | </div> |
| 34 | -<?php else : ?> |
|
| 35 | -<div class="wps-alert-info"><?php _e( 'No orders have been placed for the moment', 'wpshop'); ?></div> |
|
| 34 | +<?php else { |
|
| 35 | + : ?> |
|
| 36 | +<div class="wps-alert-info"><?php _e( 'No orders have been placed for the moment', 'wpshop'); |
|
| 37 | +} |
|
| 38 | +?></div> |
|
| 36 | 39 | <?php endif; ?> |
@@ -34,6 +34,9 @@ |
||
| 34 | 34 | </div> |
| 35 | 35 | <?php endforeach; ?> |
| 36 | 36 | </div> |
| 37 | -<?php else : ?> |
|
| 38 | -<div class="wps-alert-info"><?php _e( 'No orders have been placed for the moment', 'wpshop'); ?></div> |
|
| 37 | +<?php else { |
|
| 38 | + : ?> |
|
| 39 | +<div class="wps-alert-info"><?php _e( 'No orders have been placed for the moment', 'wpshop'); |
|
| 40 | +} |
|
| 41 | +?></div> |
|
| 39 | 42 | <?php endif; ?> |
@@ -73,8 +73,10 @@ |
||
| 73 | 73 | if ( true === $order_duration_state['status'] ) : |
| 74 | 74 | $text_color = 'red'; |
| 75 | 75 | $icon = 'dashicons-warning'; |
| 76 | - else: |
|
| 77 | - $text_color = 'green'; |
|
| 76 | + else { |
|
| 77 | + : |
|
| 78 | + $text_color = 'green'; |
|
| 79 | + } |
|
| 78 | 80 | $icon = 'dashicons-yes'; |
| 79 | 81 | endif; |
| 80 | 82 | ?> |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
| 1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
| 2 | + exit; |
|
| 3 | +} |
|
| 2 | 4 | $products = $this->wps_stats_mdl->wps_most_viewed_products_datas( $main_stats_count ); |
| 3 | 5 | if ( !empty( $products ) ) : |
| 4 | 6 | ?> |
@@ -8,8 +10,10 @@ discard block |
||
| 8 | 10 | $product_type = get_post_type( $product->post_id ); |
| 9 | 11 | if ( $product_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT ) : |
| 10 | 12 | $product_name = get_the_title( $product->post_id ); |
| 11 | - else : |
|
| 13 | + else { |
|
| 14 | + : |
|
| 12 | 15 | $parent_def = wpshop_products::get_parent_variation( $product->post_id ); |
| 16 | + } |
|
| 13 | 17 | if ( !empty($parent_def) && !empty($parent_def['parent_post']) ) : |
| 14 | 18 | $parent_post = $parent_def['parent_post']; |
| 15 | 19 | $product_name = $parent_post->post_title; |
@@ -22,6 +26,9 @@ discard block |
||
| 22 | 26 | </div> |
| 23 | 27 | <?php endforeach; ?> |
| 24 | 28 | </div> |
| 25 | -<?php else : ?> |
|
| 26 | -<div class="wps-alert-info"><?php _e( 'No product have been seen', 'wpshop'); ?></div> |
|
| 29 | +<?php else { |
|
| 30 | + : ?> |
|
| 31 | +<div class="wps-alert-info"><?php _e( 'No product have been seen', 'wpshop'); |
|
| 32 | +} |
|
| 33 | +?></div> |
|
| 27 | 34 | <?php endif; ?> |
@@ -24,6 +24,9 @@ |
||
| 24 | 24 | </div> |
| 25 | 25 | <?php endforeach; ?> |
| 26 | 26 | </div> |
| 27 | -<?php else : ?> |
|
| 28 | -<div class="wps-alert-info"><?php _e( 'No orders have been placed for the moment', 'wpshop'); ?></div> |
|
| 27 | +<?php else { |
|
| 28 | + : ?> |
|
| 29 | +<div class="wps-alert-info"><?php _e( 'No orders have been placed for the moment', 'wpshop'); |
|
| 30 | +} |
|
| 31 | +?></div> |
|
| 29 | 32 | <?php endif; ?> |
@@ -40,8 +40,11 @@ |
||
| 40 | 40 | <div class="wps-table-cell"><?php echo esc_html( count( $order_list ) ); ?></div> |
| 41 | 41 | <div class="wps-table-cell"><?php echo esc_html( number_format( $orders_total_amount, 2, '.', '' ) . ' ' . wpshop_tools::wpshop_get_currency( false ) ); ?></div> |
| 42 | 42 | <div class="wps-table-cell"><?php echo esc_html( number_format( $orders_total_shipping_cost, 2, '.', '' ) . ' ' . wpshop_tools::wpshop_get_currency( false ) ); ?></div> |
| 43 | - <?php else : ?> |
|
| 44 | - <div class="wps-table-cell"><?php esc_html_e( 'No orders have been placed for the moment', 'wpshop' ); ?></div> |
|
| 43 | + <?php else { |
|
| 44 | + : ?> |
|
| 45 | + <div class="wps-table-cell"><?php esc_html_e( 'No orders have been placed for the moment', 'wpshop' ); |
|
| 46 | +} |
|
| 47 | +?></div> |
|
| 45 | 48 | <div class="wps-table-cell"> </div> |
| 46 | 49 | <?php endif; ?> |
| 47 | 50 | <div class="wps-table-cell"><?php echo esc_html( $user_subscription_number->get_total() ); ?></div> |