@@ -1,22 +1,22 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <ul id="product_media_list"> |
4 | -<?php if( $media_id ) : ?> |
|
5 | - <?php foreach( $media_id as $id ) : ?> |
|
6 | - <?php if( !empty($id) ) : ?> |
|
4 | +<?php if ($media_id) : ?> |
|
5 | + <?php foreach ($media_id as $id) : ?> |
|
6 | + <?php if (!empty($id)) : ?> |
|
7 | 7 | <li id="media_<?php echo $id; ?>" class="attachment"> |
8 | 8 | <div id="attachment-preview-border" class="attachment-preview"> |
9 | 9 | <div class="thumbnail"> |
10 | - <?php if( wp_attachment_is_image( $id ) ) { ?> |
|
10 | + <?php if (wp_attachment_is_image($id)) { ?> |
|
11 | 11 | <div class="centered"> |
12 | - <?php echo wp_get_attachment_image( $id ); ?> |
|
12 | + <?php echo wp_get_attachment_image($id); ?> |
|
13 | 13 | </div> |
14 | 14 | <?php } else { ?> |
15 | 15 | <div class="centered"> |
16 | - <?php echo wp_get_attachment_image( $id, 'thumbnail', 1 ); ?> |
|
16 | + <?php echo wp_get_attachment_image($id, 'thumbnail', 1); ?> |
|
17 | 17 | </div> |
18 | 18 | <div class="filename"> |
19 | - <div><?php echo basename(get_attached_file( $id )); ?></div> |
|
19 | + <div><?php echo basename(get_attached_file($id)); ?></div> |
|
20 | 20 | </div> |
21 | 21 | <?php } ?> |
22 | 22 | </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,14 +1,14 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | |
3 | 3 | DEFINE('WPS_MEDIA_MANAGER_DIR', basename(dirname(__FILE__))); |
4 | -DEFINE('WPS_MEDIA_MANAGER_PATH', str_replace( "\\", "/", str_replace( WPS_MEDIA_MANAGER_DIR, "", dirname( __FILE__ ) ) ) ); |
|
5 | -DEFINE('WPS_MEDIA_MANAGER_URL', str_replace( str_replace( "\\", "/", ABSPATH), site_url() . '/', WPS_MEDIA_MANAGER_PATH ) ); |
|
4 | +DEFINE('WPS_MEDIA_MANAGER_PATH', str_replace("\\", "/", str_replace(WPS_MEDIA_MANAGER_DIR, "", dirname(__FILE__)))); |
|
5 | +DEFINE('WPS_MEDIA_MANAGER_URL', str_replace(str_replace("\\", "/", ABSPATH), site_url() . '/', WPS_MEDIA_MANAGER_PATH)); |
|
6 | 6 | |
7 | 7 | DEFINE('WPS_MEDIA_MANAGER_TEMPLATE_DIR', WPS_MEDIA_MANAGER_PATH . WPS_MEDIA_MANAGER_DIR . "/templates/"); |
8 | 8 | |
9 | -load_plugin_textdomain( 'wps_media_manager', false, basename(dirname(__FILE__)).'/languages/'); |
|
9 | +load_plugin_textdomain('wps_media_manager', false, basename(dirname(__FILE__)) . '/languages/'); |
|
10 | 10 | |
11 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_media_manager_backend_ctr.php' ); |
|
12 | -include( plugin_dir_path( __FILE__ ).'/controller/wps_media_manager_frontend_ctr.php' ); |
|
11 | +include(plugin_dir_path(__FILE__) . '/controller/wps_media_manager_backend_ctr.php'); |
|
12 | +include(plugin_dir_path(__FILE__) . '/controller/wps_media_manager_frontend_ctr.php'); |
|
13 | 13 | |
14 | 14 | new wps_media_manager_backend_ctr(); |
@@ -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,16 +1,16 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<!-- <span class="wps-mini-cart-body-title"><strong><?php echo $total_cart_item; ?></strong><?php _e( 'item(s)', 'wpshop'); ?><span><strong><?php echo number_format( $total_cart, 2, '.', ''); ?></strong> <?php echo $currency; ?></span></span>--> |
|
3 | +<!-- <span class="wps-mini-cart-body-title"><strong><?php echo $total_cart_item; ?></strong><?php _e('item(s)', 'wpshop'); ?><span><strong><?php echo number_format($total_cart, 2, '.', ''); ?></strong> <?php echo $currency; ?></span></span>--> |
|
4 | 4 | <div> |
5 | 5 | <ul> |
6 | - <?php foreach( $cart_items as $item_id => $item ) : ?> |
|
6 | + <?php foreach ($cart_items as $item_id => $item) : ?> |
|
7 | 7 | <?php |
8 | - $item_post_type = get_post_type( $item_id ); |
|
9 | - if ( $item_post_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT_VARIATION ) { |
|
10 | - $parent_def = wpshop_products::get_parent_variation( $item_id ); |
|
8 | + $item_post_type = get_post_type($item_id); |
|
9 | + if ($item_post_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT_VARIATION) { |
|
10 | + $parent_def = wpshop_products::get_parent_variation($item_id); |
|
11 | 11 | $parent_post = $parent_def['parent_post']; |
12 | 12 | $item_id = $parent_post->ID; |
13 | - $item_title = $parent_post->post_title; |
|
13 | + $item_title = $parent_post->post_title; |
|
14 | 14 | } |
15 | 15 | else { |
16 | 16 | $item_title = $item['item_name']; |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | ?> |
19 | 19 | <li id="wps_product_<?php echo $item_id; ?>"> |
20 | 20 | <div class="wps-cart-item-img"> |
21 | - <a href="<?php echo get_permalink( $item_id ); ?>" title=""> |
|
22 | - <?php echo get_the_post_thumbnail( $item_id, 'thumbnail' ); ?> |
|
21 | + <a href="<?php echo get_permalink($item_id); ?>" title=""> |
|
22 | + <?php echo get_the_post_thumbnail($item_id, 'thumbnail'); ?> |
|
23 | 23 | </a> |
24 | 24 | </div> |
25 | 25 | <div class="wps-cart-item-content"> |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | </a> |
29 | 29 | </div> |
30 | 30 | <div class="wps-cart-item-price"> |
31 | - <span class="wps-price"><?php echo wpshop_tools::formate_number( $item['item_total_ttc'] ); ?><span> <?php echo $currency; ?></span></span> |
|
32 | - <span class="wps-tva"><?php _e( 'ATI', 'wpshop'); ?></span><br> |
|
31 | + <span class="wps-price"><?php echo wpshop_tools::formate_number($item['item_total_ttc']); ?><span> <?php echo $currency; ?></span></span> |
|
32 | + <span class="wps-tva"><?php _e('ATI', 'wpshop'); ?></span><br> |
|
33 | 33 | </div> |
34 | 34 | <div class="wps-cart-item-close"> |
35 | 35 | <button type="button" class="wps-bton-icon wps_cart_delete_product"><i class="wps-icon-trash"></i></button> |
@@ -38,13 +38,13 @@ discard block |
||
38 | 38 | <?php endforeach; ?> |
39 | 39 | </ul> |
40 | 40 | </div> |
41 | -<p><?php _e( 'Shipping cost', 'wpshop' ); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number( $shipping_cost_ati ); ?></strong>€</span></p> |
|
41 | +<p><?php _e('Shipping cost', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number($shipping_cost_ati); ?></strong>€</span></p> |
|
42 | 42 | |
43 | -<?php if ( !empty( $cart_content['coupon_id']) ) : ?> |
|
44 | - <p><?php _e( 'Total ATI before discount', 'wpshop' ); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number( $order_total_before_discount ); ?></strong> <?php echo $currency; ?></span></p> |
|
45 | - <p><?php _e( 'Discount', 'wpshop' ); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number( $coupon_value ); ?></strong> <?php echo $currency; ?></span></p> |
|
43 | +<?php if (!empty($cart_content['coupon_id'])) : ?> |
|
44 | + <p><?php _e('Total ATI before discount', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number($order_total_before_discount); ?></strong> <?php echo $currency; ?></span></p> |
|
45 | + <p><?php _e('Discount', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number($coupon_value); ?></strong> <?php echo $currency; ?></span></p> |
|
46 | 46 | <?php endif; ?> |
47 | 47 | |
48 | -<p class="wps-hightlight"><?php _e( 'Total ATI', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number( $total_ati ); ?></strong> <?php echo $currency; ?></span></p> |
|
49 | -<button class="wps-bton-second-halfwidth wpsjq-closeFixedCart"><i class="wps-icon-arrowleft"></i><?php _e( 'Return', 'wpshop'); ?></button> |
|
50 | -<a href="<?php echo get_permalink( wpshop_tools::get_page_id( get_option('wpshop_cart_page_id') ) ); ?>" class="wps-bton-first-halfwidth" role="button"><i class="wps-icon-paiement"></i><?php _e( 'Order', 'wpshop'); ?></a> |
|
48 | +<p class="wps-hightlight"><?php _e('Total ATI', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number($total_ati); ?></strong> <?php echo $currency; ?></span></p> |
|
49 | +<button class="wps-bton-second-halfwidth wpsjq-closeFixedCart"><i class="wps-icon-arrowleft"></i><?php _e('Return', 'wpshop'); ?></button> |
|
50 | +<a href="<?php echo get_permalink(wpshop_tools::get_page_id(get_option('wpshop_cart_page_id'))); ?>" class="wps-bton-first-halfwidth" role="button"><i class="wps-icon-paiement"></i><?php _e('Order', 'wpshop'); ?></a> |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <span class="wps-mini-cart-body-title"> |
4 | 6 | <strong><?php echo $total_cart_item; ?></strong><?php _e( 'item(s)', 'wpshop'); ?><span><strong><?php echo number_format( $total_cart, 2, '.', ''); ?></strong><?php echo $currency; ?></span> |
@@ -12,8 +14,7 @@ discard block |
||
12 | 14 | $parent_post = $parent_def['parent_post']; |
13 | 15 | $item_id = $parent_post->ID; |
14 | 16 | $item_title = $parent_post->post_title; |
15 | - } |
|
16 | - else { |
|
17 | + } else { |
|
17 | 18 | $item_title = $item['item_name']; |
18 | 19 | } |
19 | 20 | ?> |
@@ -1,9 +1,9 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <div class="wps-header-mini-cart wps-cart-activator"> |
4 | 4 | <div class="wps-mini-cart-header"> |
5 | - <a href="<?php echo get_permalink( wpshop_tools::get_page_id( get_option('wpshop_checkout_page_id ') ) ); ?>" class="wps-mini-cart-opener"> |
|
6 | - <?php _e( 'My cart', 'wpshop' ); ?> |
|
5 | + <a href="<?php echo get_permalink(wpshop_tools::get_page_id(get_option('wpshop_checkout_page_id '))); ?>" class="wps-mini-cart-opener"> |
|
6 | + <?php _e('My cart', 'wpshop'); ?> |
|
7 | 7 | <i class="wps-icon-basket"></i> |
8 | 8 | <?php echo do_shortcode('[wps-numeration-cart]'); ?> |
9 | 9 | </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,17 +1,17 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <span class="wps-mini-cart-body-title"> |
4 | -<strong><?php echo $total_cart_item; ?></strong><?php _e( 'item(s)', 'wpshop'); ?><span><strong><?php echo number_format( $total_cart, 2, '.', ''); ?></strong><?php echo $currency; ?></span> |
|
4 | +<strong><?php echo $total_cart_item; ?></strong><?php _e('item(s)', 'wpshop'); ?><span><strong><?php echo number_format($total_cart, 2, '.', ''); ?></strong><?php echo $currency; ?></span> |
|
5 | 5 | </span> |
6 | 6 | <div class="wps-cart-resume"> |
7 | 7 | <ul class="wps-fullcart"> |
8 | - <?php foreach( $cart_items as $item_id => $item ) : |
|
9 | - $item_post_type = get_post_type( $item_id ); |
|
10 | - if ( $item_post_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT_VARIATION ) { |
|
11 | - $parent_def = wpshop_products::get_parent_variation( $item_id ); |
|
8 | + <?php foreach ($cart_items as $item_id => $item) : |
|
9 | + $item_post_type = get_post_type($item_id); |
|
10 | + if ($item_post_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT_VARIATION) { |
|
11 | + $parent_def = wpshop_products::get_parent_variation($item_id); |
|
12 | 12 | $parent_post = $parent_def['parent_post']; |
13 | 13 | $item_id = $parent_post->ID; |
14 | - $item_title = $parent_post->post_title; |
|
14 | + $item_title = $parent_post->post_title; |
|
15 | 15 | } |
16 | 16 | else { |
17 | 17 | $item_title = $item['item_name']; |
@@ -19,18 +19,18 @@ discard block |
||
19 | 19 | ?> |
20 | 20 | <li class="wps-clearfix" id="wps_min_cart_product_<?php echo $item['item_id']; ?>"> |
21 | 21 | <div class="wps-cart-item-img"> |
22 | - <a href="<?php echo get_permalink( $item_id ); ?>" title="<?php echo $item_title; ?>"> |
|
23 | - <?php echo get_the_post_thumbnail( $item_id, 'thumbnail', array('class' => 'wps-circlerounded') ); ?> |
|
22 | + <a href="<?php echo get_permalink($item_id); ?>" title="<?php echo $item_title; ?>"> |
|
23 | + <?php echo get_the_post_thumbnail($item_id, 'thumbnail', array('class' => 'wps-circlerounded')); ?> |
|
24 | 24 | </a> |
25 | 25 | </div> |
26 | 26 | <div class="wps-cart-item-content"> |
27 | - <a href="<?php echo get_permalink( $item_id ); ?>" title="<?php echo $item_title; ?>"> |
|
27 | + <a href="<?php echo get_permalink($item_id); ?>" title="<?php echo $item_title; ?>"> |
|
28 | 28 | <?php echo $item_title; ?> |
29 | 29 | </a> |
30 | 30 | </div> |
31 | 31 | <div class="wps-cart-item-price"> |
32 | - <span class="wps-price"><?php echo wpshop_tools::formate_number( $item['item_total_ttc'] ); ?> <span><?php echo $currency; ?></span></span> |
|
33 | - <span class="wps-tva"><?php _e( 'ATI', 'wpshop'); ?></span><br> |
|
32 | + <span class="wps-price"><?php echo wpshop_tools::formate_number($item['item_total_ttc']); ?> <span><?php echo $currency; ?></span></span> |
|
33 | + <span class="wps-tva"><?php _e('ATI', 'wpshop'); ?></span><br> |
|
34 | 34 | </div> |
35 | 35 | <div class="wps-cart-item-close"> |
36 | 36 | <button type="button" class="wps-bton-icon-close wps_mini_cart_delete_product"></button> |
@@ -38,12 +38,12 @@ discard block |
||
38 | 38 | </li> |
39 | 39 | <?php endforeach; ?> |
40 | 40 | </ul> |
41 | - <p><?php _e( 'Shipping cost ATI', 'wpshop'); ?><span class="wps-alignRight"><strong><?php echo wpshop_tools::formate_number( $shipping_cost_ati ); ?></strong><?php echo $currency; ?></span></p> |
|
42 | - <?php if ( !empty( $cart_content['coupon_id']) ) : ?> |
|
43 | - <p><?php _e( 'Total ATI before discount', 'wpshop'); ?><span class="wps-alignRight"><strong><?php echo wpshop_tools::formate_number( $order_total_before_discount ); ?></strong><?php echo $currency; ?></span></p> |
|
44 | - <p><?php _e( 'Discount', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number( $coupon_value ); ?></strong><?php echo $currency; ?></span></p> |
|
41 | + <p><?php _e('Shipping cost ATI', 'wpshop'); ?><span class="wps-alignRight"><strong><?php echo wpshop_tools::formate_number($shipping_cost_ati); ?></strong><?php echo $currency; ?></span></p> |
|
42 | + <?php if (!empty($cart_content['coupon_id'])) : ?> |
|
43 | + <p><?php _e('Total ATI before discount', 'wpshop'); ?><span class="wps-alignRight"><strong><?php echo wpshop_tools::formate_number($order_total_before_discount); ?></strong><?php echo $currency; ?></span></p> |
|
44 | + <p><?php _e('Discount', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number($coupon_value); ?></strong><?php echo $currency; ?></span></p> |
|
45 | 45 | <?php endif; ?> |
46 | - <p class="wps-hightlight"><?php _e( 'Total ATI', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number( $total_ati ); ?></strong><?php echo $currency; ?></span></p> |
|
47 | - <a href="<?php echo get_permalink( wpshop_tools::get_page_id( get_option('wpshop_checkout_page_id') ) ); ?>" role="button" class="wps-bton-first"><?php _e( 'Order', 'wpshop' ); ?></a> |
|
46 | + <p class="wps-hightlight"><?php _e('Total ATI', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number($total_ati); ?></strong><?php echo $currency; ?></span></p> |
|
47 | + <a href="<?php echo get_permalink(wpshop_tools::get_page_id(get_option('wpshop_checkout_page_id'))); ?>" role="button" class="wps-bton-first"><?php _e('Order', 'wpshop'); ?></a> |
|
48 | 48 | </div> |
49 | 49 |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <span class="wps-mini-cart-body-title"> |
4 | 6 | <strong><?php echo $total_cart_item; ?></strong><?php _e( 'item(s)', 'wpshop'); ?><span><strong><?php echo number_format( $total_cart, 2, '.', ''); ?></strong><?php echo $currency; ?></span> |
@@ -12,8 +14,7 @@ discard block |
||
12 | 14 | $parent_post = $parent_def['parent_post']; |
13 | 15 | $item_id = $parent_post->ID; |
14 | 16 | $item_title = $parent_post->post_title; |
15 | - } |
|
16 | - else { |
|
17 | + } else { |
|
17 | 18 | $item_title = $item['item_name']; |
18 | 19 | } |
19 | 20 | ?> |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | if( !$account_origin ) : ?> |
3 | 5 | <div id="wps_cart_error_container" class="wps-alert-error"></div> |
4 | 6 | <?php endif; ?> |
@@ -37,8 +39,9 @@ discard block |
||
37 | 39 | if ( count($product_attribute_order_detail) > 0 && is_array($product_attribute_order_detail) ) { |
38 | 40 | foreach ( $product_attribute_order_detail as $product_attr_group_id => $product_attr_group_detail) { |
39 | 41 | foreach ( $product_attr_group_detail['attribut'] as $position => $attribute_def) { |
40 | - if ( !empty($attribute_def->code) ) |
|
41 | - $output_order[$attribute_def->code] = $position; |
|
42 | + if ( !empty($attribute_def->code) ) { |
|
43 | + $output_order[$attribute_def->code] = $position; |
|
44 | + } |
|
42 | 45 | } |
43 | 46 | } |
44 | 47 | } |
@@ -89,8 +92,7 @@ discard block |
||
89 | 92 | $item_id_component = explode( "__", $item_id_for_download ); |
90 | 93 | if ( !empty( $item_id_component ) && ( $item_id_component[ 0 ] != $item_id_for_download ) ) { |
91 | 94 | $item_id_for_download = $item_id_component[ 0 ]; |
92 | - } |
|
93 | - else if ( !empty( $download_codes[ $item['item_id'] ] ) ) { |
|
95 | + } else if ( !empty( $download_codes[ $item['item_id'] ] ) ) { |
|
94 | 96 | $item_id_for_download = $item['item_id']; |
95 | 97 | } |
96 | 98 | } |
@@ -1,55 +1,55 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - if( !$account_origin ) : ?> |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + if (!$account_origin) : ?> |
|
3 | 3 | <div id="wps_cart_error_container" class="wps-alert-error"></div> |
4 | 4 | <?php endif; ?> |
5 | 5 | <ul class="wps-fullcart"> |
6 | 6 | <li class="wps-clearfix cart_header"> |
7 | 7 | <div class="wps-cart-item-img"></div> |
8 | 8 | |
9 | - <div class="wps-cart-item-content"><?php _e( 'Product name', 'wpshop'); ?></div> |
|
9 | + <div class="wps-cart-item-content"><?php _e('Product name', 'wpshop'); ?></div> |
|
10 | 10 | |
11 | - <?php if( $cart_option == 'full_cart' || $cart_option == 'simplified_ati' ) : ?> |
|
12 | - <div class="wps-cart-item-unit-price"><?php _e( 'P.U', 'wpshop' ); ?></div> |
|
11 | + <?php if ($cart_option == 'full_cart' || $cart_option == 'simplified_ati') : ?> |
|
12 | + <div class="wps-cart-item-unit-price"><?php _e('P.U', 'wpshop'); ?></div> |
|
13 | 13 | <?php endif; ?> |
14 | - <?php if( $cart_option == 'simplified_et' ) : ?> |
|
15 | - <div class="wps-cart-item-unit-price"><?php _e( 'Unit price ET', 'wpshop' ); ?></div> |
|
14 | + <?php if ($cart_option == 'simplified_et') : ?> |
|
15 | + <div class="wps-cart-item-unit-price"><?php _e('Unit price ET', 'wpshop'); ?></div> |
|
16 | 16 | <?php endif; ?> |
17 | 17 | |
18 | - <div class="wps-cart-item-quantity"><?php _e( 'Qty', 'wpshop'); ?></div> |
|
18 | + <div class="wps-cart-item-quantity"><?php _e('Qty', 'wpshop'); ?></div> |
|
19 | 19 | |
20 | - <?php if( $cart_option == 'full_cart' || $cart_option == 'simplified_ati' ) : ?> |
|
21 | - <div class="wps-cart-item-price"><?php _e( 'Total', 'wpshop' ); ?></div> |
|
20 | + <?php if ($cart_option == 'full_cart' || $cart_option == 'simplified_ati') : ?> |
|
21 | + <div class="wps-cart-item-price"><?php _e('Total', 'wpshop'); ?></div> |
|
22 | 22 | <?php endif; ?> |
23 | - <?php if( $cart_option == 'simplified_et' ) : ?> |
|
24 | - <div class="wps-cart-item-price"><?php _e( 'Total ET', 'wpshop' ); ?></div> |
|
23 | + <?php if ($cart_option == 'simplified_et') : ?> |
|
24 | + <div class="wps-cart-item-price"><?php _e('Total ET', 'wpshop'); ?></div> |
|
25 | 25 | <?php endif; ?> |
26 | - <?php if ( empty($cart_type) || ( !empty($cart_type) && $cart_type != 'summary' ) ) : ?> |
|
26 | + <?php if (empty($cart_type) || (!empty($cart_type) && $cart_type != 'summary')) : ?> |
|
27 | 27 | <div class="wps-cart-item-close"></div> |
28 | 28 | <?php endif; ?> |
29 | 29 | </li> |
30 | 30 | <?php |
31 | - foreach( $cart_items as $item_id => $item ) : |
|
31 | + foreach ($cart_items as $item_id => $item) : |
|
32 | 32 | $product_key = $item_id; |
33 | 33 | /** Check if it's a product or a variation **/ |
34 | - $item_post_type = get_post_type( $item['item_id'] ); |
|
35 | - $product_attribute_order_detail = wpshop_attributes_set::getAttributeSetDetails( get_post_meta($item['item_id'], WPSHOP_PRODUCT_ATTRIBUTE_SET_ID_META_KEY, true) ) ; |
|
34 | + $item_post_type = get_post_type($item['item_id']); |
|
35 | + $product_attribute_order_detail = wpshop_attributes_set::getAttributeSetDetails(get_post_meta($item['item_id'], WPSHOP_PRODUCT_ATTRIBUTE_SET_ID_META_KEY, true)); |
|
36 | 36 | $output_order = array(); |
37 | - if ( count($product_attribute_order_detail) > 0 && is_array($product_attribute_order_detail) ) { |
|
38 | - foreach ( $product_attribute_order_detail as $product_attr_group_id => $product_attr_group_detail) { |
|
39 | - foreach ( $product_attr_group_detail['attribut'] as $position => $attribute_def) { |
|
40 | - if ( !empty($attribute_def->code) ) |
|
37 | + if (count($product_attribute_order_detail) > 0 && is_array($product_attribute_order_detail)) { |
|
38 | + foreach ($product_attribute_order_detail as $product_attr_group_id => $product_attr_group_detail) { |
|
39 | + foreach ($product_attr_group_detail['attribut'] as $position => $attribute_def) { |
|
40 | + if (!empty($attribute_def->code)) |
|
41 | 41 | $output_order[$attribute_def->code] = $position; |
42 | 42 | } |
43 | 43 | } |
44 | 44 | } |
45 | - $variation_attribute_ordered = wpshop_products::get_selected_variation_display( $item['item_meta'], $output_order, 'cart' ); |
|
45 | + $variation_attribute_ordered = wpshop_products::get_selected_variation_display($item['item_meta'], $output_order, 'cart'); |
|
46 | 46 | ksort($variation_attribute_ordered['attribute_list']); |
47 | 47 | $variations_indicator = ''; |
48 | - if( !empty($variation_attribute_ordered['attribute_list']) ) { |
|
48 | + if (!empty($variation_attribute_ordered['attribute_list'])) { |
|
49 | 49 | |
50 | 50 | $variations_indicator .= '<ul class="wps-cart-item-variations" >'; |
51 | - foreach ( $variation_attribute_ordered['attribute_list'] as $attribute_variation_to_output ) { |
|
52 | - if ( !empty($attribute_variation_to_output) ) { |
|
51 | + foreach ($variation_attribute_ordered['attribute_list'] as $attribute_variation_to_output) { |
|
52 | + if (!empty($attribute_variation_to_output)) { |
|
53 | 53 | $variations_indicator .= $attribute_variation_to_output; |
54 | 54 | } |
55 | 55 | } |
@@ -59,61 +59,61 @@ discard block |
||
59 | 59 | $parent_def = array(); |
60 | 60 | $item_title = $item['item_name']; |
61 | 61 | $item_id = $item['item_id']; |
62 | - if ( $item_post_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT_VARIATION ) { |
|
63 | - $parent_def = wpshop_products::get_parent_variation( $item['item_id'] ); |
|
64 | - if( !empty($parent_def) && !empty($parent_def['parent_post']) ) { |
|
62 | + if ($item_post_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT_VARIATION) { |
|
63 | + $parent_def = wpshop_products::get_parent_variation($item['item_id']); |
|
64 | + if (!empty($parent_def) && !empty($parent_def['parent_post'])) { |
|
65 | 65 | $parent_post = $parent_def['parent_post']; |
66 | 66 | $item_id = $parent_post->ID; |
67 | - $item_title = $parent_post->post_title; |
|
67 | + $item_title = $parent_post->post_title; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | 71 | /** Downloadable link in Order recap **/ |
72 | 72 | $download_link = ''; |
73 | - if( !empty($parent_def) ) { |
|
73 | + if (!empty($parent_def)) { |
|
74 | 74 | $parent_meta = $parent_def['parent_post_meta']; |
75 | - if ( !empty($parent_meta['is_downloadable_']) ) { |
|
76 | - $query = $wpdb->prepare( 'SELECT value FROM '. WPSHOP_DBT_ATTRIBUTE_VALUES_OPTIONS .' WHERE id = %d', $parent_meta['is_downloadable_'] ); |
|
77 | - $downloadable_option_value = $wpdb->get_var( $query ); |
|
78 | - if ( !empty( $downloadable_option_value) ) { |
|
75 | + if (!empty($parent_meta['is_downloadable_'])) { |
|
76 | + $query = $wpdb->prepare('SELECT value FROM ' . WPSHOP_DBT_ATTRIBUTE_VALUES_OPTIONS . ' WHERE id = %d', $parent_meta['is_downloadable_']); |
|
77 | + $downloadable_option_value = $wpdb->get_var($query); |
|
78 | + if (!empty($downloadable_option_value)) { |
|
79 | 79 | $item['item_is_downloadable_'] = $downloadable_option_value; |
80 | 80 | } |
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
84 | - if ( !empty($item) && !empty($item['item_is_downloadable_']) && ( strtolower( __( $item['item_is_downloadable_'], 'wpshop') ) == strtolower( __('Yes', 'wpshop') ) ) ) { |
|
84 | + if (!empty($item) && !empty($item['item_is_downloadable_']) && (strtolower(__($item['item_is_downloadable_'], 'wpshop')) == strtolower(__('Yes', 'wpshop')))) { |
|
85 | 85 | $item_id_for_download = $item_id; |
86 | - $download_codes = get_user_meta( get_current_user_id(), '_order_download_codes_'.$oid, true); |
|
86 | + $download_codes = get_user_meta(get_current_user_id(), '_order_download_codes_' . $oid, true); |
|
87 | 87 | /** Check if the current product exist into download code list, if not check if there is a composition between parent product and children product */ |
88 | - if ( empty( $download_codes[$item_id_for_download] ) ) { |
|
89 | - $item_id_component = explode( "__", $item_id_for_download ); |
|
90 | - if ( !empty( $item_id_component ) && ( $item_id_component[ 0 ] != $item_id_for_download ) ) { |
|
91 | - $item_id_for_download = $item_id_component[ 0 ]; |
|
88 | + if (empty($download_codes[$item_id_for_download])) { |
|
89 | + $item_id_component = explode("__", $item_id_for_download); |
|
90 | + if (!empty($item_id_component) && ($item_id_component[0] != $item_id_for_download)) { |
|
91 | + $item_id_for_download = $item_id_component[0]; |
|
92 | 92 | } |
93 | - else if ( !empty( $download_codes[ $item['item_id'] ] ) ) { |
|
93 | + else if (!empty($download_codes[$item['item_id']])) { |
|
94 | 94 | $item_id_for_download = $item['item_id']; |
95 | 95 | } |
96 | 96 | } |
97 | 97 | |
98 | - if ( !empty($download_codes) && !empty($download_codes[$item_id_for_download]) && !empty($download_codes[$item_id_for_download]['download_code']) ) { |
|
99 | - $download_link = '<a href="' .admin_url( 'admin-post.php?action=download_file&oid=' . $oid . '&download=' . $download_codes[$item_id_for_download]['download_code'] ) . '" target="_blank" class="wps-bton-fourth-mini-rounded">' .__('Download the product','wpshop'). '</a>'; |
|
98 | + if (!empty($download_codes) && !empty($download_codes[$item_id_for_download]) && !empty($download_codes[$item_id_for_download]['download_code'])) { |
|
99 | + $download_link = '<a href="' . admin_url('admin-post.php?action=download_file&oid=' . $oid . '&download=' . $download_codes[$item_id_for_download]['download_code']) . '" target="_blank" class="wps-bton-fourth-mini-rounded">' . __('Download the product', 'wpshop') . '</a>'; |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | 103 | |
104 | 104 | /** Check if product is an auto added product : don't display link to product, quantity and remover */ |
105 | 105 | $auto_added_product = false; |
106 | - $item_options = get_post_meta( $item_id, '_' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT . '_options', true ); |
|
107 | - if ( !empty($item_options['cart']) && !empty($item_options['cart']['auto_add']) && ($item_options['cart']['auto_add'] == 'yes')) : |
|
106 | + $item_options = get_post_meta($item_id, '_' . WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT . '_options', true); |
|
107 | + if (!empty($item_options['cart']) && !empty($item_options['cart']['auto_add']) && ($item_options['cart']['auto_add'] == 'yes')) : |
|
108 | 108 | $auto_added_product = true; |
109 | 109 | endif; |
110 | 110 | |
111 | - require( wpshop_tools::get_template_part( WPS_CART_DIR, WPS_CART_TPL_DIR,"frontend", "cart/cart", "item") ); |
|
111 | + require(wpshop_tools::get_template_part(WPS_CART_DIR, WPS_CART_TPL_DIR, "frontend", "cart/cart", "item")); |
|
112 | 112 | endforeach; |
113 | 113 | ?> |
114 | 114 | </ul> |
115 | -<?php require_once( wpshop_tools::get_template_part( WPS_CART_DIR, WPS_CART_TPL_DIR,"frontend", "cart/cart", "total") ); ?> |
|
116 | -<?php if ( empty($cart_type) || ( !empty($cart_type) && $cart_type != 'summary' ) ) : ?> |
|
117 | -<?php echo apply_filters( 'wps_cart_footer_extra_content', ''); ?> |
|
115 | +<?php require_once(wpshop_tools::get_template_part(WPS_CART_DIR, WPS_CART_TPL_DIR, "frontend", "cart/cart", "total")); ?> |
|
116 | +<?php if (empty($cart_type) || (!empty($cart_type) && $cart_type != 'summary')) : ?> |
|
117 | +<?php echo apply_filters('wps_cart_footer_extra_content', ''); ?> |
|
118 | 118 | <?php endif?> |
119 | 119 |
@@ -1,85 +1,85 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | 3 | <li class="wps-clearfix" id="wps_product_<?php echo $product_key; ?>"> |
4 | 4 | <div class="wps-cart-item-img"> |
5 | - <?php if ( !$auto_added_product ) : ?><a href="<?php echo get_permalink( $item_id ); ?>" title="<?php echo $item_title; ?>"><?php endif; ?> |
|
6 | - <?php echo get_the_post_thumbnail($item['item_id'], 'thumbnail' ); ?> |
|
7 | - <?php if ( !$auto_added_product ) : ?></a><?php endif; ?> |
|
5 | + <?php if (!$auto_added_product) : ?><a href="<?php echo get_permalink($item_id); ?>" title="<?php echo $item_title; ?>"><?php endif; ?> |
|
6 | + <?php echo get_the_post_thumbnail($item['item_id'], 'thumbnail'); ?> |
|
7 | + <?php if (!$auto_added_product) : ?></a><?php endif; ?> |
|
8 | 8 | </div> |
9 | 9 | <div class="wps-cart-item-content"> |
10 | - <?php if ( !$auto_added_product && get_post_status( $item_id ) != 'free_product' ) : ?><a href="<?php echo get_permalink( $item_id ); ?>" title="<?php echo $item_title; ?>"><?php endif; ?> |
|
10 | + <?php if (!$auto_added_product && get_post_status($item_id) != 'free_product') : ?><a href="<?php echo get_permalink($item_id); ?>" title="<?php echo $item_title; ?>"><?php endif; ?> |
|
11 | 11 | <?php echo $item_title; ?> |
12 | - <?php if ( !$auto_added_product && get_post_status( $item_id ) != 'free_product' ) : ?></a><?php endif; ?> |
|
12 | + <?php if (!$auto_added_product && get_post_status($item_id) != 'free_product') : ?></a><?php endif; ?> |
|
13 | 13 | |
14 | 14 | <?php echo $variations_indicator; ?> |
15 | 15 | |
16 | - <?php if ( !empty( $cart_content ) && !empty( $cart_content[ 'order_status' ] ) && ( 'completed' == $cart_content[ 'order_status' ] ) && ( empty($cart_type) || ( !empty($cart_type) && $cart_type == 'summary' ) ) ) : ?> |
|
16 | + <?php if (!empty($cart_content) && !empty($cart_content['order_status']) && ('completed' == $cart_content['order_status']) && (empty($cart_type) || (!empty($cart_type) && $cart_type == 'summary'))) : ?> |
|
17 | 17 | <?php echo $download_link; ?> |
18 | 18 | <?php endif; ?> |
19 | 19 | |
20 | - <?php echo apply_filters( 'wps_order_item_content_column', '', $item, $oid, $cart_content ); ?> |
|
20 | + <?php echo apply_filters('wps_order_item_content_column', '', $item, $oid, $cart_content); ?> |
|
21 | 21 | </div> |
22 | 22 | |
23 | - <?php if( $cart_option == 'simplified_et' ) : ?> |
|
23 | + <?php if ($cart_option == 'simplified_et') : ?> |
|
24 | 24 | <div class="wps-cart-item-unit-price"> |
25 | 25 | <span class="wps-price"> |
26 | 26 | <?php |
27 | 27 | $price_ati_to_display = $item['item_pu_ttc']; |
28 | - if ( !empty( $item[ 'item_amount_to_pay_now' ] ) ) { |
|
29 | - $price_ati_to_display = $item[ 'item_amount_to_pay_now' ]; |
|
28 | + if (!empty($item['item_amount_to_pay_now'])) { |
|
29 | + $price_ati_to_display = $item['item_amount_to_pay_now']; |
|
30 | 30 | } |
31 | 31 | ?> |
32 | - <?php echo wpshop_tools::formate_number( $price_ati_to_display ); ?><span><?php echo $currency; ?></span> |
|
32 | + <?php echo wpshop_tools::formate_number($price_ati_to_display); ?><span><?php echo $currency; ?></span> |
|
33 | 33 | </span> |
34 | 34 | </div> |
35 | 35 | <?php endif; ?> |
36 | 36 | |
37 | - <?php if( $cart_option == 'full_cart' || $cart_option == 'simplified_ati' ) : ?> |
|
37 | + <?php if ($cart_option == 'full_cart' || $cart_option == 'simplified_ati') : ?> |
|
38 | 38 | <div class="wps-cart-item-unit-price"> |
39 | - <span class="wps-price"> <?php echo wpshop_tools::formate_number( $item['item_pu_ttc'] ); ?><span><?php echo $currency; ?></span></span> |
|
39 | + <span class="wps-price"> <?php echo wpshop_tools::formate_number($item['item_pu_ttc']); ?><span><?php echo $currency; ?></span></span> |
|
40 | 40 | </div> |
41 | 41 | <?php endif; ?> |
42 | 42 | |
43 | 43 | <div class="wps-cart-item-quantity wps-productQtyForm"> |
44 | - <?php if ( ( empty($cart_type) || ( !empty($cart_type) ) ) && !$auto_added_product ) : ?> |
|
45 | - <?php if( ( $cart_type != 'admin-panel' || ( $cart_type == 'admin-panel' && ( empty( $cart_content['order_status'] ) || $cart_content['order_status'] == 'awaiting_payment' || ( ( !empty( $cart_content['cart_type'] ) && $cart_content['cart_type'] == 'quotation' ) && $cart_content['order_status'] != 'completed' ) ) ) ) ) : ?> |
|
44 | + <?php if ((empty($cart_type) || (!empty($cart_type))) && !$auto_added_product) : ?> |
|
45 | + <?php if (($cart_type != 'admin-panel' || ($cart_type == 'admin-panel' && (empty($cart_content['order_status']) || $cart_content['order_status'] == 'awaiting_payment' || ((!empty($cart_content['cart_type']) && $cart_content['cart_type'] == 'quotation') && $cart_content['order_status'] != 'completed'))))) : ?> |
|
46 | 46 | <a href="" class="wps-cart-reduce-product-qty"><i class="wps-icon-minus"></i></a> |
47 | 47 | <input type="text" name="french-hens" id="wps-cart-product-qty-<?php echo $product_key; ?>" value="<?php echo $item['item_qty']; ?>" class="wps-circlerounded wps-cart-product-qty"> |
48 | 48 | <a href="" class="wps-cart-add-product-qty"><i class="wps-icon-plus"></i></a> |
49 | 49 | <?php else : ?> |
50 | 50 | <?php echo $item['item_qty']; ?> |
51 | - <?php endif;?> |
|
52 | - <?php elseif ( $auto_added_product ) : ?> |
|
51 | + <?php endif; ?> |
|
52 | + <?php elseif ($auto_added_product) : ?> |
|
53 | 53 | 1 |
54 | 54 | <?php else : ?> |
55 | 55 | <?php echo $item['item_qty']; ?> |
56 | 56 | <?php endif; ?> |
57 | 57 | </div> |
58 | 58 | |
59 | - <?php if( $cart_option == 'full_cart' || $cart_option == 'simplified_et' ) : ?> |
|
59 | + <?php if ($cart_option == 'full_cart' || $cart_option == 'simplified_et') : ?> |
|
60 | 60 | <div class="wps-cart-item-price"> |
61 | - <span class="wps-price"> <?php echo wpshop_tools::formate_number( $item['item_total_ht'] ); ?><span><?php echo $currency; ?></span></span> |
|
62 | - <span class="wps-tva"><?php _e( 'ET', 'wpshop'); ?></span> |
|
61 | + <span class="wps-price"> <?php echo wpshop_tools::formate_number($item['item_total_ht']); ?><span><?php echo $currency; ?></span></span> |
|
62 | + <span class="wps-tva"><?php _e('ET', 'wpshop'); ?></span> |
|
63 | 63 | </div> |
64 | 64 | <?php endif; ?> |
65 | 65 | |
66 | - <?php if( $cart_option == 'full_cart' || $cart_option == 'simplified_ati' ) : ?> |
|
66 | + <?php if ($cart_option == 'full_cart' || $cart_option == 'simplified_ati') : ?> |
|
67 | 67 | <div class="wps-cart-item-price"> |
68 | 68 | <?php |
69 | 69 | $price_total_to_display = $item['item_total_ttc']; |
70 | - if ( !empty( $item[ 'item_amount_to_pay_now' ] ) ) { |
|
71 | - $price_total_to_display = $item[ 'item_amount_to_pay_now' ] * $item['item_qty']; |
|
70 | + if (!empty($item['item_amount_to_pay_now'])) { |
|
71 | + $price_total_to_display = $item['item_amount_to_pay_now'] * $item['item_qty']; |
|
72 | 72 | } |
73 | 73 | ?> |
74 | - <span class="wps-price"> <?php echo wpshop_tools::formate_number( $price_total_to_display ); ?><span><?php echo $currency; ?></span></span> |
|
74 | + <span class="wps-price"> <?php echo wpshop_tools::formate_number($price_total_to_display); ?><span><?php echo $currency; ?></span></span> |
|
75 | 75 | </div> |
76 | 76 | <?php endif; ?> |
77 | 77 | |
78 | 78 | |
79 | - <?php if ( empty($cart_type) || ( !empty($cart_type) && $cart_type != 'summary' ) ) : ?> |
|
79 | + <?php if (empty($cart_type) || (!empty($cart_type) && $cart_type != 'summary')) : ?> |
|
80 | 80 | <div class="wps-cart-item-close"> |
81 | - <?php if( $cart_type != 'admin-panel' || ( $cart_type == 'admin-panel' && ( empty( $cart_content['order_status'] ) || $cart_content['order_status'] == 'awaiting_payment' || ( ( !empty( $cart_content['cart_type'] ) && $cart_content['cart_type'] == 'quotation' ) && $cart_content['order_status'] != 'completed' ) ) ) ) : ?> |
|
82 | - <?php if ( !$auto_added_product ) : ?><button type="button" class="wps-bton-icon wps_cart_delete_product" id="wps-close-<?php echo $product_key; ?>"><i class="wps-icon-close"></i></button><?php endif; ?> |
|
81 | + <?php if ($cart_type != 'admin-panel' || ($cart_type == 'admin-panel' && (empty($cart_content['order_status']) || $cart_content['order_status'] == 'awaiting_payment' || ((!empty($cart_content['cart_type']) && $cart_content['cart_type'] == 'quotation') && $cart_content['order_status'] != 'completed')))) : ?> |
|
82 | + <?php if (!$auto_added_product) : ?><button type="button" class="wps-bton-icon wps_cart_delete_product" id="wps-close-<?php echo $product_key; ?>"><i class="wps-icon-close"></i></button><?php endif; ?> |
|
83 | 83 | <?php endif; ?> |
84 | 84 | </div> |
85 | 85 | <?php endif; ?> |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
2 | 4 | ?> |
3 | 5 | <li class="wps-clearfix" id="wps_product_<?php echo $product_key; ?>"> |
4 | 6 | <div class="wps-cart-item-img"> |
@@ -46,13 +48,19 @@ discard block |
||
46 | 48 | <a href="" class="wps-cart-reduce-product-qty"><i class="wps-icon-minus"></i></a> |
47 | 49 | <input type="text" name="french-hens" id="wps-cart-product-qty-<?php echo $product_key; ?>" value="<?php echo $item['item_qty']; ?>" class="wps-circlerounded wps-cart-product-qty"> |
48 | 50 | <a href="" class="wps-cart-add-product-qty"><i class="wps-icon-plus"></i></a> |
49 | - <?php else : ?> |
|
50 | - <?php echo $item['item_qty']; ?> |
|
51 | + <?php else { |
|
52 | + : ?> |
|
53 | + <?php echo $item['item_qty']; |
|
54 | +} |
|
55 | +?> |
|
51 | 56 | <?php endif;?> |
52 | 57 | <?php elseif ( $auto_added_product ) : ?> |
53 | 58 | 1 |
54 | - <?php else : ?> |
|
55 | - <?php echo $item['item_qty']; ?> |
|
59 | + <?php else { |
|
60 | + : ?> |
|
61 | + <?php echo $item['item_qty']; |
|
62 | +} |
|
63 | +?> |
|
56 | 64 | <?php endif; ?> |
57 | 65 | </div> |
58 | 66 |
@@ -1,14 +1,14 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - if ( !defined( 'ABSPATH' ) ) exit; ?> |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | + if (!defined('ABSPATH')) exit; ?> |
|
3 | 3 | |
4 | 4 | <div class="wps-product-section"> |
5 | 5 | <label><?php _e('Quantity', 'wpshop'); ?></label> |
6 | 6 | <div class="wps-productQtyForm"> |
7 | - <?php if ( $use_button ): ?> |
|
7 | + <?php if ($use_button): ?> |
|
8 | 8 | <a class="wps-bton-icon-minus-small wps-cart-reduce-product-qty" href=""></a> |
9 | 9 | <?php endif; ?> |
10 | 10 | <span class="wps-form"><input id="wps-cart-product-qty-<?php echo $args['pid']; ?>" class="wpshop_product_qty_input" type="text" value="1" /></span> |
11 | - <?php if ( $use_button): ?> |
|
11 | + <?php if ($use_button): ?> |
|
12 | 12 | <a class="wps-bton-icon-plus-small wps-cart-add-product-qty" href=""></a> |
13 | 13 | <?php endif; ?> |
14 | 14 | </div> |
@@ -1,5 +1,10 @@ |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
2 | - if ( !defined( 'ABSPATH' ) ) exit; ?> |
|
1 | +<?php if ( !defined( 'ABSPATH' ) ) { |
|
2 | + exit; |
|
3 | +} |
|
4 | + if ( !defined( 'ABSPATH' ) ) { |
|
5 | + exit; |
|
6 | + } |
|
7 | + ?> |
|
3 | 8 | |
4 | 9 | <div class="wps-product-section"> |
5 | 10 | <label><?php _e('Quantity', 'wpshop'); ?></label> |
@@ -1,27 +1,27 @@ discard block |
||
1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
1 | +<?php if (!defined('ABSPATH')) exit; |
|
2 | 2 | ?> |
3 | -<!-- <h3 class="wps-h3"><?php _e( 'Cart summary', 'wpshop' ); ?></h3> --> |
|
3 | +<!-- <h3 class="wps-h3"><?php _e('Cart summary', 'wpshop'); ?></h3> --> |
|
4 | 4 | <ul class="wps-cart-resume-list"> |
5 | - <?php foreach( $cart_items as $item_id => $item ) : |
|
5 | + <?php foreach ($cart_items as $item_id => $item) : |
|
6 | 6 | $product_key = $item_id; |
7 | - $item_post_type = get_post_type( $item_id ); |
|
8 | - if ( $item_post_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT_VARIATION ) { |
|
9 | - $parent_def = wpshop_products::get_parent_variation( $item_id ); |
|
7 | + $item_post_type = get_post_type($item_id); |
|
8 | + if ($item_post_type == WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT_VARIATION) { |
|
9 | + $parent_def = wpshop_products::get_parent_variation($item_id); |
|
10 | 10 | $parent_post = $parent_def['parent_post']; |
11 | 11 | $item_id = $parent_post->ID; |
12 | - $item_title = $parent_post->post_title; |
|
12 | + $item_title = $parent_post->post_title; |
|
13 | 13 | } else { |
14 | 14 | $item_title = $item['item_name']; |
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | <li data-id="<?php echo $product_key; ?>" > |
18 | 18 | <div class="wps-cart-item-img"> |
19 | - <a href="<?php echo get_permalink( $item_id ); ?>" title="<?php echo $item_title; ?>"> |
|
20 | - <?php echo get_the_post_thumbnail( $item_id, 'thumbnail' ); ?> |
|
19 | + <a href="<?php echo get_permalink($item_id); ?>" title="<?php echo $item_title; ?>"> |
|
20 | + <?php echo get_the_post_thumbnail($item_id, 'thumbnail'); ?> |
|
21 | 21 | </a> |
22 | 22 | </div> |
23 | 23 | <div class="wps-cart-item-content"> |
24 | - <a class="wps-cart-item-title" href="<?php echo get_permalink( $item_id ); ?>" title="<?php echo $item_title; ?>"> |
|
24 | + <a class="wps-cart-item-title" href="<?php echo get_permalink($item_id); ?>" title="<?php echo $item_title; ?>"> |
|
25 | 25 | <?php echo $item_title; ?> |
26 | 26 | </a> |
27 | 27 | <?php //echo $variations_indicator; ?> |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | <div class="wps-cart-item-price"> |
35 | - <span class="wps-price"><?php echo wpshop_tools::formate_number( $item['item_total_ttc'] ); ?> <span><?php echo $currency; ?></span></span> |
|
36 | - <span class="wps-tva"><?php _e( 'ATI', 'wpshop'); ?></span><br> |
|
35 | + <span class="wps-price"><?php echo wpshop_tools::formate_number($item['item_total_ttc']); ?> <span><?php echo $currency; ?></span></span> |
|
36 | + <span class="wps-tva"><?php _e('ATI', 'wpshop'); ?></span><br> |
|
37 | 37 | </div> |
38 | 38 | </li> |
39 | 39 | <?php endforeach; ?> |
@@ -43,15 +43,15 @@ discard block |
||
43 | 43 | <?php echo do_shortcode('[wps_apply_coupon]'); ?> |
44 | 44 | </div> |
45 | 45 | <div class="wps-cart-total"> |
46 | - <p><?php _e( 'Shipping cost ATI', 'wpshop'); ?><span class="wps-alignRight"><strong><?php echo wpshop_tools::formate_number( $shipping_cost_ati ); ?></strong><?php echo $currency; ?></span></p> |
|
47 | - <?php if ( !empty( $cart_content['coupon_id']) ) : ?> |
|
48 | - <p><?php _e( 'Total ATI before discount', 'wpshop'); ?><span class="wps-alignRight"><strong><?php echo wpshop_tools::formate_number( $order_total_before_discount ); ?></strong><?php echo $currency; ?></span></p> |
|
49 | - <p><?php _e( 'Discount', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number( $coupon_value ); ?></strong><?php echo $currency; ?></span></p> |
|
46 | + <p><?php _e('Shipping cost ATI', 'wpshop'); ?><span class="wps-alignRight"><strong><?php echo wpshop_tools::formate_number($shipping_cost_ati); ?></strong><?php echo $currency; ?></span></p> |
|
47 | + <?php if (!empty($cart_content['coupon_id'])) : ?> |
|
48 | + <p><?php _e('Total ATI before discount', 'wpshop'); ?><span class="wps-alignRight"><strong><?php echo wpshop_tools::formate_number($order_total_before_discount); ?></strong><?php echo $currency; ?></span></p> |
|
49 | + <p><?php _e('Discount', 'wpshop'); ?><span class="wps-inline-alignRight"><strong><?php echo wpshop_tools::formate_number($coupon_value); ?></strong><?php echo $currency; ?></span></p> |
|
50 | 50 | <?php endif; ?> |
51 | 51 | <p class="wps-hightlight"> |
52 | - <?php _e( 'Total ATI', 'wpshop'); ?> |
|
52 | + <?php _e('Total ATI', 'wpshop'); ?> |
|
53 | 53 | <span class="wps-inline-alignRight"> |
54 | - <strong><?php echo wpshop_tools::formate_number( $total_ati ); ?></strong> |
|
54 | + <strong><?php echo wpshop_tools::formate_number($total_ati); ?></strong> |
|
55 | 55 | <?php echo $currency; ?> |
56 | 56 | </span> |
57 | 57 | </p> |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | </div><!-- wps-cart-cartouche --> |
60 | 60 | |
61 | 61 | <?php $wps_payment_mode = get_option('wps_payment_mode'); ?> |
62 | -<?php if( isset( $wps_payment_mode['mode']['paypal']['active'] ) ): ?> |
|
62 | +<?php if (isset($wps_payment_mode['mode']['paypal']['active'])): ?> |
|
63 | 63 | <div class="wps-secured-logos"> |
64 | 64 | <span class="wps-logo-paypal"></span> |
65 | 65 | <span class="wps-logo-visa"></span> |
@@ -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 | * |