@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Plugin database options |
4 | 4 | * |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,22 +1,22 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-pos-element-metabox-selection wps-pos-element-metabox-selection-product" > |
4 | - <input type="text" value="" data-nonce="<?php echo wp_create_nonce( 'ajax_pos_product_search' ); ?>" placeholder="<?php _e( 'Start typing here for product search', 'wps-pos-i18n' ); ?>" name="wps-pos-product-to-choose" class="wps-pos-product-search" /> |
|
4 | + <input type="text" value="" data-nonce="<?php echo wp_create_nonce('ajax_pos_product_search'); ?>" placeholder="<?php _e('Start typing here for product search', 'wps-pos-i18n'); ?>" name="wps-pos-product-to-choose" class="wps-pos-product-search" /> |
|
5 | 5 | <button class="wps-bton-first-rounded" id="wpspos-product-search" ><i class="dashicons dashicons-search" ></i></button> |
6 | 6 | |
7 | 7 | <label style="margin-left: 50px;" > |
8 | 8 | <?php |
9 | 9 | $only_barcode = ''; |
10 | 10 | $option = 'wps_pos_options'; |
11 | - $values = get_option( $option ); |
|
12 | - if( empty( $values['only_barcode'] ) || $values['only_barcode'] == 'checked' ) { |
|
11 | + $values = get_option($option); |
|
12 | + if (empty($values['only_barcode']) || $values['only_barcode'] == 'checked') { |
|
13 | 13 | $only_barcode = 'checked="checked"'; |
14 | 14 | } |
15 | 15 | ?> |
16 | - <input data-nonce="<?php echo wp_create_nonce( 'ajax_save_config_barcode_only' ); ?>" type="checkbox" value="only_barcode" name="wps-pos-search-in" <?php echo $only_barcode; ?> /> |
|
17 | - <?php _e( 'Search only in barcode', 'wps-pos-i18n' ); ?> |
|
16 | + <input data-nonce="<?php echo wp_create_nonce('ajax_save_config_barcode_only'); ?>" type="checkbox" value="only_barcode" name="wps-pos-search-in" <?php echo $only_barcode; ?> /> |
|
17 | + <?php _e('Search only in barcode', 'wps-pos-i18n'); ?> |
|
18 | 18 | </label> |
19 | 19 | </div> |
20 | 20 | <div class="wps-pos-product-selection-alert-box wps-alert hidden" ></div> |
21 | -<div class="wps-pos-element-listing-container wps-pos-product-listing wps-bloc-loader" ><?php echo $this->get_product_table_by_alphabet( $letters_having_products[ 0 ] ); ?></div> |
|
22 | -<div class="wps-pos-alphabet-container" ><?php echo wps_pos_tools::alphabet_letters( 'product', $available_letters, $letters_having_products[ 0 ] ); ?></div> |
|
21 | +<div class="wps-pos-element-listing-container wps-pos-product-listing wps-bloc-loader" ><?php echo $this->get_product_table_by_alphabet($letters_having_products[0]); ?></div> |
|
22 | +<div class="wps-pos-alphabet-container" ><?php echo wps_pos_tools::alphabet_letters('product', $available_letters, $letters_having_products[0]); ?></div> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,10 +1,10 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | - <tr data-nonce="<?php echo wp_create_nonce( 'ajax_pos_product_variation_selection' ); ?>" class="wps-pos-addon-product wps-pos-addon-product-line" data-id="<?php echo $product['ID']; ?>" data-subtype="<?php echo ( !empty( $product_variation_definition ) ? 'variations' : 'simple' ); ?>" > |
|
4 | - <td>#<?php echo $product['ID']; ?> - <?php echo $product['product_name']; ?><br/><?php _e('Barcode', 'wps-pos-i18n'); ?> : <?php echo $product['product_barcode'];?></td> |
|
5 | - <td class="wpshop_pos_addon_price"><?php echo wpshop_prices::get_product_price( $product_data, 'price_display', 'complete_sheet'); ?></td> |
|
3 | + <tr data-nonce="<?php echo wp_create_nonce('ajax_pos_product_variation_selection'); ?>" class="wps-pos-addon-product wps-pos-addon-product-line" data-id="<?php echo $product['ID']; ?>" data-subtype="<?php echo (!empty($product_variation_definition) ? 'variations' : 'simple'); ?>" > |
|
4 | + <td>#<?php echo $product['ID']; ?> - <?php echo $product['product_name']; ?><br/><?php _e('Barcode', 'wps-pos-i18n'); ?> : <?php echo $product['product_barcode']; ?></td> |
|
5 | + <td class="wpshop_pos_addon_price"><?php echo wpshop_prices::get_product_price($product_data, 'price_display', 'complete_sheet'); ?></td> |
|
6 | 6 | <td> |
7 | - <!-- <a class="wps-pos-product-edition-link" target="wps_pos_product_edition" title="<?php _e( 'Edit this product', 'wps-pos-i18n' ); ?>" href="<?php echo admin_url( 'post.php?post=' . $product['ID'] . '&action=edit'); ?>" ><i class="dashicons dashicons-edit" ></i></a> --> |
|
8 | - <button class="wps-bton-first-rounded wps-pos-add-to-cart-button" type="button" data-type="product" data-subtype="<?php echo ( !empty( $product_variation_definition ) ? 'variations' : 'simple' ); ?>" data-id="<?php echo $product['ID']; ?>" > <i class="dashicons dashicons-cart" title="<?php _e( 'Choose this product', 'wps-pos-i18n' ); ?>" ></i></button> |
|
7 | + <!-- <a class="wps-pos-product-edition-link" target="wps_pos_product_edition" title="<?php _e('Edit this product', 'wps-pos-i18n'); ?>" href="<?php echo admin_url('post.php?post=' . $product['ID'] . '&action=edit'); ?>" ><i class="dashicons dashicons-edit" ></i></a> --> |
|
8 | + <button class="wps-bton-first-rounded wps-pos-add-to-cart-button" type="button" data-type="product" data-subtype="<?php echo (!empty($product_variation_definition) ? 'variations' : 'simple'); ?>" data-id="<?php echo $product['ID']; ?>" > <i class="dashicons dashicons-cart" title="<?php _e('Choose this product', 'wps-pos-i18n'); ?>" ></i></button> |
|
9 | 9 | </td> |
10 | 10 | </tr> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -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,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -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> |
@@ -8,10 +8,10 @@ discard block |
||
8 | 8 | </tr> |
9 | 9 | <tr> |
10 | 10 | <td colspan="2" > |
11 | - <?php _e( 'No product has been found for current search.', 'wps-pos-i18n' ); ?> |
|
11 | + <?php _e('No product has been found for current search.', 'wps-pos-i18n'); ?> |
|
12 | 12 | </td> |
13 | 13 | <td> |
14 | - <a class="thickbox wps-bton-third-rounded" 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> |
|
14 | + <a class="thickbox wps-bton-third-rounded" 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> |
|
15 | 15 | </td> |
16 | 16 | </tr> |
17 | 17 | </table> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,8 +1,8 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<div class="wps-pos-element-metabox-selection wps-pos-element-metabox-selection-customer" ><input type="text" value="" placeholder="<?php _e( 'Start typing here for customer search', 'wps-pos-i18n' ); ?>" data-nonce="<?php echo wp_create_nonce( 'ajax_pos_customer_search' ); ?>" name="wps-pos-customer-to-choose" class="wps-pos-customer-search" /></div> |
|
4 | -<div class="wps-pos-element-listing-container wps-pos-customer-listing wps-bloc-loader" ><?php echo $this->display_customer_list( 'A' ); ?></div> |
|
5 | -<div class="wps-pos-alphabet-container" ><?php echo wps_pos_tools::alphabet_letters( 'customer', $available_letters, 'A' ); ?></div> |
|
3 | +<div class="wps-pos-element-metabox-selection wps-pos-element-metabox-selection-customer" ><input type="text" value="" placeholder="<?php _e('Start typing here for customer search', 'wps-pos-i18n'); ?>" data-nonce="<?php echo wp_create_nonce('ajax_pos_customer_search'); ?>" name="wps-pos-customer-to-choose" class="wps-pos-customer-search" /></div> |
|
4 | +<div class="wps-pos-element-listing-container wps-pos-customer-listing wps-bloc-loader" ><?php echo $this->display_customer_list('A'); ?></div> |
|
5 | +<div class="wps-pos-alphabet-container" ><?php echo wps_pos_tools::alphabet_letters('customer', $available_letters, 'A'); ?></div> |
|
6 | 6 | <script type="text/javascript" > |
7 | 7 | jQuery( document ).ready( function(){ |
8 | 8 | jQuery( "#wps-pos-customer-list-choice" ).chosen(); |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,11 +1,11 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | - <tr data-nonce="<?php echo wp_create_nonce( 'ajax_pos_customer_choice' ); ?>" class="wps-pos-addon-customer-line <?php echo ( ( $customer['last_name'] == __('Default', 'wps-pos-i18n') ) && ( $customer['first_name'] == __('Customer', 'wps-pos-i18n') ) ? 'info' : '' ); ?>" data-id="<?php echo $customer['ID']; ?>" > |
|
3 | + <tr data-nonce="<?php echo wp_create_nonce('ajax_pos_customer_choice'); ?>" class="wps-pos-addon-customer-line <?php echo (($customer['last_name'] == __('Default', 'wps-pos-i18n')) && ($customer['first_name'] == __('Customer', 'wps-pos-i18n')) ? 'info' : ''); ?>" data-id="<?php echo $customer['ID']; ?>" > |
|
4 | 4 | <td> |
5 | 5 | <?php echo $customer['last_name']; ?> <?php echo $customer['first_name']; ?><br/> |
6 | 6 | <strong><?php _e('E-mail')?> : </strong><?php echo $customer['email']; ?> |
7 | 7 | </td> |
8 | 8 | <td> |
9 | - <button class="wps-bton-first-rounded wps-pos-addon-choose-customer" type="button" data-type="customer" data-id="<?php echo $customer['ID']; ?>" ><i class="dashicons dashicons-businessman" title="<?php _e( 'Choose this customer', 'wps-pos-i18n' ); ?>" ></i></button> |
|
9 | + <button class="wps-bton-first-rounded wps-pos-addon-choose-customer" type="button" data-type="customer" data-id="<?php echo $customer['ID']; ?>" ><i class="dashicons dashicons-businessman" title="<?php _e('Choose this customer', 'wps-pos-i18n'); ?>" ></i></button> |
|
10 | 10 | </td> |
11 | 11 | </tr> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -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,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Fichier de définition du modèle des taxinomies / File for term model definition |
4 | 6 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | $billing_option = get_option( 'wpshop_billing_address' ); |
4 | 4 | if( !empty( $billing_option ) && is_array( $billing_option ) ) { |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | <span class="dashicons dashicons-businessman"></span> |
18 | -<?php _e( 'Selected customer', 'wps-pos-i18n' ); ?> |
|
19 | -<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> |
|
18 | +<?php _e('Selected customer', 'wps-pos-i18n'); ?> |
|
19 | +<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> |
|
20 | 20 | |
21 | -<button class="wps-bton-second-mini-rounded wpspos-continue-using-selected-customer alignright" ><?php _e( 'Cancel', 'wps-pos-i18n' ); ?></button> |
|
22 | -<button type="button" class="wps-bton-third-mini-rounded alignright" id="wps-pos-change-customer" ><?php _e( 'Change customer', 'wps-pos-i18n' ); ?></button> |
|
21 | +<button class="wps-bton-second-mini-rounded wpspos-continue-using-selected-customer alignright" ><?php _e('Cancel', 'wps-pos-i18n'); ?></button> |
|
22 | +<button type="button" class="wps-bton-third-mini-rounded alignright" id="wps-pos-change-customer" ><?php _e('Change customer', 'wps-pos-i18n'); ?></button> |