@@ -1,16 +1,16 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <table class="wpshop_coupon_definition_table" > |
4 | 4 | <tr class="wpshop_coupon_definition_table_code_coupon_line" > |
5 | - <td class="wpshop_coupon_definition_table_label wpshop_coupon_definition_code_coupon_input_label" ><label for="coupon_code" ><?php _e('Coupon code','wpshop'); ?></label></td> |
|
5 | + <td class="wpshop_coupon_definition_table_label wpshop_coupon_definition_code_coupon_input_label" ><label for="coupon_code" ><?php _e('Coupon code', 'wpshop'); ?></label></td> |
|
6 | 6 | <td class="wpshop_coupon_definition_table_input wpshop_coupon_definition_code_coupon_input" ><input type="text" name="coupon_code" id="coupon_code" value="<?php echo $coupon_code; ?>" /></td> |
7 | 7 | </tr> |
8 | 8 | <tr class="wpshop_coupon_definition_table_code_type_line" > |
9 | - <td class="wpshop_coupon_definition_table_label wpshop_coupon_definition_coupon_type_amount_label" ><input type="radio" name="coupon_type" class="wpshop_coupon_type" id="coupon_type_amount" value="amount" <?php echo ( ($wpshop_coupon_discount_type=='amount') || empty($wpshop_coupon_discount_type) ? 'checked="checked"' : null ); ?> /><label for="coupon_type_amount" ><?php _e('Coupon discount amount','wpshop'); ?></label></td> |
|
10 | - <td class="wpshop_coupon_definition_table_input wpshop_coupon_definition_coupon_type_input" rowspan="2" ><input type="text" name="coupon_discount_amount" value="<?php echo $coupon_discount_amount; ?>" /><span class="wpshop_coupon_type_unit wpshop_coupon_type_unit_amount" > <?php echo ( ( (!empty($wpshop_coupon_discount_type) && $wpshop_coupon_discount_type == 'percent' ) ) ? '%' : wpshop_tools::wpshop_get_currency().' '.__('ATI', 'wpshop')); ?></span><span class="wpshopHide wpshop_coupon_type_unit wpshop_coupon_type_unit_percent" > % </span></td> |
|
9 | + <td class="wpshop_coupon_definition_table_label wpshop_coupon_definition_coupon_type_amount_label" ><input type="radio" name="coupon_type" class="wpshop_coupon_type" id="coupon_type_amount" value="amount" <?php echo (($wpshop_coupon_discount_type == 'amount') || empty($wpshop_coupon_discount_type) ? 'checked="checked"' : null); ?> /><label for="coupon_type_amount" ><?php _e('Coupon discount amount', 'wpshop'); ?></label></td> |
|
10 | + <td class="wpshop_coupon_definition_table_input wpshop_coupon_definition_coupon_type_input" rowspan="2" ><input type="text" name="coupon_discount_amount" value="<?php echo $coupon_discount_amount; ?>" /><span class="wpshop_coupon_type_unit wpshop_coupon_type_unit_amount" > <?php echo (((!empty($wpshop_coupon_discount_type) && $wpshop_coupon_discount_type == 'percent')) ? '%' : wpshop_tools::wpshop_get_currency() . ' ' . __('ATI', 'wpshop')); ?></span><span class="wpshopHide wpshop_coupon_type_unit wpshop_coupon_type_unit_percent" > % </span></td> |
|
11 | 11 | </tr> |
12 | 12 | <tr class="wpshop_coupon_definition_table_code_type_line" > |
13 | - <td class="wpshop_coupon_definition_table_label wpshop_coupon_definition_coupon_type_percent_label" ><input type="radio" name="coupon_type" id="coupon_type_percent" class="wpshop_coupon_type" value="percent" <?php echo ($wpshop_coupon_discount_type=='percent'?'checked="checked"':null); ?> /><label for="coupon_type_percent" ><?php _e('Coupon discount percent','wpshop'); ?></label></td> |
|
13 | + <td class="wpshop_coupon_definition_table_label wpshop_coupon_definition_coupon_type_percent_label" ><input type="radio" name="coupon_type" id="coupon_type_percent" class="wpshop_coupon_type" value="percent" <?php echo ($wpshop_coupon_discount_type == 'percent' ? 'checked="checked"' : null); ?> /><label for="coupon_type_percent" ><?php _e('Coupon discount percent', 'wpshop'); ?></label></td> |
|
14 | 14 | </tr> |
15 | 15 | <tr> |
16 | 16 | <td> |
@@ -24,12 +24,12 @@ discard block |
||
24 | 24 | 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS, |
25 | 25 | 'post_status' => 'draft', |
26 | 26 | ); |
27 | - $customers = get_posts( $args ); |
|
28 | - if ( !empty($customers) ) : |
|
29 | - foreach( $customers as $customer ) : |
|
30 | - $name = strtoupper( get_user_meta( $customer->post_author, 'last_name', true ) ).' '.get_user_meta( $customer->post_author, 'first_name', true ); |
|
27 | + $customers = get_posts($args); |
|
28 | + if (!empty($customers)) : |
|
29 | + foreach ($customers as $customer) : |
|
30 | + $name = strtoupper(get_user_meta($customer->post_author, 'last_name', true)) . ' ' . get_user_meta($customer->post_author, 'first_name', true); |
|
31 | 31 | ?> |
32 | - <option value="<?php echo $customer->post_author; ?>" <?php echo ( (!empty( $coupon_receiver) && is_array($coupon_receiver) && in_array($customer->post_author, $coupon_receiver)) ? 'selected="selected"' : '' ); ?>><?php echo $name; ?> ( <?php $user = get_userdata($customer->post_author); echo $user->user_email; ?> )</option> |
|
32 | + <option value="<?php echo $customer->post_author; ?>" <?php echo ((!empty($coupon_receiver) && is_array($coupon_receiver) && in_array($customer->post_author, $coupon_receiver)) ? 'selected="selected"' : ''); ?>><?php echo $name; ?> ( <?php $user = get_userdata($customer->post_author); echo $user->user_email; ?> )</option> |
|
33 | 33 | <?php |
34 | 34 | endforeach; |
35 | 35 | endif; |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | <label for="wpshop_coupon_mini_amount"><?php _e('Minimum order amount to use this coupon', 'wpshop'); ?></label> : |
54 | 54 | </td> |
55 | 55 | <td> |
56 | - <input type="text" name="wpshop_coupon_mini_amount" value="<?php echo ( (!empty($wpshop_coupon_minimum_amount) && !empty($wpshop_coupon_minimum_amount['amount']) ) ? $wpshop_coupon_minimum_amount['amount'] : ''); ?>" id="wpshop_coupon_mini_amount" /> <?php echo $default_currency; ?> |
|
56 | + <input type="text" name="wpshop_coupon_mini_amount" value="<?php echo ((!empty($wpshop_coupon_minimum_amount) && !empty($wpshop_coupon_minimum_amount['amount'])) ? $wpshop_coupon_minimum_amount['amount'] : ''); ?>" id="wpshop_coupon_mini_amount" /> <?php echo $default_currency; ?> |
|
57 | 57 | <select name="wpshop_coupon_min_mount_shipping_rule"> |
58 | - <option value="no_shipping_cost" <?php echo ( (!empty($wpshop_coupon_minimum_amount) && !empty($wpshop_coupon_minimum_amount['shipping_rule']) && $wpshop_coupon_minimum_amount['shipping_rule'] == 'no_shipping_cost') ? 'selected="selected"' : ''); ?>><?php _e('Without shipping cost', 'wpshop'); ?></option> |
|
59 | - <option value="shipping_cost" <?php echo ( (!empty($wpshop_coupon_minimum_amount) && !empty($wpshop_coupon_minimum_amount['shipping_rule']) && $wpshop_coupon_minimum_amount['shipping_rule'] == 'shipping_cost') ? 'selected="selected"' : ''); ?>><?php _e('With shipping cost', 'wpshop'); ?></option> |
|
58 | + <option value="no_shipping_cost" <?php echo ((!empty($wpshop_coupon_minimum_amount) && !empty($wpshop_coupon_minimum_amount['shipping_rule']) && $wpshop_coupon_minimum_amount['shipping_rule'] == 'no_shipping_cost') ? 'selected="selected"' : ''); ?>><?php _e('Without shipping cost', 'wpshop'); ?></option> |
|
59 | + <option value="shipping_cost" <?php echo ((!empty($wpshop_coupon_minimum_amount) && !empty($wpshop_coupon_minimum_amount['shipping_rule']) && $wpshop_coupon_minimum_amount['shipping_rule'] == 'shipping_cost') ? 'selected="selected"' : ''); ?>><?php _e('With shipping cost', 'wpshop'); ?></option> |
|
60 | 60 | </select> |
61 | 61 | <br/><?php _e('Leave empty if you want no limitation', 'wpshop'); ?> |
62 | 62 | </td> |
@@ -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 | class wps_coupon_model { |
3 | 3 | function __construct() { |
4 | 4 | |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @return array |
10 | 10 | */ |
11 | 11 | function get_coupons() { |
12 | - $coupons = get_posts( array( 'post_per_page' => -1, 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_COUPON, 'post_status' => 'publish' ) ); |
|
12 | + $coupons = get_posts(array('post_per_page' => -1, 'post_type' => WPSHOP_NEWTYPE_IDENTIFIER_COUPON, 'post_status' => 'publish')); |
|
13 | 13 | return $coupons; |
14 | 14 | } |
15 | 15 | |
@@ -17,16 +17,16 @@ discard block |
||
17 | 17 | * Save coupon custom datas on asave post action |
18 | 18 | * @param array $data |
19 | 19 | */ |
20 | - function save_coupons_informations( $data ) { |
|
21 | - if( !empty($data) ) { |
|
22 | - $amount_min_limit = array( 'amount' => ( ( !empty($data['wpshop_coupon_mini_amount']) ) ? $data['wpshop_coupon_mini_amount'] : null ), 'shipping_rule' => ( ( !empty($data['wpshop_coupon_min_mount_shipping_rule']) ) ? $data['wpshop_coupon_min_mount_shipping_rule'] : null ) ); |
|
20 | + function save_coupons_informations($data) { |
|
21 | + if (!empty($data)) { |
|
22 | + $amount_min_limit = array('amount' => ((!empty($data['wpshop_coupon_mini_amount'])) ? $data['wpshop_coupon_mini_amount'] : null), 'shipping_rule' => ((!empty($data['wpshop_coupon_min_mount_shipping_rule'])) ? $data['wpshop_coupon_min_mount_shipping_rule'] : null)); |
|
23 | 23 | update_post_meta($data['post_ID'], 'wpshop_coupon_code', $data['coupon_code']); |
24 | - update_post_meta($data['post_ID'], 'wpshop_coupon_discount_value', floatval( str_replace(',', '.',$data['coupon_discount_amount']) ) ); |
|
24 | + update_post_meta($data['post_ID'], 'wpshop_coupon_discount_value', floatval(str_replace(',', '.', $data['coupon_discount_amount']))); |
|
25 | 25 | update_post_meta($data['post_ID'], 'wpshop_coupon_discount_type', $data['coupon_type']); |
26 | - update_post_meta($data['post_ID'], 'wpshop_coupon_individual_use', $data['coupon_receiver'] ); |
|
26 | + update_post_meta($data['post_ID'], 'wpshop_coupon_individual_use', $data['coupon_receiver']); |
|
27 | 27 | update_post_meta($data['post_ID'], 'wpshop_coupon_product_ids', ''); |
28 | 28 | update_post_meta($data['post_ID'], 'wpshop_coupon_exclude_product_ids', ''); |
29 | - update_post_meta($data['post_ID'], 'wpshop_coupon_usage_limit', $data['coupon_usage_limit'] ); |
|
29 | + update_post_meta($data['post_ID'], 'wpshop_coupon_usage_limit', $data['coupon_usage_limit']); |
|
30 | 30 | update_post_meta($data['post_ID'], 'wpshop_coupon_start_date', ''); |
31 | 31 | update_post_meta($data['post_ID'], 'wpshop_coupon_expiry_date', ''); |
32 | 32 | update_post_meta($data['post_ID'], 'wpshop_coupon_apply_before_tax', ''); |
@@ -42,15 +42,15 @@ discard block |
||
42 | 42 | * @param integer $coupon_id |
43 | 43 | * @return array |
44 | 44 | */ |
45 | - function get_coupon_data( $coupon_id ) { |
|
45 | + function get_coupon_data($coupon_id) { |
|
46 | 46 | global $wpdb; |
47 | - $coupon_id = ( !empty($coupon_id) ) ? $coupon_id : ( !empty($_SESSION['cart']['coupon_id']) ) ? $_SESSION['cart']['coupon_id'] : null ; |
|
48 | - if( !empty($coupon_id) ) { |
|
49 | - $query = $wpdb->prepare('SELECT meta_key, meta_value FROM ' . $wpdb->postmeta . ' WHERE post_id = %d', $coupon_id ); |
|
47 | + $coupon_id = (!empty($coupon_id)) ? $coupon_id : (!empty($_SESSION['cart']['coupon_id'])) ? $_SESSION['cart']['coupon_id'] : null; |
|
48 | + if (!empty($coupon_id)) { |
|
49 | + $query = $wpdb->prepare('SELECT meta_key, meta_value FROM ' . $wpdb->postmeta . ' WHERE post_id = %d', $coupon_id); |
|
50 | 50 | $coupons = $wpdb->get_results($query, ARRAY_A); |
51 | 51 | $coupon = array(); |
52 | 52 | $coupon['coupon_id'] = $coupon_id; |
53 | - foreach($coupons as $coupon_info){ |
|
53 | + foreach ($coupons as $coupon_info) { |
|
54 | 54 | $coupon[$coupon_info['meta_key']] = $coupon_info['meta_value']; |
55 | 55 | } |
56 | 56 | return $coupon; |
@@ -59,16 +59,16 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** Save an historic of coupon usage */ |
62 | - function save_coupon_use( $coupon_id ) { |
|
63 | - $coupon_use = get_post_meta( $coupon_id, '_wpshop_coupon_usage', true); |
|
62 | + function save_coupon_use($coupon_id) { |
|
63 | + $coupon_use = get_post_meta($coupon_id, '_wpshop_coupon_usage', true); |
|
64 | 64 | $user_id = get_current_user_id(); |
65 | 65 | |
66 | - if ( !empty($coupon_use[$user_id]) ) { |
|
66 | + if (!empty($coupon_use[$user_id])) { |
|
67 | 67 | $coupon_use[$user_id] = $coupon_use[$user_id] + 1; |
68 | 68 | } |
69 | 69 | else { |
70 | 70 | $coupon_use[$user_id] = 1; |
71 | 71 | } |
72 | - update_post_meta( $coupon_id, '_wpshop_coupon_usage', $coupon_use); |
|
72 | + update_post_meta($coupon_id, '_wpshop_coupon_usage', $coupon_use); |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | \ No newline at end of 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 | * Fichier de gestion du modèle des taxinomies / File for term model management |
4 | 6 | * |
@@ -113,8 +115,7 @@ discard block |
||
113 | 115 | } |
114 | 116 | |
115 | 117 | return $object; |
116 | - } |
|
117 | - else { |
|
118 | + } else { |
|
118 | 119 | /** |
119 | 120 | * @todo return error when creation does not work |
120 | 121 | */ |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | 3 | /** |
4 | 4 | * WpShop Search bootstrap file |
@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | |
12 | 12 | /** Template Global vars **/ |
13 | 13 | DEFINE('WPS_SEARCH_DIR', basename(dirname(__FILE__))); |
14 | -DEFINE('WPS_SEARCH_PATH', str_replace( "\\", "/", str_replace( WPS_SEARCH_DIR, "", dirname( __FILE__ ) ) ) ); |
|
15 | -DEFINE('WPS_SEARCH_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPS_SEARCH_PATH ) ); |
|
14 | +DEFINE('WPS_SEARCH_PATH', str_replace("\\", "/", str_replace(WPS_SEARCH_DIR, "", dirname(__FILE__)))); |
|
15 | +DEFINE('WPS_SEARCH_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPS_SEARCH_PATH)); |
|
16 | 16 | |
17 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_filter_search.php' ); |
|
18 | -include( plugin_dir_path( __FILE__ ).'/controller/wpshop_entity_filter.php' ); |
|
19 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_order_search.php' ); |
|
20 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_customer_search.php' ); |
|
17 | +include(plugin_dir_path(__FILE__) . '/controller/wps_filter_search.php'); |
|
18 | +include(plugin_dir_path(__FILE__) . '/controller/wpshop_entity_filter.php'); |
|
19 | +include(plugin_dir_path(__FILE__) . '/controller/wps_order_search.php'); |
|
20 | +include(plugin_dir_path(__FILE__) . '/controller/wps_customer_search.php'); |
|
21 | 21 | |
22 | 22 | $wps_filter_search = new wps_filter_search(); |
@@ -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 | 3 | <div class="wps-form-group"> |
4 | 4 | <?php |
5 | - foreach( $stored_available_attribute_values as $stored_available_attribute_value ) : ?> |
|
6 | - <input type="checkbox" class="filter_search_checkbox" id="filter_search_<?php echo $attribute_def->code; ?>_<?php echo $stored_available_attribute_value['option_id'];?>" name="filter_search_<?php echo $attribute_def->code; ?>[]" /> <label for="filter_search_<?php echo $attribute_def->code; ?>_<?php echo $stored_available_attribute_value['option_id']; ?>"><?php echo $stored_available_attribute_value['option_label']; ?></label> |
|
5 | + foreach ($stored_available_attribute_values as $stored_available_attribute_value) : ?> |
|
6 | + <input type="checkbox" class="filter_search_checkbox" id="filter_search_<?php echo $attribute_def->code; ?>_<?php echo $stored_available_attribute_value['option_id']; ?>" name="filter_search_<?php echo $attribute_def->code; ?>[]" /> <label for="filter_search_<?php echo $attribute_def->code; ?>_<?php echo $stored_available_attribute_value['option_id']; ?>"><?php echo $stored_available_attribute_value['option_label']; ?></label> |
|
7 | 7 | <?php endforeach; ?> |
8 | 8 | </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,8 +1,8 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-form-group"> |
4 | 4 | <?php |
5 | - foreach( $stored_available_attribute_values as $stored_available_attribute_value ) : ?> |
|
6 | - <input type="radio" class="filter_search_radiobox" id="filter_search_<?php echo $attribute_def->code; ?>_<?php echo $stored_available_attribute_value['option_id'];?>" name="filter_search_<?php echo $attribute_def->code; ?>" /> <label for="filter_search_<?php echo $attribute_def->code; ?>_<?php echo $stored_available_attribute_value['option_id']; ?>"><?php echo $stored_available_attribute_value['option_label']; ?></label> |
|
5 | + foreach ($stored_available_attribute_values as $stored_available_attribute_value) : ?> |
|
6 | + <input type="radio" class="filter_search_radiobox" id="filter_search_<?php echo $attribute_def->code; ?>_<?php echo $stored_available_attribute_value['option_id']; ?>" name="filter_search_<?php echo $attribute_def->code; ?>" /> <label for="filter_search_<?php echo $attribute_def->code; ?>_<?php echo $stored_available_attribute_value['option_id']; ?>"><?php echo $stored_available_attribute_value['option_label']; ?></label> |
|
7 | 7 | <?php endforeach; ?> |
8 | 8 | </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,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <form id="wps-checkout-valid-step-five-form" method="post" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" class="wps-checkout-wrapper"> |
4 | 6 | <div class="wps-sidebar-resume"> |
@@ -25,8 +27,11 @@ discard block |
||
25 | 27 | <div id="wps-checkout-step-errors"></div> |
26 | 28 | <?php if( !empty( $_SESSION) && !empty($_SESSION['cart']) && !empty($_SESSION['cart']['cart_type']) && $_SESSION['cart']['cart_type'] == 'quotation' ) : ?> |
27 | 29 | <div class="wps"><button class="wps-bton-first-alignRight-rounded" id="wps-checkout-valid-step-five"><?php _e( 'Validate my quotation', 'wpshop' ); ?></button></div> |
28 | - <?php else : ?> |
|
29 | - <div class="wps"><button class="wps-bton-first-alignRight-rounded" id="wps-checkout-valid-step-five"><?php _e( 'Order', 'wpshop' ); ?></button></div> |
|
30 | + <?php else { |
|
31 | + : ?> |
|
32 | + <div class="wps"><button class="wps-bton-first-alignRight-rounded" id="wps-checkout-valid-step-five"><?php _e( 'Order', 'wpshop' ); |
|
33 | +} |
|
34 | +?></button></div> |
|
30 | 35 | <?php endif; ?> |
31 | 36 | </div> |
32 | 37 |
@@ -1,33 +1,33 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<form id="wps-checkout-valid-step-five-form" method="post" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" class="wps-checkout-wrapper"> |
|
3 | +<form id="wps-checkout-valid-step-five-form" method="post" action="<?php echo admin_url('admin-ajax.php'); ?>" class="wps-checkout-wrapper"> |
|
4 | 4 | <div class="wps-sidebar-resume"> |
5 | 5 | <input type="hidden" name="action" value="wps-checkout_valid_step_five"/> |
6 | - <?php wp_nonce_field( 'wps_checkout_valid_step_five' ); ?> |
|
7 | - <?php echo do_shortcode( '[wps_resume_cart]' ); ?> |
|
6 | + <?php wp_nonce_field('wps_checkout_valid_step_five'); ?> |
|
7 | + <?php echo do_shortcode('[wps_resume_cart]'); ?> |
|
8 | 8 | </div> |
9 | 9 | <div class="wps-checkout-content"> |
10 | 10 | |
11 | - <?php echo do_shortcode('[wps_payment]' ); ?> |
|
11 | + <?php echo do_shortcode('[wps_payment]'); ?> |
|
12 | 12 | |
13 | 13 | <div class="wps-form-group wps-comment-box"> |
14 | - <label><?php _e( 'Customer comment', 'wpshop'); ?> : </label> |
|
14 | + <label><?php _e('Customer comment', 'wpshop'); ?> : </label> |
|
15 | 15 | <div class="wps-form"> |
16 | 16 | <textarea name="wps-customer-comment" id="wps-customer-comment"></textarea> |
17 | 17 | </div> |
18 | 18 | </div> |
19 | 19 | |
20 | 20 | <!-- Terms of sale --> |
21 | - <?php $terms_page_id = get_option( 'wpshop_terms_of_sale_page_id' ); |
|
22 | - if(0 != $terms_page_id): ?> |
|
23 | - <div class="wps-cgv-line"><input type="hidden" name="terms_of_sale_indicator" /><input id="terms_of_sale" type="checkbox" value="Terms of sale" name="terms_of_sale"> <label for="terms_of_sale"><?php printf( __('I have read and I accept the %sterms of sale%s.', 'wpshop'), '<a href="' . get_permalink( wpshop_tools::get_page_id( get_option('wpshop_terms_of_sale_page_id') ) ) . '" target="_blank">', '</a>'); ?></label></div> |
|
21 | + <?php $terms_page_id = get_option('wpshop_terms_of_sale_page_id'); |
|
22 | + if (0 != $terms_page_id): ?> |
|
23 | + <div class="wps-cgv-line"><input type="hidden" name="terms_of_sale_indicator" /><input id="terms_of_sale" type="checkbox" value="Terms of sale" name="terms_of_sale"> <label for="terms_of_sale"><?php printf(__('I have read and I accept the %sterms of sale%s.', 'wpshop'), '<a href="' . get_permalink(wpshop_tools::get_page_id(get_option('wpshop_terms_of_sale_page_id'))) . '" target="_blank">', '</a>'); ?></label></div> |
|
24 | 24 | <?php endif; ?> |
25 | 25 | |
26 | 26 | <div id="wps-checkout-step-errors"></div> |
27 | - <?php if( !empty( $_SESSION) && !empty($_SESSION['cart']) && !empty($_SESSION['cart']['cart_type']) && $_SESSION['cart']['cart_type'] == 'quotation' ) : ?> |
|
28 | - <div class="wps"><button class="wps-bton-first-alignRight-rounded" id="wps-checkout-valid-step-five"><?php _e( 'Validate my quotation', 'wpshop' ); ?></button></div> |
|
27 | + <?php if (!empty($_SESSION) && !empty($_SESSION['cart']) && !empty($_SESSION['cart']['cart_type']) && $_SESSION['cart']['cart_type'] == 'quotation') : ?> |
|
28 | + <div class="wps"><button class="wps-bton-first-alignRight-rounded" id="wps-checkout-valid-step-five"><?php _e('Validate my quotation', 'wpshop'); ?></button></div> |
|
29 | 29 | <?php else : ?> |
30 | - <div class="wps"><button class="wps-bton-first-alignRight-rounded" id="wps-checkout-valid-step-five"><?php _e( 'Order', 'wpshop' ); ?></button></div> |
|
30 | + <div class="wps"><button class="wps-bton-first-alignRight-rounded" id="wps-checkout-valid-step-five"><?php _e('Order', 'wpshop'); ?></button></div> |
|
31 | 31 | <?php endif; ?> |
32 | 32 | </div> |
33 | 33 |
@@ -1,14 +1,14 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | -$company_infos = get_option( 'wpshop_company_info' ); |
|
3 | -$amount = ( !empty($_SESSION['cart']['order_amount_to_pay_now']) ) ? wpshop_tools::formate_number( $_SESSION['cart']['order_amount_to_pay_now'] ) : 0; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | +$company_infos = get_option('wpshop_company_info'); |
|
3 | +$amount = (!empty($_SESSION['cart']['order_amount_to_pay_now'])) ? wpshop_tools::formate_number($_SESSION['cart']['order_amount_to_pay_now']) : 0; |
|
4 | 4 | ?> |
5 | 5 | <div class="wps-boxed"> |
6 | 6 | <p><?php _e('Thank you ! Your order has been placed and you will receive a confirmation email shortly.', 'wpshop'); ?></p> |
7 | - <p><?php echo sprintf(__('You have to send the check with an amount of %s to about "%s" to the adress :', 'wpshop'), $amount.' '.wpshop_tools::wpshop_get_currency( false ), ( ( !empty($company_infos['company_name']) ) ? $company_infos['company_name'] : '') ); ?></p> |
|
8 | - <p><?php echo ( ( !empty($company_infos['company_name']) ) ? $company_infos['company_name'] : ''); ?><br/> |
|
9 | - <?php echo ( ( !empty($company_infos['company_street']) ) ? $company_infos['company_street'] : ''); ?><br/> |
|
10 | - <?php echo ( ( !empty($company_infos['company_postcode']) ) ? $company_infos['company_postcode'] : ''); ?> <?php echo ( ( !empty($company_infos['company_city']) ) ? $company_infos['company_city'] : ''); ?> <br/> |
|
11 | - <?php echo ( ( !empty($company_infos['company_country']) ) ? $company_infos['company_country'] : ''); ?></p> |
|
7 | + <p><?php echo sprintf(__('You have to send the check with an amount of %s to about "%s" to the adress :', 'wpshop'), $amount . ' ' . wpshop_tools::wpshop_get_currency(false), ((!empty($company_infos['company_name'])) ? $company_infos['company_name'] : '')); ?></p> |
|
8 | + <p><?php echo ((!empty($company_infos['company_name'])) ? $company_infos['company_name'] : ''); ?><br/> |
|
9 | + <?php echo ((!empty($company_infos['company_street'])) ? $company_infos['company_street'] : ''); ?><br/> |
|
10 | + <?php echo ((!empty($company_infos['company_postcode'])) ? $company_infos['company_postcode'] : ''); ?> <?php echo ((!empty($company_infos['company_city'])) ? $company_infos['company_city'] : ''); ?> <br/> |
|
11 | + <?php echo ((!empty($company_infos['company_country'])) ? $company_infos['company_country'] : ''); ?></p> |
|
12 | 12 | <p><?php _e('Your order will be shipped upon receipt of the check.', 'wpshop'); ?></p> |
13 | 13 | </div> |
14 | 14 |
@@ -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,14 +1,14 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | -$iban_infos = get_option( 'wpshop_paymentMethod_options' ); |
|
3 | -$iban_infos = ( !empty($iban_infos) && !empty($iban_infos['banktransfer']) ) ?$iban_infos['banktransfer'] : array(); |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | +$iban_infos = get_option('wpshop_paymentMethod_options'); |
|
3 | +$iban_infos = (!empty($iban_infos) && !empty($iban_infos['banktransfer'])) ? $iban_infos['banktransfer'] : array(); |
|
4 | 4 | ?> |
5 | 5 | <div class="wps-boxed"> |
6 | 6 | <p><?php _e('Thank you ! Your order has been placed and you will receive a confirmation email shortly.', 'wpshop'); ?></p> |
7 | 7 | <p><?php _e('You have to do a bank transfer on account detailled below:', 'wpshop'); ?></p> |
8 | - <p><?php _e('Bank name', 'wpshop'); ?> : <?php echo ( ( !empty($iban_infos['bank_name']) ) ? $iban_infos['bank_name'] : ''); ?><br/> |
|
9 | - <?php _e('IBAN', 'wpshop'); ?> : <?php echo ( ( !empty($iban_infos['iban']) ) ? $iban_infos['iban'] : ''); ?><br/> |
|
10 | - <?php _e('BIC/SWIFT', 'wpshop'); ?> : <?php echo ( ( !empty($iban_infos['bic']) ) ? $iban_infos['bic'] : ''); ?><br/> |
|
11 | - <?php _e('Account owner name', 'wpshop'); ?> : <?php echo ( ( !empty($iban_infos['accountowner']) ) ? $iban_infos['accountowner'] : ''); ?></p> |
|
8 | + <p><?php _e('Bank name', 'wpshop'); ?> : <?php echo ((!empty($iban_infos['bank_name'])) ? $iban_infos['bank_name'] : ''); ?><br/> |
|
9 | + <?php _e('IBAN', 'wpshop'); ?> : <?php echo ((!empty($iban_infos['iban'])) ? $iban_infos['iban'] : ''); ?><br/> |
|
10 | + <?php _e('BIC/SWIFT', 'wpshop'); ?> : <?php echo ((!empty($iban_infos['bic'])) ? $iban_infos['bic'] : ''); ?><br/> |
|
11 | + <?php _e('Account owner name', 'wpshop'); ?> : <?php echo ((!empty($iban_infos['accountowner'])) ? $iban_infos['accountowner'] : ''); ?></p> |
|
12 | 12 | <p><?php _e('Your order will be shipped upon receipt of funds.', 'wpshop'); ?></p> |
13 | 13 | </div> |
14 | 14 | <?php |
@@ -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 | <div><p><?php _e('Thank you ! Your quotation has been sent. We will respond to you as soon as possible.', 'wpshop'); ?></p></div> |
4 | -<?php wpshop_cart::empty_cart(); ?> |
|
4 | +<?php wpshop_cart::empty_cart(); ?> |
@@ -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 | * |