@@ -1,16 +1,16 @@ discard block |
||
| 1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
| 1 | +<?php if (!defined('ABSPATH')) exit; |
|
| 2 | 2 | ?> |
| 3 | 3 | <div class="wrap wpshopMainWrap" > |
| 4 | 4 | <div id="wpshopLoadingPicture" class="wpshopHide" ><img src="<?php echo WPSHOP_LOADING_ICON; ?>" alt="loading picture" class="wpshopPageMessage_Icon" /></div> |
| 5 | - <div id="wpshopMessage" class="fade below-h2 wpshopPageMessage <?php echo ( !empty( $actionInformationMessage ) ? 'wpshopPageMessage_Updated' : ''); ?>" ><?php !empty( $actionInformationMessage ) ? _e( $actionInformationMessage, 'wpshop' ) : ''; ?></div> |
|
| 5 | + <div id="wpshopMessage" class="fade below-h2 wpshopPageMessage <?php echo (!empty($actionInformationMessage) ? 'wpshopPageMessage_Updated' : ''); ?>" ><?php !empty($actionInformationMessage) ? _e($actionInformationMessage, 'wpshop') : ''; ?></div> |
|
| 6 | 6 | |
| 7 | 7 | <div class="pageTitle" id="pageTitleContainer" > |
| 8 | - <h2 ><?php _e( 'Shop dashboard', 'wpshop'); ?></h2> |
|
| 8 | + <h2 ><?php _e('Shop dashboard', 'wpshop'); ?></h2> |
|
| 9 | 9 | </div> |
| 10 | 10 | <div id="champsCaches" class="wpshop_cls wpshopHide" ></div> |
| 11 | 11 | <div class="wpshop_cls" id="wpshopMainContent" > |
| 12 | 12 | |
| 13 | - <?php apply_filters( 'wps-dashboard-notice', '' ); ?> |
|
| 13 | + <?php apply_filters('wps-dashboard-notice', ''); ?> |
|
| 14 | 14 | |
| 15 | 15 | <div id="wpshop_dashboard"> |
| 16 | 16 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | <td class="first b"><a href="edit.php?post_type=<?php echo WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT; ?>"><?php |
| 32 | 32 | $num_posts = wp_count_posts(WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT); |
| 33 | - $number_of_products = number_format_i18n( $num_posts->publish ); |
|
| 33 | + $number_of_products = number_format_i18n($num_posts->publish); |
|
| 34 | 34 | echo $number_of_products; |
| 35 | 35 | ?></a></td> |
| 36 | 36 | <td class="t"><a href="edit.php?post_type=<?php echo WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT; ?>"><?php _e('Products', 'wpshop'); ?></a></td> |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | </tr> |
| 47 | 47 | <tr> |
| 48 | 48 | <?php |
| 49 | - $query = $wpdb->prepare( "SELECT COUNT( DISTINCT us.ID ) FROM {$wpdb->users} us JOIN {$wpdb->posts} ON us.ID = post_author AND post_type = %s", WPSHOP_NEWTYPE_IDENTIFIER_ORDER ); |
|
| 49 | + $query = $wpdb->prepare("SELECT COUNT( DISTINCT us.ID ) FROM {$wpdb->users} us JOIN {$wpdb->posts} ON us.ID = post_author AND post_type = %s", WPSHOP_NEWTYPE_IDENTIFIER_ORDER); |
|
| 50 | 50 | $result = $wpdb->get_var($query); |
| 51 | 51 | ?> |
| 52 | 52 | <td class="first b"><a href="users.php"><?php echo $result; ?></a></td> |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | if ($orders) { |
| 77 | 77 | foreach ($orders as $o) { |
| 78 | 78 | $order = get_post_meta($o->ID, '_order_postmeta', true); |
| 79 | - if(!empty($order['order_status'])){ |
|
| 80 | - switch($order['order_status']) { |
|
| 79 | + if (!empty($order['order_status'])) { |
|
| 80 | + switch ($order['order_status']) { |
|
| 81 | 81 | case 'completed': $order_completed++; break; |
| 82 | 82 | case 'shipped': $order_shipped++; break; |
| 83 | 83 | case 'awaiting_payment': $order_awaiting_payment++; break; |
@@ -136,11 +136,11 @@ discard block |
||
| 136 | 136 | <h3 class="hndle"><span class="dashicons dashicons-performance"></span> <span><?php _e('Quick Links', 'wpshop') ?></span></h3> |
| 137 | 137 | <div class="inside"> |
| 138 | 138 | <div class="wps-gridwrapper5-padded wpshop-gridwrapper-quick-link"> |
| 139 | - <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url( 'post-new.php?post_type=wpshop_product' ); ?>"><span class="dashicons dashicons-archive"></span></a></div><center><a href="<?php echo admin_url( 'post-new.php?post_type=wpshop_product' ); ?>"><?php _e( 'Create a new product', 'wpshop'); ?></a></center></div> |
|
| 140 | - <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url( 'post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER ); ?>"><span class="dashicons dashicons-cart"></span></a></div><center><a href="<?php echo admin_url( 'post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER ); ?>"><?php _e( 'Create order', 'wpshop'); ?></a></center></div> |
|
| 141 | - <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url( 'post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS ); ?>"><span class="dashicons dashicons-businessman"></span></a></div><center><a href="<?php echo admin_url( 'post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS ); ?>"><?php _e( 'Create a customer', 'wpshop'); ?></a></center></div> |
|
| 142 | - <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url( 'admin.php?page=wpshop_statistics' ); ?>"><span class="dashicons dashicons-chart-line"></span></a></div><center><a href="<?php echo admin_url( 'admin.php?page=wpshop_statistics' ); ?>"><?php _e( 'Statistics', 'wpshop'); ?></a></center></div> |
|
| 143 | - <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url( 'options-general.php?page=wpshop_option#wpshop_display_option' ); ?>"><span class="dashicons dashicons-admin-appearance"></span></a></div><center><a href="<?php echo admin_url( 'options-general.php?page=wpshop_option' ); ?>"><?php _e( 'Customize your shop', 'wpshop'); ?></a></center></div> |
|
| 139 | + <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url('post-new.php?post_type=wpshop_product'); ?>"><span class="dashicons dashicons-archive"></span></a></div><center><a href="<?php echo admin_url('post-new.php?post_type=wpshop_product'); ?>"><?php _e('Create a new product', 'wpshop'); ?></a></center></div> |
|
| 140 | + <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url('post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER); ?>"><span class="dashicons dashicons-cart"></span></a></div><center><a href="<?php echo admin_url('post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER); ?>"><?php _e('Create order', 'wpshop'); ?></a></center></div> |
|
| 141 | + <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url('post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS); ?>"><span class="dashicons dashicons-businessman"></span></a></div><center><a href="<?php echo admin_url('post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS); ?>"><?php _e('Create a customer', 'wpshop'); ?></a></center></div> |
|
| 142 | + <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url('admin.php?page=wpshop_statistics'); ?>"><span class="dashicons dashicons-chart-line"></span></a></div><center><a href="<?php echo admin_url('admin.php?page=wpshop_statistics'); ?>"><?php _e('Statistics', 'wpshop'); ?></a></center></div> |
|
| 143 | + <div><div class="wps_quick_link_icon"><a href="<?php echo admin_url('options-general.php?page=wpshop_option#wpshop_display_option'); ?>"><span class="dashicons dashicons-admin-appearance"></span></a></div><center><a href="<?php echo admin_url('options-general.php?page=wpshop_option'); ?>"><?php _e('Customize your shop', 'wpshop'); ?></a></center></div> |
|
| 144 | 144 | </div> |
| 145 | 145 | </div> |
| 146 | 146 | </div><!-- postbox end --> |
@@ -155,36 +155,36 @@ discard block |
||
| 155 | 155 | <div class="wps-table-header wps-table-row"> |
| 156 | 156 | <div class="wps-table-cell"><?php _e('Number of users', 'wpshop'); ?></div> |
| 157 | 157 | <div class="wps-table-cell"><?php $result = count(get_users()); echo $result; ?></div> |
| 158 | - <div class="wps-table-cell"><?php echo ( !empty($result) ) ? '<a href="' . admin_url(). 'admin.php?page=wpshop_dashboard&download_users=users_all" role="button" id="download_all_users_contacts" class="wps-bton-first-rounded">' .__( 'Download the list', 'wpshop' ). '</a>' : ''; ?></div> |
|
| 158 | + <div class="wps-table-cell"><?php echo (!empty($result)) ? '<a href="' . admin_url() . 'admin.php?page=wpshop_dashboard&download_users=users_all" role="button" id="download_all_users_contacts" class="wps-bton-first-rounded">' . __('Download the list', 'wpshop') . '</a>' : ''; ?></div> |
|
| 159 | 159 | </div> |
| 160 | 160 | |
| 161 | 161 | |
| 162 | 162 | |
| 163 | 163 | <div class="wps-table-header wps-table-row"> |
| 164 | 164 | <?php |
| 165 | - $query = $wpdb->prepare( "SELECT COUNT( DISTINCT user_id ) FROM {$wpdb->usermeta} JOIN {$wpdb->posts} ON post_author = user_id AND post_type = %s WHERE meta_key = %s AND ( meta_value LIKE ('%%%s%%') || meta_value LIKE ('%%%s%%') )", WPSHOP_NEWTYPE_IDENTIFIER_ORDER, 'user_preferences', 's:16:"newsletters_site";i:1;', 's:16:"newsletters_site";b:1;' ); |
|
| 165 | + $query = $wpdb->prepare("SELECT COUNT( DISTINCT user_id ) FROM {$wpdb->usermeta} JOIN {$wpdb->posts} ON post_author = user_id AND post_type = %s WHERE meta_key = %s AND ( meta_value LIKE ('%%%s%%') || meta_value LIKE ('%%%s%%') )", WPSHOP_NEWTYPE_IDENTIFIER_ORDER, 'user_preferences', 's:16:"newsletters_site";i:1;', 's:16:"newsletters_site";b:1;'); |
|
| 166 | 166 | $nbcustomers_site = $wpdb->get_var($query); |
| 167 | 167 | ?> |
| 168 | 168 | <div class="wps-table-cell"><?php _e('Number of customers who wants to receive shop newsletters', 'wpshop'); ?></div> |
| 169 | 169 | <div class="wps-table-cell"><?php echo $nbcustomers_site; ?></div> |
| 170 | - <div class="wps-table-cell"><?php echo ( !empty($nbcustomers_site) ) ? '<a href="' . admin_url(). 'admin.php?page=wpshop_dashboard&download_users=newsletters_site" role="button" id="download_newsletter_contacts" class="wps-bton-first-rounded">' .__( 'Download the list', 'wpshop' ). '</a>' : ''; ?></div> |
|
| 170 | + <div class="wps-table-cell"><?php echo (!empty($nbcustomers_site)) ? '<a href="' . admin_url() . 'admin.php?page=wpshop_dashboard&download_users=newsletters_site" role="button" id="download_newsletter_contacts" class="wps-bton-first-rounded">' . __('Download the list', 'wpshop') . '</a>' : ''; ?></div> |
|
| 171 | 171 | </div> |
| 172 | 172 | |
| 173 | 173 | <div class="wps-table-header wps-table-row"> |
| 174 | 174 | <?php |
| 175 | - $query = $wpdb->prepare( "SELECT COUNT( DISTINCT user_id ) FROM {$wpdb->usermeta} JOIN {$wpdb->posts} ON post_author = user_id AND post_type = %s WHERE meta_key = %s AND ( meta_value LIKE ('%%%s%%') || meta_value LIKE ('%%%s%%') )", WPSHOP_NEWTYPE_IDENTIFIER_ORDER, 'user_preferences', 's:25:"newsletters_site_partners";i:1;', 's:25:"newsletters_site_partners";b:1;' ); |
|
| 175 | + $query = $wpdb->prepare("SELECT COUNT( DISTINCT user_id ) FROM {$wpdb->usermeta} JOIN {$wpdb->posts} ON post_author = user_id AND post_type = %s WHERE meta_key = %s AND ( meta_value LIKE ('%%%s%%') || meta_value LIKE ('%%%s%%') )", WPSHOP_NEWTYPE_IDENTIFIER_ORDER, 'user_preferences', 's:25:"newsletters_site_partners";i:1;', 's:25:"newsletters_site_partners";b:1;'); |
|
| 176 | 176 | $nbcustomers_site_partners = $wpdb->get_var($query); |
| 177 | 177 | ?> |
| 178 | 178 | <div class="wps-table-cell"><?php _e('Number of customers who wants to receive partners newsletters', 'wpshop'); ?></div> |
| 179 | 179 | <div class="wps-table-cell"><?php echo $nbcustomers_site_partners; ?></div> |
| 180 | - <div class="wps-table-cell"><?php echo ( !empty($nbcustomers_site_partners) ) ? '<a href="' . admin_url(). 'admin.php?page=wpshop_dashboard&download_users=newsletters_site_partners" role="button" id="download_newsletter_partners_contacts" class="wps-bton-first-rounded">' .__( 'Download the list', 'wpshop' ). '</a>' : ''; ?></div> |
|
| 180 | + <div class="wps-table-cell"><?php echo (!empty($nbcustomers_site_partners)) ? '<a href="' . admin_url() . 'admin.php?page=wpshop_dashboard&download_users=newsletters_site_partners" role="button" id="download_newsletter_partners_contacts" class="wps-bton-first-rounded">' . __('Download the list', 'wpshop') . '</a>' : ''; ?></div> |
|
| 181 | 181 | </div> |
| 182 | 182 | </div> |
| 183 | 183 | </div> |
| 184 | 184 | </div><!-- postbox end --> |
| 185 | 185 | |
| 186 | 186 | <?php |
| 187 | - if( class_exists('wps_export_ctr') ) { |
|
| 187 | + if (class_exists('wps_export_ctr')) { |
|
| 188 | 188 | $wps_export = new wps_export_ctr(); |
| 189 | 189 | $wps_export->wps_export_tpl(); |
| 190 | 190 | } |
@@ -206,15 +206,15 @@ discard block |
||
| 206 | 206 | <?php |
| 207 | 207 | global $current_month_offset; |
| 208 | 208 | |
| 209 | - $current_month_offset = (int) date('m'); |
|
| 210 | - $current_month_offset = isset( $_GET['month'] ) ? (int) $_GET['month'] : $current_month_offset; |
|
| 209 | + $current_month_offset = (int)date('m'); |
|
| 210 | + $current_month_offset = isset($_GET['month']) ? (int)$_GET['month'] : $current_month_offset; |
|
| 211 | 211 | ?> |
| 212 | 212 | <div class="postbox stats" id="wpshop-stats"> |
| 213 | 213 | <h3 class="hndle"><span class="dashicons dashicons-chart-area"></span> |
| 214 | - <?php if ($current_month_offset!=date('m')) : ?> |
|
| 215 | - <a href="admin.php?page=wpshop_dashboard&month=<?php echo $current_month_offset+1; ?>" class="next"><?php echo __('Next Month','wpshop'); ?> →</a> |
|
| 214 | + <?php if ($current_month_offset != date('m')) : ?> |
|
| 215 | + <a href="admin.php?page=wpshop_dashboard&month=<?php echo $current_month_offset + 1; ?>" class="next"><?php echo __('Next Month', 'wpshop'); ?> →</a> |
|
| 216 | 216 | <?php endif; ?> |
| 217 | - <a href="admin.php?page=wpshop_dashboard&month=<?php echo $current_month_offset-1; ?>" class="previous">← <?php echo __('Previous Month','wpshop'); ?></a> |
|
| 217 | + <a href="admin.php?page=wpshop_dashboard&month=<?php echo $current_month_offset - 1; ?>" class="previous">← <?php echo __('Previous Month', 'wpshop'); ?></a> |
|
| 218 | 218 | <span><?php _e('Monthly Sales', 'wpshop') ?></span></h3> |
| 219 | 219 | <div class="inside"> |
| 220 | 220 | <div id="placeholder" style="width:100%; height:300px; position:relative;"></div> |
@@ -244,11 +244,11 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | <?php |
| 246 | 246 | |
| 247 | - function orders_this_month( $where = '' ) { |
|
| 247 | + function orders_this_month($where = '') { |
|
| 248 | 248 | global $current_month_offset; |
| 249 | 249 | |
| 250 | 250 | $month = $current_month_offset; |
| 251 | - $year = (int) date('Y'); |
|
| 251 | + $year = (int)date('Y'); |
|
| 252 | 252 | |
| 253 | 253 | $first_day = strtotime("{$year}-{$month}-01"); |
| 254 | 254 | $last_day = strtotime('-1 second', strtotime('+1 month', $first_day)); |
@@ -261,29 +261,29 @@ discard block |
||
| 261 | 261 | |
| 262 | 262 | return $where; |
| 263 | 263 | } |
| 264 | - add_filter( 'posts_where', 'orders_this_month' ); |
|
| 264 | + add_filter('posts_where', 'orders_this_month'); |
|
| 265 | 265 | |
| 266 | 266 | $args = array( |
| 267 | 267 | 'numberposts' => -1, |
| 268 | 268 | 'orderby' => 'post_date', |
| 269 | 269 | 'order' => 'DESC', |
| 270 | 270 | 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_ORDER, |
| 271 | - 'post_status' => 'publish' , |
|
| 271 | + 'post_status' => 'publish', |
|
| 272 | 272 | 'suppress_filters' => false |
| 273 | 273 | ); |
| 274 | - $orders = get_posts( $args ); |
|
| 274 | + $orders = get_posts($args); |
|
| 275 | 275 | |
| 276 | 276 | $order_counts = array(); |
| 277 | 277 | $order_amounts = array(); |
| 278 | 278 | |
| 279 | 279 | // Blank date ranges to begin |
| 280 | 280 | $month = $current_month_offset; |
| 281 | - $year = (int) date('Y'); |
|
| 281 | + $year = (int)date('Y'); |
|
| 282 | 282 | |
| 283 | 283 | $first_day = strtotime("{$year}-{$month}-01"); |
| 284 | 284 | $last_day = strtotime('-1 second', strtotime('+1 month', $first_day)); |
| 285 | 285 | |
| 286 | - if ((date('m') - $current_month_offset)==0) : |
|
| 286 | + if ((date('m') - $current_month_offset) == 0) : |
|
| 287 | 287 | $up_to = date('d', strtotime('NOW')); |
| 288 | 288 | else : |
| 289 | 289 | $up_to = date('d', $last_day); |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | |
| 293 | 293 | while ($count < $up_to) : |
| 294 | 294 | |
| 295 | - $time = strtotime(date('Ymd', strtotime('+ '.$count.' DAY', $first_day))).'000'; |
|
| 295 | + $time = strtotime(date('Ymd', strtotime('+ ' . $count . ' DAY', $first_day))) . '000'; |
|
| 296 | 296 | |
| 297 | 297 | $order_counts[$time] = 0; |
| 298 | 298 | $order_amounts[$time] = 0; |
@@ -305,9 +305,9 @@ discard block |
||
| 305 | 305 | |
| 306 | 306 | $order_data = get_post_meta($order->ID, '_order_postmeta', true); |
| 307 | 307 | |
| 308 | - if ($order_data['order_status']=='denied' || $order_data['order_status']=='awaiting_payment') continue; |
|
| 308 | + if ($order_data['order_status'] == 'denied' || $order_data['order_status'] == 'awaiting_payment') continue; |
|
| 309 | 309 | |
| 310 | - $time = strtotime(date('Ymd', strtotime($order_data['order_date']))).'000'; |
|
| 310 | + $time = strtotime(date('Ymd', strtotime($order_data['order_date']))) . '000'; |
|
| 311 | 311 | |
| 312 | 312 | $order_grand_total = !empty($order_data['order_grand_total']) ? $order_data['order_grand_total'] : 0; |
| 313 | 313 | |
@@ -315,12 +315,12 @@ discard block |
||
| 315 | 315 | else : $order_counts[$time] = 1; endif; |
| 316 | 316 | |
| 317 | 317 | if (isset($order_amounts[$time])) $order_amounts[$time] = $order_amounts[$time] + $order_grand_total; |
| 318 | - else $order_amounts[$time] = (float) $order_grand_total; |
|
| 318 | + else $order_amounts[$time] = (float)$order_grand_total; |
|
| 319 | 319 | |
| 320 | 320 | endforeach; |
| 321 | 321 | endif; |
| 322 | 322 | |
| 323 | - remove_filter( 'posts_where', 'orders_this_month' ); |
|
| 323 | + remove_filter('posts_where', 'orders_this_month'); |
|
| 324 | 324 | ?> |
| 325 | 325 | |
| 326 | 326 | var d = [ |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | |
| 344 | 344 | for (var i = 0; i < d2.length; ++i) d2[i][0] += 60 * 60 * 1000; |
| 345 | 345 | |
| 346 | - var plot = jQuery.plot(jQuery("#placeholder"), [ { label: "<?php echo __('Number of sales','wpshop'); ?>", data: d }, { label: "<?php echo __('Sales amount','wpshop'); ?>", data: d2, yaxis: 2 } ], { |
|
| 346 | + var plot = jQuery.plot(jQuery("#placeholder"), [ { label: "<?php echo __('Number of sales', 'wpshop'); ?>", data: d }, { label: "<?php echo __('Sales amount', 'wpshop'); ?>", data: d2, yaxis: 2 } ], { |
|
| 347 | 347 | series: { |
| 348 | 348 | lines: { show: true }, |
| 349 | 349 | points: { show: true } |
@@ -390,10 +390,10 @@ discard block |
||
| 390 | 390 | |
| 391 | 391 | jQuery("#tooltip").remove(); |
| 392 | 392 | |
| 393 | - if (item.series.label=="<?php echo __('Number of sales','wpshop'); ?>") { |
|
| 393 | + if (item.series.label=="<?php echo __('Number of sales', 'wpshop'); ?>") { |
|
| 394 | 394 | |
| 395 | 395 | var y = item.datapoint[1]; |
| 396 | - showTooltip(item.pageX, item.pageY, y+" <?php echo __('sales','wpshop'); ?>"); |
|
| 396 | + showTooltip(item.pageX, item.pageY, y+" <?php echo __('sales', 'wpshop'); ?>"); |
|
| 397 | 397 | |
| 398 | 398 | } else { |
| 399 | 399 | |
@@ -424,15 +424,15 @@ discard block |
||
| 424 | 424 | <div class="inside"> |
| 425 | 425 | |
| 426 | 426 | <div class="wps-boxed"> |
| 427 | - <span class="wps-h5"><?php _e( 'WPShop is also...', 'wpshop'); ?></span> |
|
| 427 | + <span class="wps-h5"><?php _e('WPShop is also...', 'wpshop'); ?></span> |
|
| 428 | 428 | <div class="wps-gridwrapper4-padded"> |
| 429 | - <div><a href="https://shop.eoxia.com/ecommerce/assistance-personnalisee-wordpress/" target="_blank" title="<?php _e( 'Assistance', 'wpshop'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>assistance_wpshop.jpg" alt="WPSHOP Assistance" /></a><div class="wps-h5"><center><?php _e( 'Assistance', 'wpshop'); ?></center></div><center><?php _e('To assist you in your WPShop Experience', 'wpshop'); ?></center></div> |
|
| 430 | - <div><a href="https://shop.eoxia.com/themes/" target="_blank" title="<?php _e( 'WPSHOP Themes', 'wpshop'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>themes_wpshop.jpg" alt="WPSHOP Themes" /></a><div class="wps-h5"><center><?php _e( 'WPSHOP Themes', 'wpshop'); ?></center></div><center><?php _e('To offer to your customer all WPShop\'s powerful experience', 'wpshop'); ?></center></div> |
|
| 431 | - <div><a href="https://shop.eoxia.com/boutique/wpshop/" target="_blank" title="<?php _e( 'WPSHOP\'s add-ons', 'wpshop'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>modules_wpshop.jpg" alt="WPSHOP Assistance" /></a><div class="wps-h5"><center><?php _e( 'WPSHOP\'s add-ons', 'wpshop'); ?></center></div><center><?php _e('To boost your shop with new functions', 'wpshop'); ?></center></div> |
|
| 432 | - <div><a href="http://forums.eoxia.com" target="_blank" title="<?php _e( 'WPSHOP\'s Forum', 'wpshop'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>forum_wpshop.jpg" alt="Forum Assistance" /></a><div class="wps-h5"><center><?php _e( 'WPSHOP\'s Forum', 'wpshop'); ?></center></div><center><?php _e('To respond at your questions', 'wpshop'); ?></center></div> |
|
| 429 | + <div><a href="https://shop.eoxia.com/ecommerce/assistance-personnalisee-wordpress/" target="_blank" title="<?php _e('Assistance', 'wpshop'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>assistance_wpshop.jpg" alt="WPSHOP Assistance" /></a><div class="wps-h5"><center><?php _e('Assistance', 'wpshop'); ?></center></div><center><?php _e('To assist you in your WPShop Experience', 'wpshop'); ?></center></div> |
|
| 430 | + <div><a href="https://shop.eoxia.com/themes/" target="_blank" title="<?php _e('WPSHOP Themes', 'wpshop'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>themes_wpshop.jpg" alt="WPSHOP Themes" /></a><div class="wps-h5"><center><?php _e('WPSHOP Themes', 'wpshop'); ?></center></div><center><?php _e('To offer to your customer all WPShop\'s powerful experience', 'wpshop'); ?></center></div> |
|
| 431 | + <div><a href="https://shop.eoxia.com/boutique/wpshop/" target="_blank" title="<?php _e('WPSHOP\'s add-ons', 'wpshop'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>modules_wpshop.jpg" alt="WPSHOP Assistance" /></a><div class="wps-h5"><center><?php _e('WPSHOP\'s add-ons', 'wpshop'); ?></center></div><center><?php _e('To boost your shop with new functions', 'wpshop'); ?></center></div> |
|
| 432 | + <div><a href="http://forums.eoxia.com" target="_blank" title="<?php _e('WPSHOP\'s Forum', 'wpshop'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>forum_wpshop.jpg" alt="Forum Assistance" /></a><div class="wps-h5"><center><?php _e('WPSHOP\'s Forum', 'wpshop'); ?></center></div><center><?php _e('To respond at your questions', 'wpshop'); ?></center></div> |
|
| 433 | 433 | </div> |
| 434 | 434 | <br/><br/> |
| 435 | - <span class="wps-h6"><?php _e( 'Be connected', 'wpshop'); ?></span> |
|
| 435 | + <span class="wps-h6"><?php _e('Be connected', 'wpshop'); ?></span> |
|
| 436 | 436 | <div class="wps-gridwrapper2-padded"> |
| 437 | 437 | <div> |
| 438 | 438 | <div class="fb-like" data-href="https://fr-fr.facebook.com/wpshopplugin" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div> |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | </div> |
| 446 | 446 | |
| 447 | 447 | <div class="wps-boxed"> |
| 448 | - <span class="wps-h5"><?php _e( 'WPShop\'s Video Tutorials', 'wpshop')?></span> |
|
| 448 | + <span class="wps-h5"><?php _e('WPShop\'s Video Tutorials', 'wpshop')?></span> |
|
| 449 | 449 | <div><?php $this->wpshop_rss_tutorial_videos(); ?></div> |
| 450 | 450 | </div> |
| 451 | 451 | |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
| 1 | +<?php if (!defined('ABSPATH')) exit; |
|
| 2 | 2 | |
| 3 | 3 | /* Check if file is include. No direct access possible with file url */ |
| 4 | -if ( !defined( 'WPSHOP_VERSION' ) ) { |
|
| 5 | - die( __('Access is not allowed by this way', 'wpshop') ); |
|
| 4 | +if (!defined('WPSHOP_VERSION')) { |
|
| 5 | + die(__('Access is not allowed by this way', 'wpshop')); |
|
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | class wpshop_dashboard { |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | <td class="first b"><a href="edit.php?post_type=<?php echo WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT; ?>"><?php |
| 31 | 31 | $num_posts = wp_count_posts(WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT); |
| 32 | - $number_of_products = number_format_i18n( $num_posts->publish ); |
|
| 32 | + $number_of_products = number_format_i18n($num_posts->publish); |
|
| 33 | 33 | echo $number_of_products; |
| 34 | 34 | ?></a></td> |
| 35 | 35 | <td class="t"><a href="edit.php?post_type=<?php echo WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT; ?>"><?php _e('Products', 'wpshop'); ?></a></td> |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | if ($orders) { |
| 68 | 68 | foreach ($orders as $o) { |
| 69 | 69 | $order = get_post_meta($o->ID, '_order_postmeta', true); |
| 70 | - if(!empty($order['order_status'])){ |
|
| 71 | - switch($order['order_status']) { |
|
| 70 | + if (!empty($order['order_status'])) { |
|
| 71 | + switch ($order['order_status']) { |
|
| 72 | 72 | case 'completed': $order_completed++; break; |
| 73 | 73 | case 'shipped': $order_shipped++; break; |
| 74 | 74 | case 'awaiting_payment': $order_awaiting_payment++; break; |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | <?php |
| 130 | 130 | // New customers |
| 131 | - $query = $wpdb->prepare('SELECT COUNT(*) FROM '.$wpdb->users.' WHERE user_registered > (NOW()-INTERVAL 7 DAY)', ''); |
|
| 131 | + $query = $wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->users . ' WHERE user_registered > (NOW()-INTERVAL 7 DAY)', ''); |
|
| 132 | 132 | $result = $wpdb->get_var($query); |
| 133 | 133 | ?> |
| 134 | 134 | <span class="alignright"><?php echo $result; ?></span> |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | <?php |
| 138 | 138 | // Number of customers who ordered |
| 139 | - $query = $wpdb->prepare('SELECT COUNT(DISTINCT post_author) FROM '.$wpdb->posts.' WHERE post_type="'.WPSHOP_NEWTYPE_IDENTIFIER_ORDER.'"', ''); |
|
| 139 | + $query = $wpdb->prepare('SELECT COUNT(DISTINCT post_author) FROM ' . $wpdb->posts . ' WHERE post_type="' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER . '"', ''); |
|
| 140 | 140 | $result = $wpdb->get_var($query); |
| 141 | 141 | ?> |
| 142 | 142 | <span class="alignright"><?php echo $result; ?></span> |
@@ -147,13 +147,13 @@ discard block |
||
| 147 | 147 | $query = $wpdb->prepare("SELECT user_id, meta_value FROM " . $wpdb->usermeta . " WHERE meta_key = %s", 'user_preferences'); |
| 148 | 148 | $user_preferences = $wpdb->get_results($query); |
| 149 | 149 | $nb_of_customer_for_newsletter = $nb_of_customer_for_newsletter_partners = 0; |
| 150 | - foreach ( $user_preferences as $meta_values ) { |
|
| 151 | - $user_prefs = unserialize( $meta_values->meta_value ); |
|
| 150 | + foreach ($user_preferences as $meta_values) { |
|
| 151 | + $user_prefs = unserialize($meta_values->meta_value); |
|
| 152 | 152 | |
| 153 | - if ( !empty($user_prefs['newsletters_site']) && $user_prefs['newsletters_site'] ) { |
|
| 153 | + if (!empty($user_prefs['newsletters_site']) && $user_prefs['newsletters_site']) { |
|
| 154 | 154 | $nb_of_customer_for_newsletter++; |
| 155 | 155 | } |
| 156 | - else if ( !empty($user_prefs['newsletters_site_partners']) && $user_prefs['newsletters_site_partners'] ) { |
|
| 156 | + else if (!empty($user_prefs['newsletters_site_partners']) && $user_prefs['newsletters_site_partners']) { |
|
| 157 | 157 | $nb_of_customer_for_newsletter_partners++; |
| 158 | 158 | } |
| 159 | 159 | } |
@@ -171,10 +171,10 @@ discard block |
||
| 171 | 171 | <h3 class="hndle"><span><?php _e('Quick Links', 'wpshop') ?></span></h3> |
| 172 | 172 | <div class="inside"> |
| 173 | 173 | <ul id="wps_dashboard_quick_links"> |
| 174 | - <li><a href="<?php echo admin_url( 'post-new.php?post_type=wpshop_product' ); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>icon_create_product.jpg" alt="<?php _e( 'Create a new product', 'wpshop'); ?>" /><br/><?php _e('Create a product', 'wpshop'); ?></a></li> |
|
| 175 | - <li><a href="<?php echo admin_url( 'post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER ); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>icon_create_order.jpg" alt="<?php _e( 'Create order', 'wpshop'); ?>" /><br/><?php _e('Create an order', 'wpshop'); ?></a></li> |
|
| 176 | - <li><a href="<?php echo admin_url( 'post-new.php?post_type=wpshop_shop_coupon' ); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>icon_create_coupon.jpg" alt="<?php _e( 'Create a coupon', 'wpshop'); ?>" /><br/><?php _e('Create a coupon', 'wpshop'); ?></a></li> |
|
| 177 | - <li><a href="<?php echo admin_url( 'admin.php?page=wpshop_statistics' ); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>icon_statistics.jpg" alt="<?php _e( 'Statistics', 'wpshop'); ?>" /><br/><?php _e('Statistics', 'wpshop'); ?></a></li> |
|
| 174 | + <li><a href="<?php echo admin_url('post-new.php?post_type=wpshop_product'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>icon_create_product.jpg" alt="<?php _e('Create a new product', 'wpshop'); ?>" /><br/><?php _e('Create a product', 'wpshop'); ?></a></li> |
|
| 175 | + <li><a href="<?php echo admin_url('post-new.php?post_type=' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>icon_create_order.jpg" alt="<?php _e('Create order', 'wpshop'); ?>" /><br/><?php _e('Create an order', 'wpshop'); ?></a></li> |
|
| 176 | + <li><a href="<?php echo admin_url('post-new.php?post_type=wpshop_shop_coupon'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>icon_create_coupon.jpg" alt="<?php _e('Create a coupon', 'wpshop'); ?>" /><br/><?php _e('Create a coupon', 'wpshop'); ?></a></li> |
|
| 177 | + <li><a href="<?php echo admin_url('admin.php?page=wpshop_statistics'); ?>"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>icon_statistics.jpg" alt="<?php _e('Statistics', 'wpshop'); ?>" /><br/><?php _e('Statistics', 'wpshop'); ?></a></li> |
|
| 178 | 178 | </ul> |
| 179 | 179 | <?php |
| 180 | 180 | // Number of products on sale |
@@ -257,15 +257,15 @@ discard block |
||
| 257 | 257 | <?php |
| 258 | 258 | global $current_month_offset; |
| 259 | 259 | |
| 260 | - $current_month_offset = (isset($_GET['month'])) ? (int) $_GET['month'] : (int) date('m'); |
|
| 260 | + $current_month_offset = (isset($_GET['month'])) ? (int)$_GET['month'] : (int)date('m'); |
|
| 261 | 261 | |
| 262 | 262 | ?> |
| 263 | 263 | <div class="postbox stats" id="wpshop-stats"> |
| 264 | 264 | <h3 class="hndle"> |
| 265 | - <?php if ($current_month_offset!=date('m')) : ?> |
|
| 266 | - <a href="admin.php?page=wpshop_dashboard&month=<?php echo $current_month_offset+1; ?>" class="next"><?php echo __('Next Month','wpshop'); ?> →</a> |
|
| 265 | + <?php if ($current_month_offset != date('m')) : ?> |
|
| 266 | + <a href="admin.php?page=wpshop_dashboard&month=<?php echo $current_month_offset + 1; ?>" class="next"><?php echo __('Next Month', 'wpshop'); ?> →</a> |
|
| 267 | 267 | <?php endif; ?> |
| 268 | - <a href="admin.php?page=wpshop_dashboard&month=<?php echo $current_month_offset-1; ?>" class="previous">← <?php echo __('Previous Month','wpshop'); ?></a> |
|
| 268 | + <a href="admin.php?page=wpshop_dashboard&month=<?php echo $current_month_offset - 1; ?>" class="previous">← <?php echo __('Previous Month', 'wpshop'); ?></a> |
|
| 269 | 269 | <span><?php _e('Monthly Sales', 'wpshop') ?></span></h3> |
| 270 | 270 | <div class="inside"> |
| 271 | 271 | <div id="placeholder" style="width:100%; height:300px; position:relative;"></div> |
@@ -295,11 +295,11 @@ discard block |
||
| 295 | 295 | |
| 296 | 296 | <?php |
| 297 | 297 | |
| 298 | - function orders_this_month( $where = '' ) { |
|
| 298 | + function orders_this_month($where = '') { |
|
| 299 | 299 | global $current_month_offset; |
| 300 | 300 | |
| 301 | 301 | $month = $current_month_offset; |
| 302 | - $year = (int) date('Y'); |
|
| 302 | + $year = (int)date('Y'); |
|
| 303 | 303 | |
| 304 | 304 | $first_day = strtotime("{$year}-{$month}-01"); |
| 305 | 305 | $last_day = strtotime('-1 second', strtotime('+1 month', $first_day)); |
@@ -312,29 +312,29 @@ discard block |
||
| 312 | 312 | |
| 313 | 313 | return $where; |
| 314 | 314 | } |
| 315 | - add_filter( 'posts_where', 'orders_this_month' ); |
|
| 315 | + add_filter('posts_where', 'orders_this_month'); |
|
| 316 | 316 | |
| 317 | 317 | $args = array( |
| 318 | 318 | 'numberposts' => -1, |
| 319 | 319 | 'orderby' => 'post_date', |
| 320 | 320 | 'order' => 'DESC', |
| 321 | 321 | 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_ORDER, |
| 322 | - 'post_status' => 'publish' , |
|
| 322 | + 'post_status' => 'publish', |
|
| 323 | 323 | 'suppress_filters' => false |
| 324 | 324 | ); |
| 325 | - $orders = get_posts( $args ); |
|
| 325 | + $orders = get_posts($args); |
|
| 326 | 326 | |
| 327 | 327 | $order_counts = array(); |
| 328 | 328 | $order_amounts = array(); |
| 329 | 329 | |
| 330 | 330 | // Blank date ranges to begin |
| 331 | 331 | $month = $current_month_offset; |
| 332 | - $year = (int) date('Y'); |
|
| 332 | + $year = (int)date('Y'); |
|
| 333 | 333 | |
| 334 | 334 | $first_day = strtotime("{$year}-{$month}-01"); |
| 335 | 335 | $last_day = strtotime('-1 second', strtotime('+1 month', $first_day)); |
| 336 | 336 | |
| 337 | - if ((date('m') - $current_month_offset)==0) : |
|
| 337 | + if ((date('m') - $current_month_offset) == 0) : |
|
| 338 | 338 | $up_to = date('d', strtotime('NOW')); |
| 339 | 339 | else : |
| 340 | 340 | $up_to = date('d', $last_day); |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | |
| 344 | 344 | while ($count < $up_to) : |
| 345 | 345 | |
| 346 | - $time = strtotime(date('Ymd', strtotime('+ '.$count.' DAY', $first_day))).'000'; |
|
| 346 | + $time = strtotime(date('Ymd', strtotime('+ ' . $count . ' DAY', $first_day))) . '000'; |
|
| 347 | 347 | |
| 348 | 348 | $order_counts[$time] = 0; |
| 349 | 349 | $order_amounts[$time] = 0; |
@@ -356,9 +356,9 @@ discard block |
||
| 356 | 356 | |
| 357 | 357 | $order_data = get_post_meta($order->ID, '_order_postmeta', true); |
| 358 | 358 | |
| 359 | - if ($order_data['order_status']=='denied' || $order_data['order_status']=='awaiting_payment') continue; |
|
| 359 | + if ($order_data['order_status'] == 'denied' || $order_data['order_status'] == 'awaiting_payment') continue; |
|
| 360 | 360 | |
| 361 | - $time = strtotime(date('Ymd', strtotime($order_data['order_date']))).'000'; |
|
| 361 | + $time = strtotime(date('Ymd', strtotime($order_data['order_date']))) . '000'; |
|
| 362 | 362 | |
| 363 | 363 | $order_grand_total = !empty($order_data['order_grand_total']) ? $order_data['order_grand_total'] : 0; |
| 364 | 364 | |
@@ -366,12 +366,12 @@ discard block |
||
| 366 | 366 | else : $order_counts[$time] = 1; endif; |
| 367 | 367 | |
| 368 | 368 | if (isset($order_amounts[$time])) $order_amounts[$time] = $order_amounts[$time] + $order_grand_total; |
| 369 | - else $order_amounts[$time] = (float) $order_grand_total; |
|
| 369 | + else $order_amounts[$time] = (float)$order_grand_total; |
|
| 370 | 370 | |
| 371 | 371 | endforeach; |
| 372 | 372 | endif; |
| 373 | 373 | |
| 374 | - remove_filter( 'posts_where', 'orders_this_month' ); |
|
| 374 | + remove_filter('posts_where', 'orders_this_month'); |
|
| 375 | 375 | ?> |
| 376 | 376 | |
| 377 | 377 | var d = [ |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | |
| 395 | 395 | for (var i = 0; i < d2.length; ++i) d2[i][0] += 60 * 60 * 1000; |
| 396 | 396 | |
| 397 | - var plot = jQuery.plot(jQuery("#placeholder"), [ { label: "<?php echo __('Number of sales','wpshop'); ?>", data: d }, { label: "<?php echo __('Sales amount','wpshop'); ?>", data: d2, yaxis: 2 } ], { |
|
| 397 | + var plot = jQuery.plot(jQuery("#placeholder"), [ { label: "<?php echo __('Number of sales', 'wpshop'); ?>", data: d }, { label: "<?php echo __('Sales amount', 'wpshop'); ?>", data: d2, yaxis: 2 } ], { |
|
| 398 | 398 | series: { |
| 399 | 399 | lines: { show: true }, |
| 400 | 400 | points: { show: true } |
@@ -441,10 +441,10 @@ discard block |
||
| 441 | 441 | |
| 442 | 442 | jQuery("#tooltip").remove(); |
| 443 | 443 | |
| 444 | - if (item.series.label=="<?php echo __('Number of sales','wpshop'); ?>") { |
|
| 444 | + if (item.series.label=="<?php echo __('Number of sales', 'wpshop'); ?>") { |
|
| 445 | 445 | |
| 446 | 446 | var y = item.datapoint[1]; |
| 447 | - showTooltip(item.pageX, item.pageY, y+" <?php echo __('sales','wpshop'); ?>"); |
|
| 447 | + showTooltip(item.pageX, item.pageY, y+" <?php echo __('sales', 'wpshop'); ?>"); |
|
| 448 | 448 | |
| 449 | 449 | } else { |
| 450 | 450 | |
@@ -490,13 +490,13 @@ discard block |
||
| 490 | 490 | <label><?php _e('Number of active order', 'wpshop'); ?></label><br /> |
| 491 | 491 | |
| 492 | 492 | <?php |
| 493 | - $result=0; |
|
| 493 | + $result = 0; |
|
| 494 | 494 | // Number of orders the last 7 days |
| 495 | - $query = $wpdb->prepare('SELECT ID FROM '.$wpdb->posts.' WHERE post_type="'.WPSHOP_NEWTYPE_IDENTIFIER_ORDER.'" AND post_date > (NOW()-INTERVAL 7 DAY)', ''); |
|
| 495 | + $query = $wpdb->prepare('SELECT ID FROM ' . $wpdb->posts . ' WHERE post_type="' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER . '" AND post_date > (NOW()-INTERVAL 7 DAY)', ''); |
|
| 496 | 496 | $data = $wpdb->get_results($query, ARRAY_A); |
| 497 | - foreach($data as $d) { |
|
| 497 | + foreach ($data as $d) { |
|
| 498 | 498 | $postmeta = get_post_meta($d['ID'], '_order_postmeta', true); |
| 499 | - if(!empty($postmeta) && !empty($postmeta['order_key']) && substr($postmeta['order_key'],0,2)=='OR') |
|
| 499 | + if (!empty($postmeta) && !empty($postmeta['order_key']) && substr($postmeta['order_key'], 0, 2) == 'OR') |
|
| 500 | 500 | $result++; |
| 501 | 501 | } |
| 502 | 502 | ?> |
@@ -504,17 +504,17 @@ discard block |
||
| 504 | 504 | <label><?php _e('Number of orders the last 7 days', 'wpshop'); ?></label><br /> |
| 505 | 505 | |
| 506 | 506 | <?php |
| 507 | - $result=0; |
|
| 507 | + $result = 0; |
|
| 508 | 508 | // Number of orders the last 7 days |
| 509 | - $query = $wpdb->prepare('SELECT ID FROM '.$wpdb->posts.' WHERE post_type="'.WPSHOP_NEWTYPE_IDENTIFIER_ORDER.'" AND post_date > (NOW()-INTERVAL 7 DAY)', ''); |
|
| 509 | + $query = $wpdb->prepare('SELECT ID FROM ' . $wpdb->posts . ' WHERE post_type="' . WPSHOP_NEWTYPE_IDENTIFIER_ORDER . '" AND post_date > (NOW()-INTERVAL 7 DAY)', ''); |
|
| 510 | 510 | $data = $wpdb->get_results($query, ARRAY_A); |
| 511 | - foreach($data as $d) { |
|
| 511 | + foreach ($data as $d) { |
|
| 512 | 512 | $postmeta = get_post_meta($d['ID'], '_order_postmeta', true); |
| 513 | - if(!empty($postmeta) && !empty($postmeta['order_grand_total'])) |
|
| 514 | - $result+=$postmeta['order_grand_total']; |
|
| 513 | + if (!empty($postmeta) && !empty($postmeta['order_grand_total'])) |
|
| 514 | + $result += $postmeta['order_grand_total']; |
|
| 515 | 515 | } |
| 516 | - if(count($data)>0) |
|
| 517 | - $result = round($result/count($data),2); |
|
| 516 | + if (count($data) > 0) |
|
| 517 | + $result = round($result / count($data), 2); |
|
| 518 | 518 | ?> |
| 519 | 519 | <span class="alignright"><?php echo wpshop_tools::wpshop_get_currency(); ?> <?php echo $result; ?></span> |
| 520 | 520 | <label><?php _e('Cart price average', 'wpshop'); ?></label> |
@@ -529,9 +529,9 @@ discard block |
||
| 529 | 529 | <table width="100%"> |
| 530 | 530 | <tr> |
| 531 | 531 | <td><?php self::wpshop_rss_tutorial_videos(); ?></td> |
| 532 | - <td valign="top" cellpadding="20" ><h2 class="wps_dashboard"><?php _e('Need help with WPShop', 'wpshop' ); ?> ?</h2> |
|
| 533 | - <p><?php _e( 'You need help with WPShop ? You some questions ?', 'wpshop' ); ?></p> |
|
| 534 | - <p><h3 class="wps_dashboard"><?php _e( 'Two solutions', 'wpshop'); ?></h3></p> |
|
| 532 | + <td valign="top" cellpadding="20" ><h2 class="wps_dashboard"><?php _e('Need help with WPShop', 'wpshop'); ?> ?</h2> |
|
| 533 | + <p><?php _e('You need help with WPShop ? You some questions ?', 'wpshop'); ?></p> |
|
| 534 | + <p><h3 class="wps_dashboard"><?php _e('Two solutions', 'wpshop'); ?></h3></p> |
|
| 535 | 535 | <p><center><br/><a href="https://shop.eoxia.com/ecommerce/assistance-personnalisee-wordpress/" title="<?php _e('WPShop Assistance', 'wpshop'); ?>" target="_blank"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>assistance_wpshop.jpg" alt="<?php _e('WPShop Assistance', 'wpshop'); ?>" /></a><br/> |
| 536 | 536 | <a href="http://forums.eoxia.com/" title="<?php _e('WPShop Forum', 'wpshop'); ?>" target="_blank"><img src="<?php echo WPSHOP_MEDIAS_IMAGES_URL; ?>forum_wpshop.jpg" alt="<?php _e('WPShop Forum', 'wpshop'); ?>" /></a></center></p> |
| 537 | 537 | </td> |
@@ -575,44 +575,44 @@ discard block |
||
| 575 | 575 | |
| 576 | 576 | function wpshop_dashboard_orders() { |
| 577 | 577 | $output = ''; |
| 578 | - $orders = get_posts( array( 'posts_per_page' => 10, 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_ORDER, 'post_status' => 'publish', 'orderby' => 'post_date', 'order' => 'DESC') ); |
|
| 579 | - if ( !empty($orders) ) { |
|
| 580 | - $payment_status = unserialize( WPSHOP_ORDER_STATUS ); |
|
| 578 | + $orders = get_posts(array('posts_per_page' => 10, 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_ORDER, 'post_status' => 'publish', 'orderby' => 'post_date', 'order' => 'DESC')); |
|
| 579 | + if (!empty($orders)) { |
|
| 580 | + $payment_status = unserialize(WPSHOP_ORDER_STATUS); |
|
| 581 | 581 | |
| 582 | 582 | $output .= '<table id="wps_dashboard_orders_summary">'; |
| 583 | - $output .= '<tr><th class="wps_dashboard_order_date">' .__('Date', 'wpshop'). '</th><th class="wps_dashboard_order_customer_name">' .__('Customer', 'wpshop'). '</th><th class="wps_dashboard_order_amount">' .__('Amount', 'wpshop'). '</th><th class="wps_dashboard_order_status">' .__('Status', 'wpshop'). '</th><th class="wps_dashboard_order_actions"></th></tr>'; |
|
| 583 | + $output .= '<tr><th class="wps_dashboard_order_date">' . __('Date', 'wpshop') . '</th><th class="wps_dashboard_order_customer_name">' . __('Customer', 'wpshop') . '</th><th class="wps_dashboard_order_amount">' . __('Amount', 'wpshop') . '</th><th class="wps_dashboard_order_status">' . __('Status', 'wpshop') . '</th><th class="wps_dashboard_order_actions"></th></tr>'; |
|
| 584 | 584 | $stried = false; |
| 585 | - foreach( $orders as $order ) { |
|
| 586 | - $stried = ( $stried == false ) ? true : false; |
|
| 585 | + foreach ($orders as $order) { |
|
| 586 | + $stried = ($stried == false) ? true : false; |
|
| 587 | 587 | $additionnal_class = ($stried) ? 'wps_stried_line' : ''; |
| 588 | - $output .= '<tr class="' .$additionnal_class. '">'; |
|
| 589 | - $order_meta = get_post_meta( $order->ID, '_order_postmeta', true ); |
|
| 590 | - $order_info = get_post_meta( $order->ID, '_order_info', true ); |
|
| 588 | + $output .= '<tr class="' . $additionnal_class . '">'; |
|
| 589 | + $order_meta = get_post_meta($order->ID, '_order_postmeta', true); |
|
| 590 | + $order_info = get_post_meta($order->ID, '_order_info', true); |
|
| 591 | 591 | |
| 592 | - if ( !empty($order_meta) ) { |
|
| 593 | - $output .= '<td>' .( (!empty($order_meta) && !empty($order_meta['order_date']) ) ? date( 'd-m-Y', strtotime($order_meta['order_date']) ): '' ). '</td>'; |
|
| 594 | - $output .= '<td>' .( (!empty($order_info) && !empty($order_info['billing']) && !empty($order_info['billing']['address']) && !empty($order_info['billing']['address']['address_last_name']) && !empty($order_info['billing']['address']['address_first_name']) ) ? strtoupper($order_info['billing']['address']['address_last_name']).' '.$order_info['billing']['address']['address_first_name']: '' ). '</td>'; |
|
| 592 | + if (!empty($order_meta)) { |
|
| 593 | + $output .= '<td>' . ((!empty($order_meta) && !empty($order_meta['order_date'])) ? date('d-m-Y', strtotime($order_meta['order_date'])) : '') . '</td>'; |
|
| 594 | + $output .= '<td>' . ((!empty($order_info) && !empty($order_info['billing']) && !empty($order_info['billing']['address']) && !empty($order_info['billing']['address']['address_last_name']) && !empty($order_info['billing']['address']['address_first_name'])) ? strtoupper($order_info['billing']['address']['address_last_name']) . ' ' . $order_info['billing']['address']['address_first_name'] : '') . '</td>'; |
|
| 595 | 595 | |
| 596 | - $output .= '<td>' .( (!empty($order_meta['order_grand_total']) ) ? number_format( $order_meta['order_grand_total'], 2, '.', '' ).' '.wpshop_tools::wpshop_get_currency( false ) : '-' ). '</td>'; |
|
| 597 | - $output .= '<td><span class="wps_dashboard_' .$order_meta['order_status']. '">' .__($payment_status[ $order_meta['order_status'] ], 'wpshop' ). '</span></td>'; |
|
| 596 | + $output .= '<td>' . ((!empty($order_meta['order_grand_total'])) ? number_format($order_meta['order_grand_total'], 2, '.', '') . ' ' . wpshop_tools::wpshop_get_currency(false) : '-') . '</td>'; |
|
| 597 | + $output .= '<td><span class="wps_dashboard_' . $order_meta['order_status'] . '">' . __($payment_status[$order_meta['order_status']], 'wpshop') . '</span></td>'; |
|
| 598 | 598 | $output .= '<td>'; |
| 599 | - $output .= '<a href="' .admin_url('/post.php?post=' .$order->ID. '&action=edit'). '"><img src="' .WPSHOP_MEDIAS_ICON_URL. 'icon_loupe.png" alt="' .__('See', 'wpshop'). '" /></a>'; |
|
| 599 | + $output .= '<a href="' . admin_url('/post.php?post=' . $order->ID . '&action=edit') . '"><img src="' . WPSHOP_MEDIAS_ICON_URL . 'icon_loupe.png" alt="' . __('See', 'wpshop') . '" /></a>'; |
|
| 600 | 600 | |
| 601 | 601 | $invoice_ref = ''; |
| 602 | - if ( !empty($order_meta['order_invoice_ref']) ) { |
|
| 602 | + if (!empty($order_meta['order_invoice_ref'])) { |
|
| 603 | 603 | $invoice_ref = $order_meta['order_invoice_ref']; |
| 604 | 604 | } |
| 605 | - if ( !empty($invoice_ref) ) { |
|
| 606 | - if( !empty($order_meta) && !empty($order_meta['order_payment']) && !empty($order_meta['order_payment']['received']) ) { |
|
| 607 | - $invoice_ref = $order_meta['order_payment']['received'][ count($order_meta['order_payment']['received']) - 1 ]['invoice_ref']; |
|
| 605 | + if (!empty($invoice_ref)) { |
|
| 606 | + if (!empty($order_meta) && !empty($order_meta['order_payment']) && !empty($order_meta['order_payment']['received'])) { |
|
| 607 | + $invoice_ref = $order_meta['order_payment']['received'][count($order_meta['order_payment']['received']) - 1]['invoice_ref']; |
|
| 608 | 608 | } |
| 609 | 609 | } |
| 610 | 610 | |
| 611 | - if ( ( $order_meta['order_status'] == 'partially_paid' || $order_meta['order_status'] == 'completed' || $order_meta['order_status'] == 'shipped' ) && !empty($invoice_ref) ) { |
|
| 612 | - $output .= ' <a href="' .admin_url( 'admin-post.php?action=wps_invoice&order_id=' .$order->ID. '&invoice_ref&=' .$invoice_ref. '&mode=pdf' ). '"><img src="' .WPSHOP_MEDIAS_ICON_URL. 'icon_invoice.png" alt="' .__('Invoice', 'wpshop'). '" /></a>'; |
|
| 611 | + if (($order_meta['order_status'] == 'partially_paid' || $order_meta['order_status'] == 'completed' || $order_meta['order_status'] == 'shipped') && !empty($invoice_ref)) { |
|
| 612 | + $output .= ' <a href="' . admin_url('admin-post.php?action=wps_invoice&order_id=' . $order->ID . '&invoice_ref&=' . $invoice_ref . '&mode=pdf') . '"><img src="' . WPSHOP_MEDIAS_ICON_URL . 'icon_invoice.png" alt="' . __('Invoice', 'wpshop') . '" /></a>'; |
|
| 613 | 613 | } |
| 614 | - if ( $order_meta['order_status'] == 'shipped' ) { |
|
| 615 | - $output .= ' <a href="'.admin_url( 'admin-post.php?action=wps_invoice&order_id=' .$order->ID. '&bon_colisage=ok&mode=pdf' ) . '"><img src="' .WPSHOP_MEDIAS_ICON_URL. 'bon_colisage_icon.png" alt="' .__('Shipping Slip', 'wpshop'). '" /></a>'; |
|
| 614 | + if ($order_meta['order_status'] == 'shipped') { |
|
| 615 | + $output .= ' <a href="' . admin_url('admin-post.php?action=wps_invoice&order_id=' . $order->ID . '&bon_colisage=ok&mode=pdf') . '"><img src="' . WPSHOP_MEDIAS_ICON_URL . 'bon_colisage_icon.png" alt="' . __('Shipping Slip', 'wpshop') . '" /></a>'; |
|
| 616 | 616 | } |
| 617 | 617 | $output .= '</td>'; |
| 618 | 618 | } |
@@ -626,24 +626,24 @@ discard block |
||
| 626 | 626 | |
| 627 | 627 | function wpshop_rss_feed() { |
| 628 | 628 | $output = ''; |
| 629 | - include_once( ABSPATH . WPINC . '/feed.php' ); |
|
| 629 | + include_once(ABSPATH . WPINC . '/feed.php'); |
|
| 630 | 630 | |
| 631 | - $rss = fetch_feed( 'http://www.wpshop.fr/feed/' ); |
|
| 632 | - if( ! is_wp_error( $rss ) ){ |
|
| 633 | - $maxitems = $rss->get_item_quantity( 4 ); |
|
| 634 | - $rss_items = $rss->get_items( 0, $maxitems ); |
|
| 631 | + $rss = fetch_feed('http://www.wpshop.fr/feed/'); |
|
| 632 | + if (!is_wp_error($rss)) { |
|
| 633 | + $maxitems = $rss->get_item_quantity(4); |
|
| 634 | + $rss_items = $rss->get_items(0, $maxitems); |
|
| 635 | 635 | } |
| 636 | 636 | else { |
| 637 | 637 | $output .= '<p>' . __('WPShop News cannot be loaded', 'wpshop') . '</p>'; |
| 638 | 638 | } |
| 639 | 639 | |
| 640 | - if ( $maxitems == 0 ) { |
|
| 640 | + if ($maxitems == 0) { |
|
| 641 | 641 | $output .= '<p>' . __('No WPShop new has been found', 'wpshop') . '</p>'; |
| 642 | 642 | } |
| 643 | 643 | else { |
| 644 | 644 | $output .= '<ul class="recent-orders">'; |
| 645 | - foreach ( $rss_items as $item ) { |
|
| 646 | - $output .= '<li><a href="' .$item->get_permalink() . '" title="' .$item->get_title(). '" target="_blank">' .$item->get_title(). '</a><br/>'; |
|
| 645 | + foreach ($rss_items as $item) { |
|
| 646 | + $output .= '<li><a href="' . $item->get_permalink() . '" title="' . $item->get_title() . '" target="_blank">' . $item->get_title() . '</a><br/>'; |
|
| 647 | 647 | $output .= $item->get_content(); |
| 648 | 648 | $output .= '</li>'; |
| 649 | 649 | } |
@@ -654,39 +654,39 @@ discard block |
||
| 654 | 654 | |
| 655 | 655 | |
| 656 | 656 | function wpshop_rss_tutorial_videos() { |
| 657 | - $ini_get_checking = ini_get( 'allow_url_fopen' ); |
|
| 658 | - if ( $ini_get_checking != 0 ) { |
|
| 657 | + $ini_get_checking = ini_get('allow_url_fopen'); |
|
| 658 | + if ($ini_get_checking != 0) { |
|
| 659 | 659 | $content = file_get_contents('http://www.wpshop.fr/rss_video.xml'); |
| 660 | 660 | $videos_rss = new SimpleXmlElement($content); |
| 661 | - if ( !empty($videos_rss) && !empty($videos_rss->channel) ) { |
|
| 661 | + if (!empty($videos_rss) && !empty($videos_rss->channel)) { |
|
| 662 | 662 | $videos_items = array(); |
| 663 | - foreach( $videos_rss->channel->item as $i => $item ) { |
|
| 663 | + foreach ($videos_rss->channel->item as $i => $item) { |
|
| 664 | 664 | $videos_items[] = $item; |
| 665 | 665 | } |
| 666 | - $rand_element = array_rand( $videos_items ); |
|
| 666 | + $rand_element = array_rand($videos_items); |
|
| 667 | 667 | $output = '<div class="wps_dashboard_video_container">'; |
| 668 | - $output .= '<div class="wps_dashboard_video_title">' .$videos_items[ $rand_element ]->title. '</div>'; |
|
| 669 | - $output .= '<div class="wps_dashboard_video"><iframe width="400" height="290" src="' .$videos_items[ $rand_element ]->embed_link. '" frameborder="0" allowfullscreen></iframe></div>'; |
|
| 670 | - $output .= '<div class="wps_dashboard_video_description">' .$videos_items[ $rand_element ]->description. '</div>'; |
|
| 668 | + $output .= '<div class="wps_dashboard_video_title">' . $videos_items[$rand_element]->title . '</div>'; |
|
| 669 | + $output .= '<div class="wps_dashboard_video"><iframe width="400" height="290" src="' . $videos_items[$rand_element]->embed_link . '" frameborder="0" allowfullscreen></iframe></div>'; |
|
| 670 | + $output .= '<div class="wps_dashboard_video_description">' . $videos_items[$rand_element]->description . '</div>'; |
|
| 671 | 671 | $output .= '</div>'; |
| 672 | 672 | |
| 673 | 673 | } |
| 674 | 674 | else { |
| 675 | - $output =__('No tutorial videos can be loaded', 'wpshop' ); |
|
| 675 | + $output = __('No tutorial videos can be loaded', 'wpshop'); |
|
| 676 | 676 | } |
| 677 | 677 | } |
| 678 | 678 | else { |
| 679 | - $output = __( 'Your servor doesn\'t allow to open external files', 'wpshop'); |
|
| 679 | + $output = __('Your servor doesn\'t allow to open external files', 'wpshop'); |
|
| 680 | 680 | } |
| 681 | 681 | echo $output; |
| 682 | 682 | } |
| 683 | 683 | |
| 684 | 684 | function wpshop_dashboard_get_changelog() { |
| 685 | - $readme_file = fopen( WPSHOP_DIR.'/readme.txt', 'r' ); |
|
| 686 | - if ( $readme_file ) { |
|
| 687 | - $txt = file_get_contents( WPSHOP_DIR.'/readme.txt' ); |
|
| 688 | - $pre_change_log = explode( '== Changelog ==', $txt ); |
|
| 689 | - $versions = explode( '= Version', $pre_change_log[1] ); |
|
| 685 | + $readme_file = fopen(WPSHOP_DIR . '/readme.txt', 'r'); |
|
| 686 | + if ($readme_file) { |
|
| 687 | + $txt = file_get_contents(WPSHOP_DIR . '/readme.txt'); |
|
| 688 | + $pre_change_log = explode('== Changelog ==', $txt); |
|
| 689 | + $versions = explode('= Version', $pre_change_log[1]); |
|
| 690 | 690 | |
| 691 | 691 | echo $versions[1]; |
| 692 | 692 | } |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
| 1 | +<?php if (!defined('ABSPATH')) exit; |
|
| 2 | 2 | /** |
| 3 | 3 | * Plugin configuration file. |
| 4 | 4 | * |
@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | /* Check if file is include. No direct access possible with file url */ |
| 13 | -if ( !defined( 'WPSHOP_VERSION' ) ) { |
|
| 14 | - die( __('Access is not allowed by this way', 'wpshop') ); |
|
| 13 | +if (!defined('WPSHOP_VERSION')) { |
|
| 14 | + die(__('Access is not allowed by this way', 'wpshop')); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | /* Declare wordpress database class reference var */ |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | DEFINE('WPSHOP_PRODUCT_VIEW_NB', '_' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT . '_view_nb'); |
| 92 | 92 | DEFINE('WPSHOP_PRODUCT_FRONT_DISPLAY_CONF', '_' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT . '_attributes_frontend_display'); |
| 93 | 93 | |
| 94 | - DEFINE('WPSHOP_DEFAULT_CUSTOM_TYPES', serialize( array(WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT, WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS, WPSHOP_NEWTYPE_IDENTIFIER_ADDRESS) )); |
|
| 94 | + DEFINE('WPSHOP_DEFAULT_CUSTOM_TYPES', serialize(array(WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT, WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS, WPSHOP_NEWTYPE_IDENTIFIER_ADDRESS))); |
|
| 95 | 95 | |
| 96 | 96 | |
| 97 | 97 | DEFINE('WPSHOP_IDENTIFIER_CUSTOMER', 'U'); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | DEFINE('WPSHOP_COUNTRY_LIST', serialize($wpshop_tab_countries)); |
| 105 | 105 | |
| 106 | 106 | |
| 107 | - DEFINE('WPSHOP_COMMON_ATTRIBUTES_PARENT_VARIATION_PRODUCT', serialize(array('tx_tva')) ); |
|
| 107 | + DEFINE('WPSHOP_COMMON_ATTRIBUTES_PARENT_VARIATION_PRODUCT', serialize(array('tx_tva'))); |
|
| 108 | 108 | |
| 109 | 109 | /* Define database table names */ |
| 110 | 110 | DEFINE('WPSHOP_DBT_ENTITIES', $wpdb->prefix . 'wpshop__entity'); |
@@ -163,17 +163,17 @@ discard block |
||
| 163 | 163 | DEFINE('WPSHOP_DISPLAY_LIST_TYPE', $wpshop_display_option['wpshop_display_list_type']); |
| 164 | 164 | |
| 165 | 165 | /* ADMIN DISPLAY */ |
| 166 | - $attribute_page_layout_types=array('tab' => __('Tabs', 'wpshop'), 'separated_bloc' => __('Separated bloc', 'wpshop')); |
|
| 166 | + $attribute_page_layout_types = array('tab' => __('Tabs', 'wpshop'), 'separated_bloc' => __('Separated bloc', 'wpshop')); |
|
| 167 | 167 | $wpshop_admin_display_option = get_option('wpshop_admin_display_option', array()); |
| 168 | - DEFINE('WPSHOP_ATTRIBUTE_SET_EDITION_PAGE_LAYOUT', (!empty($wpshop_admin_display_option['wpshop_admin_attr_set_layout'])?$wpshop_admin_display_option['wpshop_admin_attr_set_layout']:'separated_bloc')); |
|
| 169 | - DEFINE('WPSHOP_ATTRIBUTE_EDITION_PAGE_LAYOUT', (!empty($wpshop_admin_display_option['wpshop_admin_attr_layout'])?$wpshop_admin_display_option['wpshop_admin_attr_layout']:'tab')); |
|
| 170 | - $product_page_layout_types=array('movable-tab' => __('Separated box in product page', 'wpshop'), 'fixed-tab' => __('A tab in product data box "Product data"', 'wpshop'), 'each-box' => __('In each attribute group section "Product data"', 'wpshop')); |
|
| 171 | - DEFINE('WPSHOP_PRODUCT_SHORTCODE_DISPLAY_TYPE', (!empty($wpshop_admin_display_option['wpshop_admin_product_shortcode_display'])?$wpshop_admin_display_option['wpshop_admin_product_shortcode_display']:'each-box')); |
|
| 168 | + DEFINE('WPSHOP_ATTRIBUTE_SET_EDITION_PAGE_LAYOUT', (!empty($wpshop_admin_display_option['wpshop_admin_attr_set_layout']) ? $wpshop_admin_display_option['wpshop_admin_attr_set_layout'] : 'separated_bloc')); |
|
| 169 | + DEFINE('WPSHOP_ATTRIBUTE_EDITION_PAGE_LAYOUT', (!empty($wpshop_admin_display_option['wpshop_admin_attr_layout']) ? $wpshop_admin_display_option['wpshop_admin_attr_layout'] : 'tab')); |
|
| 170 | + $product_page_layout_types = array('movable-tab' => __('Separated box in product page', 'wpshop'), 'fixed-tab' => __('A tab in product data box "Product data"', 'wpshop'), 'each-box' => __('In each attribute group section "Product data"', 'wpshop')); |
|
| 171 | + DEFINE('WPSHOP_PRODUCT_SHORTCODE_DISPLAY_TYPE', (!empty($wpshop_admin_display_option['wpshop_admin_product_shortcode_display']) ? $wpshop_admin_display_option['wpshop_admin_product_shortcode_display'] : 'each-box')); |
|
| 172 | 172 | |
| 173 | 173 | |
| 174 | 174 | /* Define the default email messages */ |
| 175 | - DEFINE('WPSHOP_SIGNUP_MESSAGE_OBJECT', __('Account creation confirmation','wpshop')); |
|
| 176 | - DEFINE('WPSHOP_SIGNUP_MESSAGE', __('Hello [customer_first_name] [customer_last_name], this email confirms that your account has just been created. Thank you for your loyalty. Have a good day.','wpshop')); |
|
| 175 | + DEFINE('WPSHOP_SIGNUP_MESSAGE_OBJECT', __('Account creation confirmation', 'wpshop')); |
|
| 176 | + DEFINE('WPSHOP_SIGNUP_MESSAGE', __('Hello [customer_first_name] [customer_last_name], this email confirms that your account has just been created. Thank you for your loyalty. Have a good day.', 'wpshop')); |
|
| 177 | 177 | |
| 178 | 178 | DEFINE('WPSHOP_ORDER_CONFIRMATION_MESSAGE_OBJECT', __('Your order has been recorded', 'wpshop')); |
| 179 | 179 | DEFINE('WPSHOP_ORDER_CONFIRMATION_MESSAGE', __('Hello [customer_first_name] [customer_last_name], this email confirms that your order has been recorded (order date : [order_date]). Thank you for your loyalty. Have a good day.', 'wpshop')); |
@@ -208,14 +208,14 @@ discard block |
||
| 208 | 208 | DEFINE('WPSHOP_DOWNLOADABLE_FILE_IS_AVAILABLE_OBJECT', __('Your downloadable product is available', 'wpshop')); |
| 209 | 209 | DEFINE('WPSHOP_DOWNLOADABLE_FILE_IS_AVAILABLE', __('Hello [customer_first_name] [customer_last_name], <br />this email confirms that your downloadable product is available : [download_product_link].<br /><br /> Thank you for your loyalty. Have a good day.', 'wpshop')); |
| 210 | 210 | |
| 211 | - DEFINE('WPSHOP_ORDER_IS_CANCELED_OBJECT', __('Your order has been canceled', 'wpshop') ); |
|
| 211 | + DEFINE('WPSHOP_ORDER_IS_CANCELED_OBJECT', __('Your order has been canceled', 'wpshop')); |
|
| 212 | 212 | DEFINE('WPSHOP_ORDER_IS_CANCELED', __('Hello [customer_first_name] [customer_last_name], <br />this email confirms your order ( Order key : [order_key] - Date : [order_date] ) has been canceled.<br /><br /> Thank you for your loyalty. Have a good day.', 'wpshop')); |
| 213 | 213 | |
| 214 | - DEFINE('WPSHOP_FORGOT_PASSWORD_MESSAGE_OBJECT', __('Renewal of password', 'wpshop') ); |
|
| 215 | - DEFINE('WPSHOP_FORGOT_PASSWORD_MESSAGE', __('Hello [customer_first_name] [customer_last_name], <br />Somebody has asked a renewal of password for your account.<br/><br/>To renew your password, click on this link : [forgot_password_link].<br/>If you are not at the origin of this request, please ignore this message.', 'wpshop') ); |
|
| 214 | + DEFINE('WPSHOP_FORGOT_PASSWORD_MESSAGE_OBJECT', __('Renewal of password', 'wpshop')); |
|
| 215 | + DEFINE('WPSHOP_FORGOT_PASSWORD_MESSAGE', __('Hello [customer_first_name] [customer_last_name], <br />Somebody has asked a renewal of password for your account.<br/><br/>To renew your password, click on this link : [forgot_password_link].<br/>If you are not at the origin of this request, please ignore this message.', 'wpshop')); |
|
| 216 | 216 | |
| 217 | - DEFINE('WPSHOP_DIRECT_PAYMENT_LINK_MESSAGE_OBJECT', __('Pay and finalize your order', 'wpshop') ); |
|
| 218 | - DEFINE('WPSHOP_DIRECT_PAYMENT_LINK_MESSAGE', __('Hello [customer_first_name] [customer_last_name], <br />An order is available for you on our website.<br/>You can click on this link to pay and finalize this order : [direct_payment_link]<br/><br/>[order_content]<br /><br />Thank you for your loyalty. Have a good day.', 'wpshop') ); |
|
| 217 | + DEFINE('WPSHOP_DIRECT_PAYMENT_LINK_MESSAGE_OBJECT', __('Pay and finalize your order', 'wpshop')); |
|
| 218 | + DEFINE('WPSHOP_DIRECT_PAYMENT_LINK_MESSAGE', __('Hello [customer_first_name] [customer_last_name], <br />An order is available for you on our website.<br/>You can click on this link to pay and finalize this order : [direct_payment_link]<br/><br/>[order_content]<br /><br />Thank you for your loyalty. Have a good day.', 'wpshop')); |
|
| 219 | 219 | |
| 220 | 220 | |
| 221 | 221 | /* Define debug vars */ |
@@ -225,39 +225,39 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | /* ALLOWED IPS */ |
| 227 | 227 | $default_ip = array('127.0.0.1', '0.0.0.0'); |
| 228 | - DEFINE('WPSHOP_DEBUG_MODE_ALLOWED_IP', (!empty($extra_options['WPSHOP_DEBUG_MODE_ALLOWED_IP'])?serialize(array_merge($default_ip, array($extra_options['WPSHOP_DEBUG_MODE_ALLOWED_IP']))):serialize($default_ip))); |
|
| 228 | + DEFINE('WPSHOP_DEBUG_MODE_ALLOWED_IP', (!empty($extra_options['WPSHOP_DEBUG_MODE_ALLOWED_IP']) ? serialize(array_merge($default_ip, array($extra_options['WPSHOP_DEBUG_MODE_ALLOWED_IP']))) : serialize($default_ip))); |
|
| 229 | 229 | /* DEBUG MODE */ |
| 230 | 230 | $debug_mode = false; |
| 231 | - if ( !empty($extra_options['WPSHOP_DEBUG_MODE']) && ($extra_options['WPSHOP_DEBUG_MODE'] == 'true') ) |
|
| 231 | + if (!empty($extra_options['WPSHOP_DEBUG_MODE']) && ($extra_options['WPSHOP_DEBUG_MODE'] == 'true')) |
|
| 232 | 232 | $debug_mode = true; |
| 233 | 233 | DEFINE('WPSHOP_DEBUG_MODE', $debug_mode); |
| 234 | 234 | /* DATA DELETE */ |
| 235 | 235 | $delete_data = false; |
| 236 | - if ( !empty($extra_options['WPSHOP_DEBUG_MODE_ALLOW_DATA_DELETION']) && ($extra_options['WPSHOP_DEBUG_MODE_ALLOW_DATA_DELETION'] == 'true') ) |
|
| 236 | + if (!empty($extra_options['WPSHOP_DEBUG_MODE_ALLOW_DATA_DELETION']) && ($extra_options['WPSHOP_DEBUG_MODE_ALLOW_DATA_DELETION'] == 'true')) |
|
| 237 | 237 | $delete_data = true; |
| 238 | 238 | DEFINE('WPSHOP_DEBUG_MODE_ALLOW_DATA_DELETION', $delete_data); |
| 239 | 239 | |
| 240 | 240 | /* TOOLS MENU */ |
| 241 | 241 | $tools_menu_display = false; |
| 242 | - if ( !empty($extra_options['WPSHOP_DISPLAY_TOOLS_MENU']) && ($extra_options['WPSHOP_DISPLAY_TOOLS_MENU'] == 'true') ) |
|
| 242 | + if (!empty($extra_options['WPSHOP_DISPLAY_TOOLS_MENU']) && ($extra_options['WPSHOP_DISPLAY_TOOLS_MENU'] == 'true')) |
|
| 243 | 243 | $tools_menu_display = true; |
| 244 | 244 | DEFINE('WPSHOP_DISPLAY_TOOLS_MENU', $tools_menu_display); |
| 245 | 245 | |
| 246 | 246 | /* ATT VALUE PER USER */ |
| 247 | 247 | $attr_value_per_user = false; |
| 248 | - if ( !empty($extra_options['WPSHOP_ATTRIBUTE_VALUE_PER_USER']) && ($extra_options['WPSHOP_ATTRIBUTE_VALUE_PER_USER'] == 'true') ) |
|
| 248 | + if (!empty($extra_options['WPSHOP_ATTRIBUTE_VALUE_PER_USER']) && ($extra_options['WPSHOP_ATTRIBUTE_VALUE_PER_USER'] == 'true')) |
|
| 249 | 249 | $attr_value_per_user = true; |
| 250 | 250 | DEFINE('WPSHOP_ATTRIBUTE_VALUE_PER_USER', $attr_value_per_user); |
| 251 | 251 | |
| 252 | 252 | /* DISPLAY AVAILABLE KEYS FOR TEMPLATE */ |
| 253 | 253 | $display_available_keys_for_template = false; |
| 254 | - if ( !empty($extra_options['WPSHOP_DISPLAY_AVAILABLE_KEYS_FOR_TEMPLATE']) && ($extra_options['WPSHOP_DISPLAY_AVAILABLE_KEYS_FOR_TEMPLATE'] == 'true') ) |
|
| 254 | + if (!empty($extra_options['WPSHOP_DISPLAY_AVAILABLE_KEYS_FOR_TEMPLATE']) && ($extra_options['WPSHOP_DISPLAY_AVAILABLE_KEYS_FOR_TEMPLATE'] == 'true')) |
|
| 255 | 255 | $display_available_keys_for_template = true; |
| 256 | 256 | DEFINE('WPSHOP_DISPLAY_AVAILABLE_KEYS_FOR_TEMPLATE', $display_available_keys_for_template); |
| 257 | 257 | |
| 258 | 258 | /* MULTIPLE VALUE PER USER */ |
| 259 | 259 | $display_value_attribute_type_select = false; |
| 260 | - if ( !empty($extra_options['WPSHOP_DISPLAY_VALUE_FOR_ATTRIBUTE_SELECT']) && ($extra_options['WPSHOP_DISPLAY_VALUE_FOR_ATTRIBUTE_SELECT'] == 'true') ) |
|
| 260 | + if (!empty($extra_options['WPSHOP_DISPLAY_VALUE_FOR_ATTRIBUTE_SELECT']) && ($extra_options['WPSHOP_DISPLAY_VALUE_FOR_ATTRIBUTE_SELECT'] == 'true')) |
|
| 261 | 261 | $display_value_attribute_type_select = true; |
| 262 | 262 | DEFINE('WPSHOP_DISPLAY_VALUE_FOR_ATTRIBUTE_SELECT', $display_value_attribute_type_select); |
| 263 | 263 | |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | |
| 286 | 286 | /* Define the different vars used for price calculation */ |
| 287 | 287 | $wpshop_shop_price_piloting = get_option('wpshop_shop_price_piloting'); |
| 288 | - DEFINE('WPSHOP_PRODUCT_PRICE_PILOT', ( !empty($wpshop_shop_price_piloting) ? $wpshop_shop_price_piloting : 'TTC')); |
|
| 288 | + DEFINE('WPSHOP_PRODUCT_PRICE_PILOT', (!empty($wpshop_shop_price_piloting) ? $wpshop_shop_price_piloting : 'TTC')); |
|
| 289 | 289 | |
| 290 | 290 | DEFINE('WPSHOP_COST_OF_POSTAGE', 'cost_of_postage'); |
| 291 | 291 | DEFINE('WPSHOP_PRODUCT_PRICE_HT', 'price_ht'); |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | DEFINE('WPSHOP_PRODUCT_SPECIAL_PRICE_DATE_FROM', 'special_from'); |
| 298 | 298 | DEFINE('WPSHOP_PRODUCT_SPECIAL_PRICE_DATE_TO', 'special_to'); |
| 299 | 299 | DEFINE('WPSHOP_PRODUCT_DISCOUNT_AMOUNT', 'discount_amount'); |
| 300 | - DEFINE('WPSHOP_VAT_ON_SHIPPING_COST', apply_filters( 'wps_change_shipping_vat', 20 ) ); |
|
| 300 | + DEFINE('WPSHOP_VAT_ON_SHIPPING_COST', apply_filters('wps_change_shipping_vat', 20)); |
|
| 301 | 301 | |
| 302 | 302 | DEFINE('WPSHOP_ATTRIBUTE_PRICES', serialize(array(WPSHOP_PRODUCT_PRICE_HT, WPSHOP_PRODUCT_PRICE_TAX, WPSHOP_PRODUCT_PRICE_TTC, WPSHOP_PRODUCT_PRICE_TAX_AMOUNT))); |
| 303 | 303 | DEFINE('WPSHOP_ATTRIBUTE_WEIGHT', serialize(array(WPSHOP_PRODUCT_WEIGHT))); |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | DEFINE('WPSHOP_ATTRIBUTE_UNDELETABLE', serialize(array_merge(array(), unserialize(WPSHOP_ATTRIBUTE_PRICES)))); |
| 307 | 307 | |
| 308 | 308 | /* Define the attribute list to hide or variation creation */ |
| 309 | - DEFINE('WPSHOP_VARIATION_ATTRIBUTE_TO_HIDE', serialize( array_merge(unserialize(WPSHOP_ATTRIBUTE_PRICES), array('product_attribute_set_id', 'product_reference')) ) ); |
|
| 309 | + DEFINE('WPSHOP_VARIATION_ATTRIBUTE_TO_HIDE', serialize(array_merge(unserialize(WPSHOP_ATTRIBUTE_PRICES), array('product_attribute_set_id', 'product_reference')))); |
|
| 310 | 310 | |
| 311 | 311 | /* Define the default currency */ |
| 312 | 312 | DEFINE('WPSHOP_SHOP_DEFAULT_CURRENCY', 'EUR'); |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | |
| 318 | 318 | /* Define the shipping default rules */ |
| 319 | 319 | DEFINE('WPSHOP_SHOP_SHIPPING_RULES', serialize(array( |
| 320 | - 'min_max' => array('min'=>0,'max'=>30), |
|
| 320 | + 'min_max' => array('min'=>0, 'max'=>30), |
|
| 321 | 321 | 'free_from' => 4500 |
| 322 | 322 | ))); |
| 323 | 323 | $shipping_fees_array = array( |
@@ -339,20 +339,20 @@ discard block |
||
| 339 | 339 | |
| 340 | 340 | /* Define addons modules */ |
| 341 | 341 | DEFINE('WPSHOP_ADDONS_KEY_IS', '48'); |
| 342 | - DEFINE('WPSHOP_ADDONS_STATES_CLASS', serialize( array(true => 'wpshop_addons_state wpshop_addons_state_activated', false => 'wpshop_addons_state wpshop_addons_state_deactivated'))); |
|
| 343 | - DEFINE('WPSHOP_ADDONS_LIST', serialize(array('WPSHOP_ADDONS_QUOTATION' => array(__('Quotation','wpshop'), '48', 'per_site', 'quotation_allowed', 'WPSHOP_NEW_QUOTATION_ADMIN_MESSAGE'), 'WPSHOP_ADDONS_PAYMENT_GATEWAY_CB_CIC' => array(__('Payment gateway CIC','wpshop'), '32', 'per_site', '')/* , 'WPSHOP_ADDONS_PRICE_PER_GROUP' => array(__('Price per user group','wpshop'), '13', 'free') */))); |
|
| 344 | - DEFINE('WPSHOP_ADDONS_QUOTATION', (!empty($wpshop_addons_state['WPSHOP_ADDONS_QUOTATION']['activate'])?$wpshop_addons_state['WPSHOP_ADDONS_QUOTATION']['activate']:false)); |
|
| 345 | - DEFINE('WPSHOP_ADDONS_PRICE_PER_GROUP', (!empty($wpshop_addons_state['WPSHOP_ADDONS_PRICE_PER_GROUP']['activate'])?$wpshop_addons_state['WPSHOP_ADDONS_PRICE_PER_GROUP']['activate']:false)); |
|
| 346 | - DEFINE('WPSHOP_PAYMENT_METHOD_CIC', (!empty($wpshop_addons_state['WPSHOP_ADDONS_PAYMENT_GATEWAY_CB_CIC']['activate'])?$wpshop_addons_state['WPSHOP_ADDONS_PAYMENT_GATEWAY_CB_CIC']['activate']:false)); |
|
| 342 | + DEFINE('WPSHOP_ADDONS_STATES_CLASS', serialize(array(true => 'wpshop_addons_state wpshop_addons_state_activated', false => 'wpshop_addons_state wpshop_addons_state_deactivated'))); |
|
| 343 | + DEFINE('WPSHOP_ADDONS_LIST', serialize(array('WPSHOP_ADDONS_QUOTATION' => array(__('Quotation', 'wpshop'), '48', 'per_site', 'quotation_allowed', 'WPSHOP_NEW_QUOTATION_ADMIN_MESSAGE'), 'WPSHOP_ADDONS_PAYMENT_GATEWAY_CB_CIC' => array(__('Payment gateway CIC', 'wpshop'), '32', 'per_site', '')/* , 'WPSHOP_ADDONS_PRICE_PER_GROUP' => array(__('Price per user group','wpshop'), '13', 'free') */))); |
|
| 344 | + DEFINE('WPSHOP_ADDONS_QUOTATION', (!empty($wpshop_addons_state['WPSHOP_ADDONS_QUOTATION']['activate']) ? $wpshop_addons_state['WPSHOP_ADDONS_QUOTATION']['activate'] : false)); |
|
| 345 | + DEFINE('WPSHOP_ADDONS_PRICE_PER_GROUP', (!empty($wpshop_addons_state['WPSHOP_ADDONS_PRICE_PER_GROUP']['activate']) ? $wpshop_addons_state['WPSHOP_ADDONS_PRICE_PER_GROUP']['activate'] : false)); |
|
| 346 | + DEFINE('WPSHOP_PAYMENT_METHOD_CIC', (!empty($wpshop_addons_state['WPSHOP_ADDONS_PAYMENT_GATEWAY_CB_CIC']['activate']) ? $wpshop_addons_state['WPSHOP_ADDONS_PAYMENT_GATEWAY_CB_CIC']['activate'] : false)); |
|
| 347 | 347 | DEFINE('WPSHOP_ADDONS_QUOTATION_CODE', 'nfdJK-AsBCO-%AZDZA'); |
| 348 | 348 | DEFINE('WPSHOP_ADDONS_PRICE_PER_GROUP_CODE', '7GnnQ-5FeqZ-BiKz3'); |
| 349 | 349 | DEFINE('WPSHOP_ADDONS_PAYMENT_GATEWAY_CB_CIC', 'nZYsM-vQ8qC-VfVfA'); |
| 350 | 350 | |
| 351 | 351 | /* Define payment method params */ |
| 352 | 352 | $wpshop_paymentMethod = get_option('wps_payment_mode'); |
| 353 | - if(WPSHOP_PAYMENT_METHOD_CIC || !empty($wpshop_paymentMethod['mode']) && !empty($wpshop_paymentMethod['mode']['cic']) ) { |
|
| 353 | + if (WPSHOP_PAYMENT_METHOD_CIC || !empty($wpshop_paymentMethod['mode']) && !empty($wpshop_paymentMethod['mode']['cic'])) { |
|
| 354 | 354 | $cmcic_params = get_option('wpshop_cmcic_params', array()); |
| 355 | - if(!empty($cmcic_params)){ |
|
| 355 | + if (!empty($cmcic_params)) { |
|
| 356 | 356 | DEFINE("CMCIC_CLE", $cmcic_params['cle']); |
| 357 | 357 | DEFINE("CMCIC_TPE", $cmcic_params['tpe']); |
| 358 | 358 | DEFINE("CMCIC_VERSION", $cmcic_params['version']); |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | /** Civility */ |
| 367 | -$civility = array(1=>__('Mr.','wpshop'),__('Mrs.','wpshop'),__('Miss','wpshop')); |
|
| 367 | +$civility = array(1=>__('Mr.', 'wpshop'), __('Mrs.', 'wpshop'), __('Miss', 'wpshop')); |
|
| 368 | 368 | /** Status */ |
| 369 | 369 | $order_status = array( |
| 370 | 370 | '' => __('Awaiting treatment', 'wpshop'), |
@@ -392,14 +392,14 @@ discard block |
||
| 392 | 392 | 'show_ui' => 'boolean', |
| 393 | 393 | 'show_in_nav_menus' => 'boolean', |
| 394 | 394 | 'show_in_menu' => 'boolean|text', |
| 395 | - 'capabilities' => array( 'publish_posts', 'edit_posts', 'edit_others_posts', 'delete_posts', 'delete_others_posts', 'read_private_posts', 'edit_post', 'delete_post', 'read_post' ), |
|
| 395 | + 'capabilities' => array('publish_posts', 'edit_posts', 'edit_others_posts', 'delete_posts', 'delete_others_posts', 'read_private_posts', 'edit_post', 'delete_post', 'read_post'), |
|
| 396 | 396 | 'hierarchical' => false, |
| 397 | 397 | 'rewrite' => false, |
| 398 | 398 | 'query_var' => true, |
| 399 | 399 | 'supports' => unserialize(WPSHOP_REGISTER_POST_TYPE_SUPPORT) |
| 400 | 400 | ); |
| 401 | 401 | DEFINE('WPSHOP_REGISTER_POST_TYPE_ARGS', serialize($register_post_type_args)); |
| 402 | -DEFINE('WPSHOP_REGISTER_POST_TYPE_MANDATORY_SUPPORTS', serialize( array('title', 'editor', 'thumbnail', 'excerpt') )); |
|
| 402 | +DEFINE('WPSHOP_REGISTER_POST_TYPE_MANDATORY_SUPPORTS', serialize(array('title', 'editor', 'thumbnail', 'excerpt'))); |
|
| 403 | 403 | DEFINE('WPSHOP_PRODUCT_HIDDEN_METABOX', serialize(array('formatdiv', 'pageparentdiv', 'postexcerpt', 'trackbacksdiv', 'postcustom', 'commentstatusdiv', 'commentsdiv', 'slugdiv', 'authordiv', 'revisionsdiv'))); |
| 404 | 404 | |
| 405 | 405 | /* Shop type */ |
@@ -410,8 +410,8 @@ discard block |
||
| 410 | 410 | DEFINE('WPSHOP_ATTR_SELECT_TYPE_TOGGLED', serialize(array('custom' => 'internal_data', 'internal' => 'custom_data'))); |
| 411 | 411 | |
| 412 | 412 | /* Define the types existing into the current wordpress installation */ |
| 413 | -$default_to_exclude = array('attachment','revision','nav_menu_item', WPSHOP_NEWTYPE_IDENTIFIER_ENTITIES, WPSHOP_NEWTYPE_IDENTIFIER_MESSAGE); |
|
| 414 | -DEFINE('WPSHOP_INTERNAL_TYPES_TO_EXCLUDE', (!empty($extra_options['WPSHOP_INTERNAL_TYPES_TO_EXCLUDE'])?serialize(array_merge(array($extra_options['WPSHOP_INTERNAL_TYPES_TO_EXCLUDE']),$default_to_exclude)):serialize($default_to_exclude))); |
|
| 413 | +$default_to_exclude = array('attachment', 'revision', 'nav_menu_item', WPSHOP_NEWTYPE_IDENTIFIER_ENTITIES, WPSHOP_NEWTYPE_IDENTIFIER_MESSAGE); |
|
| 414 | +DEFINE('WPSHOP_INTERNAL_TYPES_TO_EXCLUDE', (!empty($extra_options['WPSHOP_INTERNAL_TYPES_TO_EXCLUDE']) ? serialize(array_merge(array($extra_options['WPSHOP_INTERNAL_TYPES_TO_EXCLUDE']), $default_to_exclude)) : serialize($default_to_exclude))); |
|
| 415 | 415 | |
| 416 | 416 | /* Start form field display config */ |
| 417 | 417 | /* Get the list of possible posts status */ |
@@ -421,9 +421,9 @@ discard block |
||
| 421 | 421 | $comboxOptionToHide = array('deleted'); |
| 422 | 422 | |
| 423 | 423 | /* Attributes form */ |
| 424 | - $attribute_displayed_field = array('id', 'status', 'entity_id', 'is_required', 'is_unique', 'is_visible_in_front', 'is_visible_in_front_listing', 'frontend_input', 'backend_input', 'frontend_label', 'default_value', 'is_requiring_unit', '_unit_group_id', '_default_unit', 'is_historisable','is_intrinsic', 'is_filterable', 'code', 'is_used_for_sort_by', 'is_visible_in_advanced_search', 'is_used_in_admin_listing_column', 'is_used_in_quick_add_form', 'frontend_verification', 'is_user_defined', 'is_used_in_variation', 'is_used_for_variation', '_need_verification', '_display_informations_about_value', 'frontend_css_class', 'backend_css_class', 'frontend_help_message', 'is_searchable'); |
|
| 425 | - $attribute_options_group = array(__('Attribute unit', 'wpshop') => array('is_requiring_unit','_unit_group_id','_default_unit'), __('Frontend option', 'wpshop') => array('is_visible_in_front','is_visible_in_front_listing','is_used_for_sort_by','is_visible_in_advanced_search', 'is_searchable', '_display_informations_about_value'), __('Variations', 'wpshop') => array('is_user_defined', 'is_used_in_variation', 'is_used_for_variation', 'frontend_input')); |
|
| 426 | - DEFINE('WPSHOP_ATTRIBUTE_DEF_COLUMN_INTO_OPTIONS', serialize( array('_need_verification', 'frontend_verification', 'frontend_css_class', 'backend_css_class', 'frontend_help_message', 'frontend_help_message') )); |
|
| 424 | + $attribute_displayed_field = array('id', 'status', 'entity_id', 'is_required', 'is_unique', 'is_visible_in_front', 'is_visible_in_front_listing', 'frontend_input', 'backend_input', 'frontend_label', 'default_value', 'is_requiring_unit', '_unit_group_id', '_default_unit', 'is_historisable', 'is_intrinsic', 'is_filterable', 'code', 'is_used_for_sort_by', 'is_visible_in_advanced_search', 'is_used_in_admin_listing_column', 'is_used_in_quick_add_form', 'frontend_verification', 'is_user_defined', 'is_used_in_variation', 'is_used_for_variation', '_need_verification', '_display_informations_about_value', 'frontend_css_class', 'backend_css_class', 'frontend_help_message', 'is_searchable'); |
|
| 425 | + $attribute_options_group = array(__('Attribute unit', 'wpshop') => array('is_requiring_unit', '_unit_group_id', '_default_unit'), __('Frontend option', 'wpshop') => array('is_visible_in_front', 'is_visible_in_front_listing', 'is_used_for_sort_by', 'is_visible_in_advanced_search', 'is_searchable', '_display_informations_about_value'), __('Variations', 'wpshop') => array('is_user_defined', 'is_used_in_variation', 'is_used_for_variation', 'frontend_input')); |
|
| 426 | + DEFINE('WPSHOP_ATTRIBUTE_DEF_COLUMN_INTO_OPTIONS', serialize(array('_need_verification', 'frontend_verification', 'frontend_css_class', 'backend_css_class', 'frontend_help_message', 'frontend_help_message'))); |
|
| 427 | 427 | |
| 428 | 428 | /* General form */ |
| 429 | 429 | $attribute_hidden_field = array('position'); |