/var/www/html_us/wp-content/plugins/checkout-for-woocommerce/includes/Admin/Pages/SideCart.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php

namespace Objectiv\Plugins\Checkout\Admin\Pages;

use 
Objectiv\Plugins\Checkout\Managers\PlanManager;
use 
Objectiv\Plugins\Checkout\Managers\SettingsManager;

/**
 * @link checkoutwc.com
 * @since 5.0.0
 * @package Objectiv\Plugins\Checkout\Admin\Pages
 * @author Clifton Griffin <[email protected]>
 */
class SideCart extends PageAbstract {
    public function 
__construct() {
        
parent::__constructcfw__'Side Cart''checkout-wc' ), 'manage_options''side-cart' );
    }
    public function 
output() {
        
$this->output_form_open();
        
?>
        <table class="form-table">
            <tbody>
            <?php
            
if ( ! PlanManager::has_required_planPlanManager::PLUS ) ) {
                
$notice $this->get_upgrade_required_noticePlanManager::get_english_list_of_required_plans_htmlPlanManager::PLUS ) );
            }

            if ( ! empty( 
$notice ) ) {
                echo 
$notice;
            }

            
$this->output_toggle_checkbox(
                
'enable_side_cart',
                
cfw__'Enable Side Cart''checkout-wc' ),
                
cfw__'Replace your cart page with a beautiful side cart that slides in from the right when items are added to the cart.''checkout-wc' )
            );

            
$this->output_checkbox_row(
                
'enable_floating_cart_button',
                
cfw__'Enable Floating Cart Button''checkout-wc' ),
                
cfw__'Enable floating cart button on the bottom right of pages.''checkout-wc' ),
                
cfw__'For a custom button use this CSS class: <code>cfw-side-cart-open-trigger</code>''checkout-wc' )
            );

            
$this->output_number_input_row(
                
'floating_cart_button_right_position',
                
cfw__'Floating Cart Button Right Position''checkout-wc' ),
                
cfw__'The position from the right side of the screen in pixels. Default: 20''checkout-wc' )
            );

            
$this->output_number_input_row(
                
'floating_cart_button_bottom_position',
                
cfw__'Floating Cart Button Bottom Position''checkout-wc' ),
                
cfw__'The position from the bottom of the screen in pixels. Default: 20''checkout-wc' )
            );

            
$this->output_checkbox_row(
                
'enable_ajax_add_to_cart',
                
cfw__'Enable AJAX Add to Cart''checkout-wc' ),
                
cfw__'Use AJAX on archive and single product pages to add items to cart.''checkout-wc' ),
                
cfw__'By default, WooCommerce requires a full form submit with page reload. Enabling this option uses AJAX to add items to the cart.''checkout-wc' )
            );

            
$this->output_checkbox_row(
                
'enable_free_shipping_progress_bar',
                
cfw__'Enable Free Shipping Progress Bar''checkout-wc' ),
                
cfw__'Enable Free Shipping progress bar to show customers how close they are to obtaining free shipping.''checkout-wc' ),
                
cfw__'Uses your shipping settings to determine limits. To override, specify amount below.''checkout-wc' )
            );

            
$this->output_text_input_row(
                
'side_cart_free_shipping_threshold',
                
cfw__'Free Shipping Threshold''checkout-wc' ),
                
cfw__'Cart subtotal required to qualify for free shipping. To use automatic detection based on shipping configuration, leave blank.''checkout-wc' )
            );

            
$this->output_text_input_row(
                
'side_cart_amount_remaining_message',
                
cfw__'Amount Remaining Message''checkout-wc' ),
                
cfw__'The amount remaining to qualify for free shipping message. Leave blank for default. Default: You\'re %s away from free shipping!''checkout-wc' )
            );

            
$this->output_text_input_row(
                
'side_cart_free_shipping_message',
                
cfw__'Free Shipping Message''checkout-wc' ),
                
cfw__'The free shipping message. Leave blank for default. Default: Congrats! You get free standard shipping.''checkout-wc' )
            );

            
$progress_indicator_color_field_name    SettingsManager::instance()->get_field_name'side_cart_free_shipping_progress_indicator_color' );
            
$progress_indicator_color_saved_value   SettingsManager::instance()->get_setting'side_cart_free_shipping_progress_indicator_color' );
            
$progress_indicator_color_default_value cfw_get_active_template()->get_default_setting'button_color' );
            
?>
            <tr>
                <th scope="row" valign="top">
                    <label for="<?php echo $progress_indicator_color_field_name?>">
                        <?php cfw_e'Side Cart Free Shipping Progress Indicator Color''checkout-wc' ); ?>
                    </label>
                </th>
                <td>
                    <input class="cfw-admin-color-picker" type="text" id="side_cart_free_shipping_progress_indicator_color" name="<?php echo $progress_indicator_color_field_name?>" value="<?php echo empty( $progress_indicator_color_saved_value ) ? $progress_indicator_color_default_value $progress_indicator_color_saved_value?>" data-default-color="<?php echo $progress_indicator_color_default_value?>" />
                </td>
            </tr>
            <?php
            $progress_bg_color_field_name    
SettingsManager::instance()->get_field_name'side_cart_free_shipping_progress_bg_color' );
            
$progress_bg_color_saved_value   SettingsManager::instance()->get_setting'side_cart_free_shipping_progress_bg_color' );
            
$progress_bg_color_default_value '#f5f5f5';
            
?>
            <tr>
                <th scope="row" valign="top">
                    <label for="<?php echo $progress_bg_color_field_name?>">
                        <?php cfw_e'Side Cart Free Shipping Progress Background Color''checkout-wc' ); ?>
                    </label>
                </th>
                <td>
                    <input class="cfw-admin-color-picker" type="text" id="side_cart_free_shipping_progress_indicator_color" name="<?php echo $progress_bg_color_field_name?>" value="<?php echo empty( $progress_bg_color_saved_value ) ? $progress_bg_color_default_value $progress_bg_color_saved_value?>" data-default-color="<?php echo $progress_bg_color_default_value?>" />
                </td>
            </tr>
            </tbody>
        </table>
        <?php
        $this
->output_form_close();
    }
}