@@ -1,3 +1,3 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; ?> |
|
1 | +<?php if (!defined('ABSPATH')) exit; ?> |
|
2 | 2 | |
3 | 3 | <img style="float: left; width: <?php echo $size; ?>" src="<?php echo $url_thumbnail; ?>" /> |
4 | 4 | \ No newline at end of file |
@@ -1,3 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; ?> |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
4 | +?> |
|
2 | 5 | |
3 | 6 | <img style="float: left; width: <?php echo $size; ?>" src="<?php echo $url_thumbnail; ?>" /> |
4 | 7 | \ No newline at end of file |
@@ -1,6 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div id="product_related"> |
4 | - <?php if ( empty( $atts ) || empty( $atts[ 'with_title' ] ) || ( 'yes' == $atts[ 'with_title' ] ) ) : ?><h3><?php _e( 'Related products', 'wpshop'); ?></h3><?php endif; ?> |
|
4 | + <?php if (empty($atts) || empty($atts['with_title']) || ('yes' == $atts['with_title'])) : ?><h3><?php _e('Related products', 'wpshop'); ?></h3><?php endif; ?> |
|
5 | 5 | <?php echo $related_product_output; ?> |
6 | 6 | </div> |
7 | 7 | \ 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 | <div id="product_related"> |
4 | 6 | <?php if ( empty( $atts ) || empty( $atts[ 'with_title' ] ) || ( 'yes' == $atts[ 'with_title' ] ) ) : ?><h3><?php _e( 'Related products', 'wpshop'); ?></h3><?php endif; ?> |
@@ -1,6 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - if( !empty($discount_data['type']) && ( $discount_data['type'] == 'discount_amount' || $discount_data['type'] == 'discount_rate' ) ) : ?> |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + if (!empty($discount_data['type']) && ($discount_data['type'] == 'discount_amount' || $discount_data['type'] == 'discount_rate')) : ?> |
|
3 | 3 | <span class="wps-badge-big-bottomLeft-rouge"> |
4 | - -<?php echo wpshop_tools::formate_number( $discount_data['value'] )?><?php echo ( ($discount_data['type'] == 'discount_amount') ? wpshop_tools::wpshop_get_currency(false) : '<span>%</span>' ) ?> |
|
4 | + -<?php echo wpshop_tools::formate_number($discount_data['value'])?><?php echo (($discount_data['type'] == 'discount_amount') ? wpshop_tools::wpshop_get_currency(false) : '<span>%</span>') ?> |
|
5 | 5 | </span> |
6 | 6 | <?php endif; ?> |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | if( !empty($discount_data['type']) && ( $discount_data['type'] == 'discount_amount' || $discount_data['type'] == 'discount_rate' ) ) : ?> |
3 | 5 | <span class="wps-badge-big-bottomLeft-rouge"> |
4 | 6 | -<?php echo wpshop_tools::formate_number( $discount_data['value'] )?><?php echo ( ($discount_data['type'] == 'discount_amount') ? wpshop_tools::wpshop_get_currency(false) : '<span>%</span>' ) ?> |
@@ -1,4 +1,4 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <style type="text/css"> |
4 | 4 | table.page_header { |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <style type="text/css"> |
4 | 6 | table.page_header { |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <p><?php _e( 'Number of inconsistent product : ', 'wps_product' ); echo $inconsistent_product_number; ?></p> |
4 | 6 |
@@ -1,24 +1,24 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<p><?php _e( 'Number of inconsistent product : ', 'wps_product' ); echo $inconsistent_product_number; ?></p> |
|
3 | +<p><?php _e('Number of inconsistent product : ', 'wps_product'); echo $inconsistent_product_number; ?></p> |
|
4 | 4 | |
5 | 5 | |
6 | 6 | <form class="wps-product-check-data-form" action="<?php echo admin_url('admin-ajax.php'); ?>" method="post"> |
7 | - <?php wp_nonce_field( 'ajax_save_product_price' ); ?> |
|
7 | + <?php wp_nonce_field('ajax_save_product_price'); ?> |
|
8 | 8 | <table> |
9 | 9 | <tr> |
10 | 10 | <th>ID</th> |
11 | - <th><?php _e( 'Product name', 'wps_product' ); ?></th> |
|
12 | - <th><?php _e( 'Attribute price', 'wps_product' ); ?></th> |
|
13 | - <th><?php _e( 'Meta : _product_price', 'wps_product' ); ?></th> |
|
14 | - <th><?php _e( 'Meta : _wps_price_infos', 'wps_product' ); ?></th> |
|
15 | - <th><?php _e( 'Meta : _wpshop_displayed_price', 'wps_product' ); ?></th> |
|
16 | - <th><?php _e( 'Meta : _wpshop_product_metadata', 'wps_product' ); ?></th> |
|
17 | - <th><?php _e( 'Fix the value', 'wps_product' ); ?></th> |
|
11 | + <th><?php _e('Product name', 'wps_product'); ?></th> |
|
12 | + <th><?php _e('Attribute price', 'wps_product'); ?></th> |
|
13 | + <th><?php _e('Meta : _product_price', 'wps_product'); ?></th> |
|
14 | + <th><?php _e('Meta : _wps_price_infos', 'wps_product'); ?></th> |
|
15 | + <th><?php _e('Meta : _wpshop_displayed_price', 'wps_product'); ?></th> |
|
16 | + <th><?php _e('Meta : _wpshop_product_metadata', 'wps_product'); ?></th> |
|
17 | + <th><?php _e('Fix the value', 'wps_product'); ?></th> |
|
18 | 18 | </tr> |
19 | 19 | <?php |
20 | - if( !empty( $list_product ) ): |
|
21 | - foreach( $list_product as $product ): |
|
20 | + if (!empty($list_product)): |
|
21 | + foreach ($list_product as $product): |
|
22 | 22 | ?> |
23 | 23 | <tr> |
24 | 24 | <td><?php echo $product->ID; ?></td> |
@@ -35,5 +35,5 @@ discard block |
||
35 | 35 | ?> |
36 | 36 | </table> |
37 | 37 | |
38 | - <input class="button-primary wps-product-submit-form" name="Submit" type="submit" value="<?php _e( 'Save changes', 'wps_product'); ?>" /> |
|
38 | + <input class="button-primary wps-product-submit-form" name="Submit" type="submit" value="<?php _e('Save changes', 'wps_product'); ?>" /> |
|
39 | 39 | </form> |
@@ -1,17 +1,17 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | -DEFINE( 'WPS_PRODUCT_VERSION', '2.0' ); |
|
4 | -DEFINE( 'WPS_PRODUCT_DIR', basename(dirname(__FILE__))); |
|
5 | -DEFINE( 'WPS_PRODUCT_PATH', dirname( __FILE__ ) ); |
|
6 | -DEFINE( 'WPS_PRODUCT_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', str_replace( "\\", "/", WPS_PRODUCT_PATH ) ) ); |
|
3 | +DEFINE('WPS_PRODUCT_VERSION', '2.0'); |
|
4 | +DEFINE('WPS_PRODUCT_DIR', basename(dirname(__FILE__))); |
|
5 | +DEFINE('WPS_PRODUCT_PATH', dirname(__FILE__)); |
|
6 | +DEFINE('WPS_PRODUCT_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', str_replace("\\", "/", WPS_PRODUCT_PATH))); |
|
7 | 7 | |
8 | 8 | /** Define the templates directories */ |
9 | -DEFINE( 'WPS_PRODUCT_TEMPLATES_MAIN_DIR', WPS_PRODUCT_PATH . '/templates/'); |
|
9 | +DEFINE('WPS_PRODUCT_TEMPLATES_MAIN_DIR', WPS_PRODUCT_PATH . '/templates/'); |
|
10 | 10 | |
11 | -include( plugin_dir_path( __FILE__ ).'/model/wps_product_mdl.php' ); |
|
12 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_product_ctr.php' ); |
|
13 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_product_ajax_ctr.01.php' ); |
|
14 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_product_administration_ctr.php' ); |
|
11 | +include(plugin_dir_path(__FILE__) . '/model/wps_product_mdl.php'); |
|
12 | +include(plugin_dir_path(__FILE__) . '/controller/wps_product_ctr.php'); |
|
13 | +include(plugin_dir_path(__FILE__) . '/controller/wps_product_ajax_ctr.01.php'); |
|
14 | +include(plugin_dir_path(__FILE__) . '/controller/wps_product_administration_ctr.php'); |
|
15 | 15 | |
16 | 16 | $wps_product = new wps_product_ctr(); |
17 | 17 | $wps_product->install_modules(); |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | |
3 | 5 | DEFINE( 'WPS_PRODUCT_VERSION', '2.0' ); |
4 | 6 | DEFINE( 'WPS_PRODUCT_DIR', basename(dirname(__FILE__))); |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Main controller file for product mass modification module |
4 | 6 | * |
@@ -51,8 +53,7 @@ discard block |
||
51 | 53 | global $wpdb; |
52 | 54 | if ( $letter == 'all' ) { |
53 | 55 | $query = $wpdb->prepare( 'SELECT ID, post_title FROM ' .$wpdb->posts. ' WHERE post_status = %s AND post_type = %s ORDER BY post_title ASC', 'publish', WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT ); |
54 | - } |
|
55 | - else { |
|
56 | + } else { |
|
56 | 57 | $query = $wpdb->prepare( 'SELECT ID, post_title FROM ' .$wpdb->posts. ' WHERE post_status = %s AND post_type = %s AND post_title LIKE %s ORDER BY post_title ASC', 'publish', WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT, $letter.'%'); |
57 | 58 | } |
58 | 59 | $products = $wpdb->get_results( $query ); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | /** |
3 | 3 | * Main controller file for product mass modification module |
4 | 4 | * |
@@ -21,18 +21,18 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @return array |
23 | 23 | */ |
24 | - function get_product_atts_def( $product_id ) { |
|
25 | - $product_entity_id = wpshop_entities::get_entity_identifier_from_code( WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT ); |
|
26 | - $element_atribute_list = wpshop_attributes::getElementWithAttributeAndValue( $product_entity_id, $product_id, WPSHOP_CURRENT_LOCALE, '', 'frontend' ); |
|
24 | + function get_product_atts_def($product_id) { |
|
25 | + $product_entity_id = wpshop_entities::get_entity_identifier_from_code(WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT); |
|
26 | + $element_atribute_list = wpshop_attributes::getElementWithAttributeAndValue($product_entity_id, $product_id, WPSHOP_CURRENT_LOCALE, '', 'frontend'); |
|
27 | 27 | |
28 | 28 | $one_product = get_post_meta($product_id, WPSHOP_PRODUCT_FRONT_DISPLAY_CONF, true); |
29 | - if(!empty($one_product)) { |
|
29 | + if (!empty($one_product)) { |
|
30 | 30 | $array1 = (!empty($one_product['attribute_set_section'])) ? $one_product['attribute_set_section'] : array(); |
31 | 31 | $array2 = $element_atribute_list[$product_id]; |
32 | 32 | unset($element_atribute_list); |
33 | - foreach($array2 as $key => $attribute_set_section) { |
|
34 | - foreach($array1 as $code1 => $value){ |
|
35 | - if($code1 == $attribute_set_section['code']) { |
|
33 | + foreach ($array2 as $key => $attribute_set_section) { |
|
34 | + foreach ($array1 as $code1 => $value) { |
|
35 | + if ($code1 == $attribute_set_section['code']) { |
|
36 | 36 | $element_atribute_list[$product_id][$key] = $attribute_set_section; |
37 | 37 | } |
38 | 38 | } |
@@ -47,38 +47,38 @@ discard block |
||
47 | 47 | * @param integer $letter |
48 | 48 | * @return array |
49 | 49 | */ |
50 | - function get_products_by_letter( $letter = 'a' ) { |
|
50 | + function get_products_by_letter($letter = 'a') { |
|
51 | 51 | global $wpdb; |
52 | - if ( $letter == 'all' ) { |
|
53 | - $query = $wpdb->prepare( 'SELECT ID, post_title FROM ' .$wpdb->posts. ' WHERE post_status = %s AND post_type = %s ORDER BY post_title ASC', 'publish', WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT ); |
|
52 | + if ($letter == 'all') { |
|
53 | + $query = $wpdb->prepare('SELECT ID, post_title FROM ' . $wpdb->posts . ' WHERE post_status = %s AND post_type = %s ORDER BY post_title ASC', 'publish', WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT); |
|
54 | 54 | } |
55 | 55 | else { |
56 | - $query = $wpdb->prepare( 'SELECT ID, post_title FROM ' .$wpdb->posts. ' WHERE post_status = %s AND post_type = %s AND post_title LIKE %s ORDER BY post_title ASC', 'publish', WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT, $letter.'%'); |
|
56 | + $query = $wpdb->prepare('SELECT ID, post_title FROM ' . $wpdb->posts . ' WHERE post_status = %s AND post_type = %s AND post_title LIKE %s ORDER BY post_title ASC', 'publish', WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT, $letter . '%'); |
|
57 | 57 | } |
58 | - $products = $wpdb->get_results( $query ); |
|
58 | + $products = $wpdb->get_results($query); |
|
59 | 59 | return $products; |
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
63 | 63 | * Return Products by a search |
64 | 64 | */ |
65 | - function get_products_by_title_or_barcode( $search, $only_barcode = false ) { |
|
65 | + function get_products_by_title_or_barcode($search, $only_barcode = false) { |
|
66 | 66 | global $wpdb; |
67 | 67 | $more_query = ""; |
68 | 68 | $query_args = array(); |
69 | 69 | $query_args[] = WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT; |
70 | 70 | $query_args[] = $search; |
71 | - if ( !( (bool) $only_barcode ) ) { |
|
71 | + if (!((bool)$only_barcode)) { |
|
72 | 72 | $more_query = " OR P.post_title LIKE %s"; |
73 | 73 | $query_args[] = '%' . $search . '%'; |
74 | 74 | } |
75 | - $query = $wpdb->prepare( " |
|
75 | + $query = $wpdb->prepare(" |
|
76 | 76 | SELECT * |
77 | 77 | FROM {$wpdb->posts} AS P |
78 | 78 | LEFT JOIN {$wpdb->postmeta} AS PM ON ( PM.post_id = P.ID ) |
79 | 79 | WHERE P.post_type = %s |
80 | 80 | AND ( ( PM.meta_key = '_barcode' AND PM.meta_value = %s ) " . $more_query . " ) |
81 | - GROUP BY P.ID", $query_args ); |
|
82 | - return $wpdb->get_results( $query ); |
|
81 | + GROUP BY P.ID", $query_args); |
|
82 | + return $wpdb->get_results($query); |
|
83 | 83 | } |
84 | 84 | } |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <form id="wps_product_quick_add_form" method="post" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" > |
4 | 6 | <input type="hidden" name="action" value="wps-product-quick-add"> |
@@ -1,14 +1,14 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<form id="wps_product_quick_add_form" method="post" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" > |
|
3 | +<form id="wps_product_quick_add_form" method="post" action="<?php echo admin_url('admin-ajax.php'); ?>" > |
|
4 | 4 | <input type="hidden" name="action" value="wps-product-quick-add"> |
5 | - <?php wp_nonce_field( 'create_product' ); ?> |
|
5 | + <?php wp_nonce_field('create_product'); ?> |
|
6 | 6 | <div class="wps-boxed" style="margin-top:10px;" > |
7 | - <span class="wps-h5"><?php _e( 'Product', 'wpshop'); ?></span> |
|
7 | + <span class="wps-h5"><?php _e('Product', 'wpshop'); ?></span> |
|
8 | 8 | |
9 | 9 | <div class="wpshop_cls" > |
10 | 10 | <div class="wpshop_form_label _product_title_label alignleft" > |
11 | - <label for="attribute_product_title" ><?php _e( 'Product name', 'wpshop'); ?> <span class="wpshop_required" >*</span></label> |
|
11 | + <label for="attribute_product_title" ><?php _e('Product name', 'wpshop'); ?> <span class="wpshop_required" >*</span></label> |
|
12 | 12 | </div> |
13 | 13 | <div class="wpshop_form_input_element _product_title_input alignleft" > |
14 | 14 | <input type="text" name="post_title" id="post_title" value="" class="wpshop_product_attribute_post_title wpshop_attributes_display" required > |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | <div class="wpshop_cls" > |
19 | 19 | <div class="wpshop_form_label _description_label alignleft" > |
20 | - <label for="attribute_description" ><?php _e( 'Description', 'wpshop'); ?></label> |
|
20 | + <label for="attribute_description" ><?php _e('Description', 'wpshop'); ?></label> |
|
21 | 21 | </div> |
22 | 22 | <div class="wpshop_form_input_element _description_input alignleft" > |
23 | 23 | <textarea name="post_content" id="post_content" class="wpshop_product_post_content wpshop_attributes_display" rows="2"></textarea> |
@@ -27,35 +27,35 @@ discard block |
||
27 | 27 | |
28 | 28 | <?php |
29 | 29 | /** Get the attribute set list */ |
30 | - $attribute_set_list = wpshop_attributes_set::get_attribute_set_list_for_entity( wpshop_entities::get_entity_identifier_from_code( 'wpshop_product' ) ); |
|
30 | + $attribute_set_list = wpshop_attributes_set::get_attribute_set_list_for_entity(wpshop_entities::get_entity_identifier_from_code('wpshop_product')); |
|
31 | 31 | $default_set = 0; |
32 | - if ( 1 == count( $attribute_set_list ) ) { |
|
33 | - $default_set = $attribute_set_list[ 0 ]->id; |
|
32 | + if (1 == count($attribute_set_list)) { |
|
33 | + $default_set = $attribute_set_list[0]->id; |
|
34 | 34 | } |
35 | 35 | ?> |
36 | 36 | <?php /** Check if attribute set list is not empty in order to display a dropdown for sélection */ ?> |
37 | - <?php if ( !empty( $attribute_set_list ) && ( 1 < count( $attribute_set_list ) ) ) : ?> |
|
37 | + <?php if (!empty($attribute_set_list) && (1 < count($attribute_set_list))) : ?> |
|
38 | 38 | <div style=" width:80%; margin: 0 auto 10px auto; " > |
39 | - <?php _e( 'Product type to create', 'wpshop' ); ?> : |
|
40 | - <select name="wps-product-attribute-set" data-nonce="<?php echo wp_create_nonce( 'attribute_list_reload' ); ?>" > |
|
41 | - <?php foreach( $attribute_set_list as $attribute_set ) : ?> |
|
39 | + <?php _e('Product type to create', 'wpshop'); ?> : |
|
40 | + <select name="wps-product-attribute-set" data-nonce="<?php echo wp_create_nonce('attribute_list_reload'); ?>" > |
|
41 | + <?php foreach ($attribute_set_list as $attribute_set) : ?> |
|
42 | 42 | <?php $is_default_set = false; ?> |
43 | - <?php if ( !empty( $attribute_set->default_set ) && strtolower( __( 'Yes', 'wpshop' ) ) == strtolower( __( $attribute_set->default_set, 'wpshop' ) ) ) : ?> |
|
43 | + <?php if (!empty($attribute_set->default_set) && strtolower(__('Yes', 'wpshop')) == strtolower(__($attribute_set->default_set, 'wpshop'))) : ?> |
|
44 | 44 | <?php $is_default_set = true; ?> |
45 | 45 | <?php $default_set = $attribute_set->id; ?> |
46 | 46 | <?php endif; ?> |
47 | - <option value="<?php echo $attribute_set->id; ?>" <?php selected( ( !empty( $chosen_set ) ? true : $is_default_set ) , true, true ); ?> ><?php echo $attribute_set->name; ?></option> |
|
47 | + <option value="<?php echo $attribute_set->id; ?>" <?php selected((!empty($chosen_set) ? true : $is_default_set), true, true); ?> ><?php echo $attribute_set->name; ?></option> |
|
48 | 48 | <?php endforeach; ?> |
49 | 49 | </select> |
50 | 50 | </div> |
51 | 51 | <?php endif; ?> |
52 | 52 | |
53 | 53 | <?php /** If default set or if there is a selected set get existing attributes list for this set */ ?> |
54 | - <?php if ( !empty( $default_set ) || !empty( $chosen_set ) ) : ?> |
|
55 | - <?php $this->display_attribute( !empty( $chosen_set ) ? $chosen_set : ( !empty( $default_set ) ? $default_set : 0 ) ); ?> |
|
54 | + <?php if (!empty($default_set) || !empty($chosen_set)) : ?> |
|
55 | + <?php $this->display_attribute(!empty($chosen_set) ? $chosen_set : (!empty($default_set) ? $default_set : 0)); ?> |
|
56 | 56 | <?php endif; ?> |
57 | 57 | |
58 | - <button class="wps-bton-first-mini-rounded alignRight" ><?php _e( 'Add product', 'wpshop'); ?></button> |
|
58 | + <button class="wps-bton-first-mini-rounded alignRight" ><?php _e('Add product', 'wpshop'); ?></button> |
|
59 | 59 | </form> |
60 | 60 | <script type="text/javascript" > |
61 | 61 | jQuery( document ).ready( function() { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | } |
85 | 85 | if ( has_error ) { |
86 | - alert( wpshopConvertAccentTojs( "<?php _e( 'Please fill all fields mark as required', 'wpshop' ); ?>" ) ); |
|
86 | + alert( wpshopConvertAccentTojs( "<?php _e('Please fill all fields mark as required', 'wpshop'); ?>" ) ); |
|
87 | 87 | return false; |
88 | 88 | } |
89 | 89 | }, |
@@ -1,16 +1,16 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | -DEFINE( 'WPSPDTQUICK_VERSION', 1.0 ); |
|
4 | -DEFINE( 'WPSPDTQUICK_DIR', basename( dirname( __FILE__ ) ) ); |
|
5 | -DEFINE( 'WPSPDTQUICK_PATH', str_replace( "\\", "/", plugin_dir_path( __FILE__ ) ) ); |
|
6 | -DEFINE( 'WPSPDTQUICK_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPSPDTQUICK_PATH ) ); |
|
3 | +DEFINE('WPSPDTQUICK_VERSION', 1.0); |
|
4 | +DEFINE('WPSPDTQUICK_DIR', basename(dirname(__FILE__))); |
|
5 | +DEFINE('WPSPDTQUICK_PATH', str_replace("\\", "/", plugin_dir_path(__FILE__))); |
|
6 | +DEFINE('WPSPDTQUICK_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPSPDTQUICK_PATH)); |
|
7 | 7 | |
8 | 8 | /** Définition du chemin absolu vers les templates / Define the templates absolute directories */ |
9 | -DEFINE( 'WPSPDTQUICK_TEMPLATES_MAIN_DIR', WPSPDTQUICK_PATH . '/templates/'); |
|
9 | +DEFINE('WPSPDTQUICK_TEMPLATES_MAIN_DIR', WPSPDTQUICK_PATH . '/templates/'); |
|
10 | 10 | |
11 | 11 | |
12 | 12 | /** Inclusion des différents composants / Include plugin components */ |
13 | -require_once( WPSPDTQUICK_PATH . 'controller/wps_product_quick_add.ctr.php' ); |
|
13 | +require_once(WPSPDTQUICK_PATH . 'controller/wps_product_quick_add.ctr.php'); |
|
14 | 14 | /** Instanciation du controlleur principal / Main controller instanciation */ |
15 | 15 | $wps_product_quick_add = new wps_product_quick_add(); |
16 | 16 |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | |
3 | 5 | DEFINE( 'WPSPDTQUICK_VERSION', 1.0 ); |
4 | 6 | DEFINE( 'WPSPDTQUICK_DIR', basename( dirname( __FILE__ ) ) ); |