@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="postbox"> |
4 | 4 | <h3 class="hndle"><span><?php echo $box_title; ?></span></h3> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div class="postbox"> |
4 | 6 | <h3 class="hndle"><span><?php echo $box_title; ?></span></h3> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <table class="table table-striped wps-pos-element-table"> |
4 | 4 | <tr> |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | <th><?php _e('Product price', 'wps-pos-i18n'); ?></th> |
7 | 7 | <th><?php _e('Action', 'wps-pos-i18n'); ?></th> |
8 | 8 | </tr> |
9 | - <?php foreach ( $product_list as $product ) : ?> |
|
10 | - <?php $product_data = wpshop_products::get_product_data( $product['ID'] ); ?> |
|
11 | - <?php $product_variation_definition = wpshop_products::get_variation( $product['ID'] );?> |
|
12 | - <?php require( wpshop_tools::get_template_part( WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend/products', 'product' ) ); ?> |
|
9 | + <?php foreach ($product_list as $product) : ?> |
|
10 | + <?php $product_data = wpshop_products::get_product_data($product['ID']); ?> |
|
11 | + <?php $product_variation_definition = wpshop_products::get_variation($product['ID']); ?> |
|
12 | + <?php require(wpshop_tools::get_template_part(WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend/products', 'product')); ?> |
|
13 | 13 | <?php endforeach; ?> |
14 | 14 | </table> |
15 | 15 | \ No newline at end of file |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <table class="table table-striped wps-pos-element-table"> |
4 | 6 | <tr> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <span class="dashicons dashicons-products"></span> |
4 | 6 | <?php _e( 'Product selection', 'wps-pos-i18n' ); ?> |
@@ -1,5 +1,5 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <span class="dashicons dashicons-products"></span> |
4 | -<?php _e( 'Product selection', 'wps-pos-i18n' ); ?> |
|
5 | -<a class="thickbox add-new-h2" title="<?php _e( 'New product creation', 'wps-pos-i18n' ); ?>" href="<?php echo admin_url( 'admin-ajax.php?action=wpspos-product-quick-creation&_wpnonce=' . wp_create_nonce( 'wps-product-quick-nonce' ) . '&width=550&height=600' ); ?>"><?php _e('Create a product', 'wps-pos-i18n'); ?></a> |
|
4 | +<?php _e('Product selection', 'wps-pos-i18n'); ?> |
|
5 | +<a class="thickbox add-new-h2" title="<?php _e('New product creation', 'wps-pos-i18n'); ?>" href="<?php echo admin_url('admin-ajax.php?action=wpspos-product-quick-creation&_wpnonce=' . wp_create_nonce('wps-product-quick-nonce') . '&width=550&height=600'); ?>"><?php _e('Create a product', 'wps-pos-i18n'); ?></a> |
@@ -1,9 +1,9 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - if ( !empty( $product_id ) ) : ?> |
|
3 | - <?php echo wpshop_products::wpshop_variation( $product_id ); ?> |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + if (!empty($product_id)) : ?> |
|
3 | + <?php echo wpshop_products::wpshop_variation($product_id); ?> |
|
4 | 4 | <div class="wpspos-product-variation-selector" > |
5 | - <button class="wps-bton-first-mini-rounded alignRight" id="wpspos-product-with-variation-add-to-cart" ><?php _e( 'Add product', 'wpshop'); ?></button> |
|
5 | + <button class="wps-bton-first-mini-rounded alignRight" id="wpspos-product-with-variation-add-to-cart" ><?php _e('Add product', 'wpshop'); ?></button> |
|
6 | 6 | </div> |
7 | 7 | <?php else : ?> |
8 | - <?php _e( 'We are unable to detect the product you want to add to order', 'wps-pos-i18n' ); ?> |
|
8 | + <?php _e('We are unable to detect the product you want to add to order', 'wps-pos-i18n'); ?> |
|
9 | 9 | <?php endif; ?> |
10 | 10 | \ No newline at end of file |
@@ -1,9 +1,14 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | if ( !empty( $product_id ) ) : ?> |
3 | 5 | <?php echo wpshop_products::wpshop_variation( $product_id ); ?> |
4 | 6 | <div class="wpspos-product-variation-selector" > |
5 | 7 | <button class="wps-bton-first-mini-rounded alignRight" id="wpspos-product-with-variation-add-to-cart" ><?php _e( 'Add product', 'wpshop'); ?></button> |
6 | 8 | </div> |
7 | -<?php else : ?> |
|
8 | - <?php _e( 'We are unable to detect the product you want to add to order', 'wps-pos-i18n' ); ?> |
|
9 | +<?php else { |
|
10 | + : ?> |
|
11 | + <?php _e( 'We are unable to detect the product you want to add to order', 'wps-pos-i18n' ); |
|
12 | +} |
|
13 | +?> |
|
9 | 14 | <?php endif; ?> |
10 | 15 | \ No newline at end of file |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | $billing_option = get_option( 'wpshop_billing_address' ); |
3 | 5 | if( !empty( $billing_option ) && is_array( $billing_option ) ) { |
4 | 6 | $attribute_set_id = $billing_option['choice']; |
@@ -1,19 +1,19 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - $billing_option = get_option( 'wpshop_billing_address' ); |
|
3 | - if( !empty( $billing_option ) && is_array( $billing_option ) ) { |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + $billing_option = get_option('wpshop_billing_address'); |
|
3 | + if (!empty($billing_option) && is_array($billing_option)) { |
|
4 | 4 | $attribute_set_id = $billing_option['choice']; |
5 | 5 | } else { |
6 | 6 | global $wpdb; |
7 | - $query = $wpdb->prepare( "SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", __( 'Billing address', 'wpshop' ) ); |
|
8 | - $attribute_set_id = $wpdb->get_var( $query ); |
|
9 | - if( empty( $attribute_set_id ) ) { |
|
7 | + $query = $wpdb->prepare("SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", __('Billing address', 'wpshop')); |
|
8 | + $attribute_set_id = $wpdb->get_var($query); |
|
9 | + if (empty($attribute_set_id)) { |
|
10 | 10 | global $wpdb; |
11 | - $query = $wpdb->prepare( "SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", 'Billing address' ); |
|
12 | - $attribute_set_id = $wpdb->get_var( $query ); |
|
11 | + $query = $wpdb->prepare("SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", 'Billing address'); |
|
12 | + $attribute_set_id = $wpdb->get_var($query); |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | ?> |
16 | 16 | <span class="dashicons dashicons-groups"></span> |
17 | -<?php _e( 'Customer selection', 'wps-pos-i18n' ); ?> |
|
18 | -<a class="thickbox add-new-h2" title="<?php _e( 'New customer creation', 'wps-pos-i18n' ); ?>" href="<?php echo admin_url( 'admin-ajax.php?action=wpspos-customer-quick-creation&_wpnonce=' . wp_create_nonce( 'wps-customer-quick-nonce' ) . '&width=550&height=600&customer_set_id=' . $attribute_set_id ); ?>"><?php _e('Create a customer', 'wps-pos-i18n'); ?></a> |
|
19 | -<button type="button" class="wps-bton-third-mini-rounded alignright" id="wps-pos-change-customer" ><?php _e( 'Change customer', 'wps-pos-i18n' ); ?></button> |
|
17 | +<?php _e('Customer selection', 'wps-pos-i18n'); ?> |
|
18 | +<a class="thickbox add-new-h2" title="<?php _e('New customer creation', 'wps-pos-i18n'); ?>" href="<?php echo admin_url('admin-ajax.php?action=wpspos-customer-quick-creation&_wpnonce=' . wp_create_nonce('wps-customer-quick-nonce') . '&width=550&height=600&customer_set_id=' . $attribute_set_id); ?>"><?php _e('Create a customer', 'wps-pos-i18n'); ?></a> |
|
19 | +<button type="button" class="wps-bton-third-mini-rounded alignright" id="wps-pos-change-customer" ><?php _e('Change customer', 'wps-pos-i18n'); ?></button> |
@@ -1,23 +1,23 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - $billing_option = get_option( 'wpshop_billing_address' ); |
|
3 | - if( !empty( $billing_option ) && is_array( $billing_option ) ) { |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + $billing_option = get_option('wpshop_billing_address'); |
|
3 | + if (!empty($billing_option) && is_array($billing_option)) { |
|
4 | 4 | $attribute_set_id = $billing_option['choice']; |
5 | 5 | } else { |
6 | 6 | global $wpdb; |
7 | - $query = $wpdb->prepare( "SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", __( 'Billing address', 'wpshop' ) ); |
|
8 | - $attribute_set_id = $wpdb->get_var( $query ); |
|
9 | - if( empty( $attribute_set_id ) ) { |
|
7 | + $query = $wpdb->prepare("SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", __('Billing address', 'wpshop')); |
|
8 | + $attribute_set_id = $wpdb->get_var($query); |
|
9 | + if (empty($attribute_set_id)) { |
|
10 | 10 | global $wpdb; |
11 | - $query = $wpdb->prepare( "SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", 'Billing address' ); |
|
12 | - $attribute_set_id = $wpdb->get_var( $query ); |
|
11 | + $query = $wpdb->prepare("SELECT id FROM " . WPSHOP_DBT_ATTRIBUTE_SET . " WHERE name = %s", 'Billing address'); |
|
12 | + $attribute_set_id = $wpdb->get_var($query); |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | ?> |
16 | 16 | <tr> |
17 | 17 | <td> |
18 | - <?php _e( 'No user has been found for current search.', 'wps-pos-i18n' ); ?> |
|
18 | + <?php _e('No user has been found for current search.', 'wps-pos-i18n'); ?> |
|
19 | 19 | </td> |
20 | 20 | <td> |
21 | - <a class="thickbox wps-bton-third-rounded" title="<?php _e( 'New customer creation', 'wps-pos-i18n' ); ?>" href="<?php echo admin_url( 'admin-ajax.php?action=wps-customer-quick-creation&wps-nonce=' . wp_create_nonce( 'wps-customer-quick-nonce' ) . '&width=550&height=600&customer_set_id=' . $attribute_set_id ); ?>"><?php _e('Create a customer', 'wps-pos-i18n'); ?></a> |
|
21 | + <a class="thickbox wps-bton-third-rounded" title="<?php _e('New customer creation', 'wps-pos-i18n'); ?>" href="<?php echo admin_url('admin-ajax.php?action=wps-customer-quick-creation&wps-nonce=' . wp_create_nonce('wps-customer-quick-nonce') . '&width=550&height=600&customer_set_id=' . $attribute_set_id); ?>"><?php _e('Create a customer', 'wps-pos-i18n'); ?></a> |
|
22 | 22 | </td> |
23 | 23 | </tr> |
24 | 24 | \ No newline at end of file |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | $billing_option = get_option( 'wpshop_billing_address' ); |
3 | 5 | if( !empty( $billing_option ) && is_array( $billing_option ) ) { |
4 | 6 | $attribute_set_id = $billing_option['choice']; |
@@ -1,13 +1,13 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wpspos-customer wpspos-customer-selected-container" > |
4 | 4 | <?php |
5 | 5 | /** Vérification du choix d'un client pour la commande en cours / Check if there is a customer already selected for current order */ |
6 | - if ( !empty( $_SESSION ) && !empty( $_SESSION[ 'cart' ] ) && !empty( $_SESSION[ 'cart' ][ 'customer_id' ] ) ) { |
|
7 | - $this->display_selected_customer( $_SESSION[ 'cart' ][ 'customer_id' ] ); |
|
6 | + if (!empty($_SESSION) && !empty($_SESSION['cart']) && !empty($_SESSION['cart']['customer_id'])) { |
|
7 | + $this->display_selected_customer($_SESSION['cart']['customer_id']); |
|
8 | 8 | } |
9 | 9 | else { |
10 | - $response[ 'output' ] = __( 'No customer has been selected, please choose a customer or create a new one before try to create a new order', 'wps-pos-i18n' ); |
|
10 | + $response['output'] = __('No customer has been selected, please choose a customer or create a new one before try to create a new order', 'wps-pos-i18n'); |
|
11 | 11 | } |
12 | 12 | ?> |
13 | 13 | </div> |
@@ -1,12 +1,13 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <div class="wpspos-customer wpspos-customer-selected-container" > |
4 | 6 | <?php |
5 | 7 | /** Vérification du choix d'un client pour la commande en cours / Check if there is a customer already selected for current order */ |
6 | 8 | if ( !empty( $_SESSION ) && !empty( $_SESSION[ 'cart' ] ) && !empty( $_SESSION[ 'cart' ][ 'customer_id' ] ) ) { |
7 | 9 | $this->display_selected_customer( $_SESSION[ 'cart' ][ 'customer_id' ] ); |
8 | - } |
|
9 | - else { |
|
10 | + } else { |
|
10 | 11 | $response[ 'output' ] = __( 'No customer has been selected, please choose a customer or create a new one before try to create a new order', 'wps-pos-i18n' ); |
11 | 12 | } |
12 | 13 | ?> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <table class="table table-striped wps-pos-element-table" > |
4 | 4 | <tr> |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | <th><?php _e('Action', 'wps-pos-i18n'); ?></th> |
7 | 7 | </tr> |
8 | 8 | |
9 | - <?php foreach ( $customer_list as $customer ) : ?> |
|
10 | - <?php require( wpshop_tools::get_template_part( WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend/customers', 'customer' ) ); ?> |
|
9 | + <?php foreach ($customer_list as $customer) : ?> |
|
10 | + <?php require(wpshop_tools::get_template_part(WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend/customers', 'customer')); ?> |
|
11 | 11 | <?php endforeach; ?> |
12 | 12 | |
13 | - <?php if ( empty( $customer_list ) || ( 1 >= count( $customer_list ) ) ) : ?> |
|
14 | - <?php require( wpshop_tools::get_template_part( WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend/customers', 'customer', 'not_found' ) ); ?> |
|
13 | + <?php if (empty($customer_list) || (1 >= count($customer_list))) : ?> |
|
14 | + <?php require(wpshop_tools::get_template_part(WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend/customers', 'customer', 'not_found')); ?> |
|
15 | 15 | <?php endif; ?> |
16 | 16 | </table> |
17 | 17 | \ No newline at end of file |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <table class="table table-striped wps-pos-element-table" > |
4 | 6 | <tr> |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <button id="seller_stats" class="wps-bton-second-rounded"><i class="dashicons dashicons-chart-line" ></i><?php _e('Access to seller\'s Stats', 'wps-pos-i18n')?></button> |
4 | 4 | <button id="shop_return" class="wps-bton-third-rounded"><i class="dashicons dashicons-undo" ></i><?php _e('Make a return', 'wps-pos-i18n')?></button> |
5 | 5 | \ No newline at end of file |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <button id="seller_stats" class="wps-bton-second-rounded"><i class="dashicons dashicons-chart-line" ></i><?php _e('Access to seller\'s Stats', 'wps-pos-i18n')?></button> |
4 | 6 | <button id="shop_return" class="wps-bton-third-rounded"><i class="dashicons dashicons-undo" ></i><?php _e('Make a return', 'wps-pos-i18n')?></button> |
5 | 7 | \ No newline at end of file |