@@ -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,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,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,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(); |