Version Description
- Fix - added missing strings for translation
- Fix - woocommerce_before_calculate_totals not updating
Download this release
Release Info
Developer | xootix |
Plugin | Side Cart Woocommerce (Ajax) |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.1
- README.txt +19 -19
- admin/assets/xoo-wsc-admin-style.css +30 -0
- admin/class-xoo-wsc-admin-settings.php +91 -0
- admin/class-xoo-wsc-admin.php +0 -171
- admin/css/xoo-wsc-admin.css +0 -184
- admin/index.php +0 -1
- admin/js/xoo-wsc-admin.js +0 -43
- admin/partials/images/1.png +0 -0
- admin/partials/images/2.png +0 -0
- admin/partials/images/3.png +0 -0
- admin/partials/images/4.png +0 -0
- admin/partials/images/5.png +0 -0
- admin/partials/images/6.png +0 -0
- admin/partials/images/7.png +0 -0
- admin/partials/images/8.png +0 -0
- admin/partials/images/9.png +0 -0
- admin/partials/xoo-wsc-admin-display.php +0 -84
- admin/partials/xoo-wsc-premium-info.php +0 -74
- admin/partials/xoo-wsc-sidebar.php +0 -69
- admin/settings/class-xoo-wsc-advanced-settings.php +0 -127
- admin/settings/class-xoo-wsc-general-settings.php +0 -569
- admin/settings/class-xoo-wsc-premium-settings.php +0 -40
- admin/settings/class-xoo-wsc-style-settings.php +0 -504
- admin/templates/xoo-wsc-tab-info.php +13 -0
- admin/templates/xoo-wsc-tab-pro.php +23 -0
- admin/views/sections.php +120 -0
- admin/views/settings/advanced.php +31 -0
- admin/views/settings/general.php +494 -0
- admin/views/settings/style.php +781 -0
- admin/views/tabs.php +29 -0
- assets/css/fonts/Woo-Side-Cart.eot +0 -0
- assets/css/fonts/Woo-Side-Cart.svg +58 -0
- assets/css/fonts/Woo-Side-Cart.ttf +0 -0
- assets/css/fonts/Woo-Side-Cart.woff +0 -0
- assets/css/xoo-wsc-fonts.css +171 -0
- assets/css/xoo-wsc-style.css +852 -0
- assets/images/arrow-left.png +0 -0
- assets/images/arrow-right.png +0 -0
- assets/js/xoo-wsc-main.js +932 -0
- includes/class-xoo-wsc-activator.php +0 -23
- includes/class-xoo-wsc-cart.php +314 -0
- includes/class-xoo-wsc-deactivator.php +0 -20
- includes/class-xoo-wsc-frontend.php +119 -0
- includes/class-xoo-wsc-helper.php +33 -0
- includes/class-xoo-wsc-i18n.php +0 -24
- includes/class-xoo-wsc-loader.php +144 -116
- includes/class-xoo-wsc-template-args.php +277 -0
- includes/class-xoo-wsc.php +0 -235
- includes/index.php +0 -1
- includes/xoo-framework/admin/assets/css/xoo-admin-style.css +356 -0
- includes/xoo-framework/admin/assets/js/xoo-admin-js.js +161 -0
- includes/xoo-framework/admin/class-xoo-admin-settings.php +753 -0
- includes/xoo-framework/admin/templates/global/info-shortcode.php +37 -0
- includes/xoo-framework/admin/templates/global/setting-upload.php +14 -0
- includes/xoo-framework/admin/templates/xoo-admin-settings-output.php +29 -0
- includes/xoo-framework/class-xoo-exception.php +29 -0
- includes/xoo-framework/class-xoo-helper.php +310 -0
- includes/xoo-framework/xoo-framework.php +16 -0
- includes/xoo-wsc-functions.php +16 -0
- index.php +0 -1
- languages/side-cart-woocommerce.pot +24 -164
- public/class-xoo-wsc-cart-data.php +0 -166
- public/class-xoo-wsc-public.php +0 -307
- public/css/fonts/Woo-Side-Cart.eot +0 -0
- public/css/fonts/Woo-Side-Cart.svg +0 -20
- public/css/fonts/Woo-Side-Cart.ttf +0 -0
- public/css/fonts/Woo-Side-Cart.woff +0 -0
- public/css/xoo-wsc-public.css +0 -376
- public/index.php +0 -1
- public/js/xoo-wsc-public.js +0 -324
- public/js/xoo-wsc-public.min.js +0 -1
- public/partials/xoo-wsc-content.php +0 -162
- public/partials/xoo-wsc-footer.php +0 -57
- public/partials/xoo-wsc-markup.php +0 -76
- templates/global/body/product.php +102 -0
- templates/global/footer/buttons.php +46 -0
- templates/global/footer/totals.php +36 -0
- templates/global/inline-style.php +258 -0
- templates/xoo-wsc-body.php +122 -0
- templates/xoo-wsc-container.php +71 -0
- templates/xoo-wsc-footer.php +27 -0
- templates/xoo-wsc-header.php +45 -0
- templates/xoo-wsc-markup.php +28 -0
- wpml-config.xml +20 -13
- xoo-wsc-main.php +47 -0
- xoo-wsc.php +0 -98
README.txt
CHANGED
@@ -1,30 +1,27 @@
|
|
1 |
-
===
|
2 |
Contributors: XootiX
|
3 |
Donate link: https://www.paypal.me/xootix
|
4 |
-
Tags:
|
5 |
Requires at least: 3.0.1
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
|
12 |
|
13 |
== Description ==
|
14 |
[Live Demo](http://demo.xootix.com/side-cart-for-woocommerce/)
|
15 |
-
|
16 |
-
|
17 |
-
Plugin has ajax add to cart feature on single product pages too.
|
18 |
-
|
19 |
|
20 |
|
21 |
### Features And Options:
|
22 |
-
*
|
23 |
-
*
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
* Fully Customizable.
|
28 |
|
29 |
== Installation ==
|
30 |
|
@@ -39,6 +36,7 @@ Plugin has ajax add to cart feature on single product pages too.
|
|
39 |
Everything is already setup.Just activate the plugin & you are done.
|
40 |
|
41 |
= How to translate? =
|
|
|
42 |
1. Download PoEdit.
|
43 |
2. Open the side-cart-woocommerce.pot file in PoEdit. (/plugins/side-cart-woocommerce/languages/
|
44 |
side-cart-woocommerce.pot)
|
@@ -51,11 +49,14 @@ Everything is already setup.Just activate the plugin & you are done.
|
|
51 |
1. Front End.
|
52 |
2. General Settings 1
|
53 |
3. General Settings 2
|
54 |
-
4. Style Settings
|
55 |
-
5. Style Settings 2
|
56 |
|
57 |
== Changelog ==
|
58 |
|
|
|
|
|
|
|
|
|
59 |
= 2.0 =
|
60 |
* Fix - Error notices
|
61 |
|
@@ -66,5 +67,4 @@ Everything is already setup.Just activate the plugin & you are done.
|
|
66 |
* Fix - Bugs
|
67 |
|
68 |
= 1.0.0 =
|
69 |
-
* Initial Public Release.
|
70 |
-
|
1 |
+
===Side Cart Woocommerce (Ajax)===
|
2 |
Contributors: XootiX
|
3 |
Donate link: https://www.paypal.me/xootix
|
4 |
+
Tags: popup,floating cart,ajax,cart,slider
|
5 |
Requires at least: 3.0.1
|
6 |
+
Tested up to: 6.1
|
7 |
+
Stable tag: 2.1
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Manage your cart from just a click away with an interactive design
|
12 |
|
13 |
== Description ==
|
14 |
[Live Demo](http://demo.xootix.com/side-cart-for-woocommerce/)
|
15 |
+
Say good bye to your woocommerce cart page. With side cart users can access cart items from anywhere on your site.
|
16 |
+
Plugin is completely ajax based. ( Ajax? Ehh!! - no refresh )
|
|
|
|
|
17 |
|
18 |
|
19 |
### Features And Options:
|
20 |
+
* Ajax add to cart & remove
|
21 |
+
* Fully Customizable
|
22 |
+
- Choose what to show in cart
|
23 |
+
- Hide cart on specific pages.
|
24 |
+
- Set cart width, height, colors, layout almost everything.
|
|
|
25 |
|
26 |
== Installation ==
|
27 |
|
36 |
Everything is already setup.Just activate the plugin & you are done.
|
37 |
|
38 |
= How to translate? =
|
39 |
+
You can use any third party plugin such as Loco Translate for hastle free translations or follow the instructions below
|
40 |
1. Download PoEdit.
|
41 |
2. Open the side-cart-woocommerce.pot file in PoEdit. (/plugins/side-cart-woocommerce/languages/
|
42 |
side-cart-woocommerce.pot)
|
49 |
1. Front End.
|
50 |
2. General Settings 1
|
51 |
3. General Settings 2
|
52 |
+
4. Style Settings
|
|
|
53 |
|
54 |
== Changelog ==
|
55 |
|
56 |
+
= 2.1 =
|
57 |
+
* Fix - added missing strings for translation
|
58 |
+
* Fix - woocommerce_before_calculate_totals not updating
|
59 |
+
|
60 |
= 2.0 =
|
61 |
* Fix - Error notices
|
62 |
|
67 |
* Fix - Bugs
|
68 |
|
69 |
= 1.0.0 =
|
70 |
+
* Initial Public Release.
|
|
admin/assets/xoo-wsc-admin-style.css
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.xoo-wsc-premium {
|
2 |
+
padding: 20px 0;
|
3 |
+
}
|
4 |
+
|
5 |
+
.xoo-wscp-head {
|
6 |
+
font-size: 24px;
|
7 |
+
font-weight: bold;
|
8 |
+
}
|
9 |
+
|
10 |
+
.xoo-wscp-head a {
|
11 |
+
font-size: 15px;
|
12 |
+
margin: 0 3px;
|
13 |
+
}
|
14 |
+
|
15 |
+
ul.xoo-wscp-features {
|
16 |
+
margin: 10px 20px;
|
17 |
+
padding: 0;
|
18 |
+
list-style-type: disc;
|
19 |
+
color: #2a9d8f;
|
20 |
+
font-weight: 600;
|
21 |
+
font-size: 16px;
|
22 |
+
}
|
23 |
+
|
24 |
+
ul.xoo-wscp-features li {
|
25 |
+
padding: 7px 0px;
|
26 |
+
}
|
27 |
+
|
28 |
+
.xoo-settings-container[active-tab="pro"] .xoo-sc-bottom-btns {
|
29 |
+
display: none;
|
30 |
+
}
|
admin/class-xoo-wsc-admin-settings.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Xoo_Wsc_Admin_Settings{
|
4 |
+
|
5 |
+
protected static $_instance = null;
|
6 |
+
|
7 |
+
public static function get_instance(){
|
8 |
+
if ( is_null( self::$_instance ) ) {
|
9 |
+
self::$_instance = new self();
|
10 |
+
}
|
11 |
+
return self::$_instance;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function __construct(){
|
15 |
+
$this->hooks();
|
16 |
+
}
|
17 |
+
|
18 |
+
|
19 |
+
public function hooks(){
|
20 |
+
if( current_user_can( 'manage_options' ) ){
|
21 |
+
add_action( 'init', array( $this, 'generate_settings' ), 0 );
|
22 |
+
add_action( 'admin_menu', array( $this, 'add_menu_pages' ) );
|
23 |
+
}
|
24 |
+
add_action( 'xoo_as_enqueue_scripts', array( $this, 'enqueue_custom_scripts' ) );
|
25 |
+
add_action( 'xoo_tab_page_end', array( $this, 'tab_html' ), 10, 2 );
|
26 |
+
add_filter( 'plugin_action_links_' . XOO_WSC_PLUGIN_BASENAME, array( $this, 'plugin_action_links' ) );
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Show action links on the plugin screen.
|
33 |
+
*
|
34 |
+
* @param mixed $links Plugin Action links
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
public function plugin_action_links( $links ) {
|
38 |
+
$action_links = array(
|
39 |
+
'settings' => '<a href="' . admin_url( 'admin.php?page=side-cart-woocommerce-settings' ) . '">Settings</a>',
|
40 |
+
'support' => '<a href="https://xootix.com/contact" target="__blank">Support</a>',
|
41 |
+
'upgrade' => '<a href="https://xootix.com/plugins/side-cart-for-woocommerce" target="__blank">Upgrade</a>',
|
42 |
+
);
|
43 |
+
|
44 |
+
return array_merge( $action_links, $links );
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
public function enqueue_custom_scripts( $slug ){
|
50 |
+
if( $slug !== 'side-cart-woocommerce' ) return;
|
51 |
+
wp_enqueue_style( 'xoo-wsc-admin-fonts', XOO_WSC_URL . '/assets/css/xoo-wsc-fonts.css', array(), XOO_WSC_VERSION );
|
52 |
+
wp_enqueue_style( 'xoo-wsc-admin-style', XOO_WSC_URL . '/admin/assets/xoo-wsc-admin-style.css', array(), XOO_WSC_VERSION );
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
public function generate_settings(){
|
57 |
+
xoo_wsc_helper()->admin->auto_generate_settings();
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
|
62 |
+
public function add_menu_pages(){
|
63 |
+
|
64 |
+
$args = array(
|
65 |
+
'menu_title' => 'Side Cart',
|
66 |
+
'icon' => 'dashicons-cart',
|
67 |
+
);
|
68 |
+
|
69 |
+
xoo_wsc_helper()->admin->register_menu_page( $args );
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
public function tab_html( $tab_id, $tab_data ){
|
75 |
+
|
76 |
+
if( $tab_id === 'pro' ){
|
77 |
+
xoo_wsc_helper()->get_template( 'xoo-wsc-tab-pro.php', array(), XOO_WSC_PATH.'/admin/templates/' );
|
78 |
+
}
|
79 |
+
|
80 |
+
if( $tab_id === 'info' ){
|
81 |
+
xoo_wsc_helper()->get_template( 'xoo-wsc-tab-info.php', array(), XOO_WSC_PATH.'/admin/templates/' );
|
82 |
+
}
|
83 |
+
|
84 |
+
}
|
85 |
+
|
86 |
+
}
|
87 |
+
|
88 |
+
function xoo_wsc_admin_settings(){
|
89 |
+
return Xoo_Wsc_Admin_Settings::get_instance();
|
90 |
+
}
|
91 |
+
xoo_wsc_admin_settings();
|
admin/class-xoo-wsc-admin.php
DELETED
@@ -1,171 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The admin-specific functionality of the plugin.
|
4 |
-
*
|
5 |
-
* Defines the plugin name, version, and two examples hooks for how to
|
6 |
-
* enqueue the admin-specific stylesheet and JavaScript.
|
7 |
-
*
|
8 |
-
* @package WooCommerce Side Cart
|
9 |
-
*/
|
10 |
-
class xoo_wsc_Admin {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* The ID of this plugin.
|
14 |
-
*
|
15 |
-
* @since 1.0.0
|
16 |
-
* @access private
|
17 |
-
* @var string $xoo_wsc The ID of this plugin.
|
18 |
-
*/
|
19 |
-
private $xoo_wsc;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* The version of this plugin.
|
23 |
-
*
|
24 |
-
* @since 1.0.0
|
25 |
-
* @access private
|
26 |
-
* @var string $version The current version of this plugin.
|
27 |
-
*/
|
28 |
-
private $version;
|
29 |
-
|
30 |
-
public $plugin_settings_tabs = array();
|
31 |
-
/**
|
32 |
-
* Initialize the class and set its properties.
|
33 |
-
*
|
34 |
-
* @since 1.0.0
|
35 |
-
* @param string $xoo_wsc The name of this plugin.
|
36 |
-
* @param string $version The version of this plugin.
|
37 |
-
*/
|
38 |
-
public function __construct( $xoo_wsc, $version ) {
|
39 |
-
|
40 |
-
$this->xoo_wsc = $xoo_wsc;
|
41 |
-
$this->version = $version;
|
42 |
-
|
43 |
-
$this->plugin_settings_tabs['general'] = 'General';
|
44 |
-
$this->plugin_settings_tabs['style'] = 'Style';
|
45 |
-
$this->plugin_settings_tabs['advanced'] = 'Advanced';
|
46 |
-
$this->plugin_settings_tabs['premium'] = 'Premium';
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Register the stylesheets for the admin area.
|
51 |
-
*
|
52 |
-
* @since 1.0.0
|
53 |
-
*/
|
54 |
-
public function enqueue_styles($hook) {
|
55 |
-
|
56 |
-
//Enqueue Styles only on plugin settings page
|
57 |
-
if($hook != 'toplevel_page_xoo-wsc'){
|
58 |
-
return;
|
59 |
-
}
|
60 |
-
wp_enqueue_style('wp-color-picker');
|
61 |
-
wp_enqueue_style( $this->xoo_wsc, plugin_dir_url( __FILE__ ) . 'css/xoo-wsc-admin.css', array(), $this->version, 'all' );
|
62 |
-
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Register the JavaScript for the admin area.
|
67 |
-
*
|
68 |
-
* @since 1.0.0
|
69 |
-
*/
|
70 |
-
public function enqueue_scripts($hook) {
|
71 |
-
|
72 |
-
//Enqueue Script only on plugin settings page
|
73 |
-
if($hook != 'toplevel_page_xoo-wsc'){
|
74 |
-
return;
|
75 |
-
}
|
76 |
-
wp_enqueue_script( $this->xoo_wsc, plugin_dir_url( __FILE__ ) . 'js/xoo-wsc-admin.js', array( 'jquery','wp-color-picker'), $this->version, false );
|
77 |
-
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Register the Settings page.
|
82 |
-
*
|
83 |
-
* @since 1.0.0
|
84 |
-
*/
|
85 |
-
public function admin_menu() {
|
86 |
-
|
87 |
-
add_menu_page( __('Woo Side Cart', $this->xoo_wsc), __('Woo Side Cart', $this->xoo_wsc), 'manage_options', $this->xoo_wsc, array($this, 'display_plugin_admin_page'),'dashicons-cart', 61);
|
88 |
-
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Settings - Validates saved options
|
93 |
-
*
|
94 |
-
* @since 1.0.0
|
95 |
-
* @param array $input array of submitted plugin options
|
96 |
-
* @return array array of validated plugin options
|
97 |
-
*/
|
98 |
-
public function settings_sanitize( $input ) {
|
99 |
-
|
100 |
-
// Initialize the new array that will hold the sanitize values
|
101 |
-
$new_input = array();
|
102 |
-
|
103 |
-
if(isset($input)) {
|
104 |
-
// Loop through the input and sanitize each of the values
|
105 |
-
foreach ( $input as $key => $val ) {
|
106 |
-
|
107 |
-
$new_input[ $key ] = sanitize_text_field( $val );
|
108 |
-
|
109 |
-
}
|
110 |
-
|
111 |
-
}
|
112 |
-
|
113 |
-
return $new_input;
|
114 |
-
|
115 |
-
} // sanitize()
|
116 |
-
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Renders Settings Tabs
|
120 |
-
*
|
121 |
-
* @since 1.0.0
|
122 |
-
* @return mixed The settings field
|
123 |
-
*/
|
124 |
-
function render_tabs() {
|
125 |
-
$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'general';
|
126 |
-
|
127 |
-
echo '<h2 class="nav-tab-wrapper">';
|
128 |
-
foreach ( $this->plugin_settings_tabs as $tab_key => $tab_caption ) {
|
129 |
-
$active = $current_tab == $tab_key ? 'nav-tab-active' : '';
|
130 |
-
echo '<a class="nav-tab ' . $active . '" href="?page=' . $this->xoo_wsc . '&tab=' . $tab_key . '">' . $tab_caption . '</a>';
|
131 |
-
}
|
132 |
-
echo '</h2>';
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Plugin Settings Link on plugin page
|
137 |
-
*
|
138 |
-
* @since 1.0.0
|
139 |
-
* @return mixed The settings field
|
140 |
-
*/
|
141 |
-
function add_settings_link( $links ) {
|
142 |
-
|
143 |
-
$mylinks = array(
|
144 |
-
'<a href="' . admin_url( 'options-general.php?page=wsc' ) . '">Settings</a>',
|
145 |
-
);
|
146 |
-
return array_merge( $links, $mylinks );
|
147 |
-
}
|
148 |
-
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Callback function for the admin settings page.
|
152 |
-
*
|
153 |
-
* @since 1.0.0
|
154 |
-
*/
|
155 |
-
public function display_plugin_admin_page(){
|
156 |
-
|
157 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/partials/xoo-wsc-admin-display.php';
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Section function markup
|
162 |
-
*
|
163 |
-
* @since 1.0.0
|
164 |
-
*/
|
165 |
-
public function get_section_markup($title){
|
166 |
-
echo '<span class="section-title">'.$title.'</span>';
|
167 |
-
|
168 |
-
}
|
169 |
-
|
170 |
-
|
171 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/css/xoo-wsc-admin.css
DELETED
@@ -1,184 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* All of the CSS for your admin-specific functionality should be
|
3 |
-
* included in this file.
|
4 |
-
*/
|
5 |
-
.section-title{
|
6 |
-
display: block;
|
7 |
-
font-weight: 600;
|
8 |
-
text-transform: uppercase;
|
9 |
-
padding-bottom: 5px;
|
10 |
-
font-size: 17px;
|
11 |
-
margin: 0 -10px;
|
12 |
-
padding: 8px;
|
13 |
-
background-color: #5e6871;
|
14 |
-
color: #ffffff;
|
15 |
-
}
|
16 |
-
.xoo-main{
|
17 |
-
background-color: #ffffff;
|
18 |
-
padding: 0 10px;
|
19 |
-
max-width: 1000px;
|
20 |
-
flex-grow: 1;
|
21 |
-
}
|
22 |
-
.xoo-container {
|
23 |
-
margin-top: 12px;
|
24 |
-
display: flex;
|
25 |
-
}
|
26 |
-
input[name="xoo_wsc_gl_options[sc-shipping-text]"]{
|
27 |
-
width: 500px;
|
28 |
-
}
|
29 |
-
table.form-table{
|
30 |
-
margin-bottom: 20px;
|
31 |
-
}
|
32 |
-
|
33 |
-
/*sidebar*/
|
34 |
-
.xoo-sidebar{
|
35 |
-
margin-left: 40px;
|
36 |
-
background-color: #fff;
|
37 |
-
display: table;
|
38 |
-
padding: 10px 15px;
|
39 |
-
max-width: 315px;
|
40 |
-
min-width: 315px;
|
41 |
-
position: relative;
|
42 |
-
}
|
43 |
-
.xoo-op-plugin-icon {
|
44 |
-
display: table;
|
45 |
-
float: left;
|
46 |
-
}
|
47 |
-
|
48 |
-
.xoo-op-plugin-icon span.dashicons {
|
49 |
-
font-size: 36px;
|
50 |
-
display: table;
|
51 |
-
color: #5e6871;
|
52 |
-
}
|
53 |
-
|
54 |
-
span.xoo-op-plugin-about {
|
55 |
-
display: block;
|
56 |
-
margin-top: 4px;
|
57 |
-
}
|
58 |
-
|
59 |
-
.xoo-op-plugin-details a {
|
60 |
-
padding-right: 5px;
|
61 |
-
}
|
62 |
-
|
63 |
-
li.xoo-op-plugin {
|
64 |
-
padding: 14px 0;
|
65 |
-
display: flex;
|
66 |
-
align-items: center;
|
67 |
-
border-bottom: 1px solid #e4e4e4;
|
68 |
-
}
|
69 |
-
|
70 |
-
.xoo-op-plugin-details {
|
71 |
-
margin-left: 10px;
|
72 |
-
}
|
73 |
-
.xoo-op-plugin-head{
|
74 |
-
font-size: 17px;
|
75 |
-
display: block;
|
76 |
-
}
|
77 |
-
.xoo-op-head{
|
78 |
-
display: block;
|
79 |
-
font-size: 16px;
|
80 |
-
border-bottom: 1px solid #e4e4e4;
|
81 |
-
padding-bottom: 7px;
|
82 |
-
text-transform: uppercase;
|
83 |
-
font-weight: 600;
|
84 |
-
text-align: left;
|
85 |
-
}
|
86 |
-
ul.xoo-op-list li:first-child{
|
87 |
-
padding-top: 0;
|
88 |
-
}
|
89 |
-
|
90 |
-
a.xoo-sidebar-toggle {
|
91 |
-
cursor: pointer;
|
92 |
-
text-decoration: underline;
|
93 |
-
position: absolute;
|
94 |
-
right: 10px;
|
95 |
-
top: 10px;
|
96 |
-
}
|
97 |
-
.xoo-sidebar-show .xoo-other-plugins{
|
98 |
-
display: none;
|
99 |
-
}
|
100 |
-
.xoo-sidebar-show a.xoo-sidebar-toggle {
|
101 |
-
padding: 10px;
|
102 |
-
position: relative;
|
103 |
-
top: 0;
|
104 |
-
right: 0;
|
105 |
-
}
|
106 |
-
|
107 |
-
.xoo-sidebar.xoo-sidebar-show {
|
108 |
-
min-width: 50px;
|
109 |
-
margin-left: 10px;
|
110 |
-
}
|
111 |
-
|
112 |
-
/* End sidebar */
|
113 |
-
|
114 |
-
|
115 |
-
.prem-images{
|
116 |
-
cursor: not-allowed;
|
117 |
-
opacity: 0.8;
|
118 |
-
}
|
119 |
-
.prem-images img{
|
120 |
-
width: 100%;
|
121 |
-
height: 100%;
|
122 |
-
max-width: 800px;
|
123 |
-
}
|
124 |
-
.xoo-wsc-prem .xoo-hero-btns{
|
125 |
-
display: table;
|
126 |
-
margin: 10px auto;
|
127 |
-
}
|
128 |
-
.xoo-wsc-prem .xoo-hero-btns a{
|
129 |
-
margin: 0 10px;
|
130 |
-
}
|
131 |
-
|
132 |
-
/* Free vs Premium */
|
133 |
-
.xoo-fvsp{
|
134 |
-
margin: 30px 0;
|
135 |
-
}
|
136 |
-
|
137 |
-
.xoo-fvsp-head{
|
138 |
-
display: table;
|
139 |
-
margin: 0 auto;
|
140 |
-
font-size: 30px;
|
141 |
-
}
|
142 |
-
table.xoo-fvsp-table{
|
143 |
-
width: 100%;
|
144 |
-
border-collapse: collapse;
|
145 |
-
border: 1px solid #eee;
|
146 |
-
margin-top: 25px;
|
147 |
-
}
|
148 |
-
table.xoo-fvsp-table td {
|
149 |
-
padding: 10px 20px;
|
150 |
-
border: 0;
|
151 |
-
margin: 0;
|
152 |
-
}
|
153 |
-
table.xoo-fvsp-table th{
|
154 |
-
padding: 10px 20px;
|
155 |
-
color: #333;
|
156 |
-
font-weight: 600;
|
157 |
-
font-size: 16px;
|
158 |
-
}
|
159 |
-
table.xoo-fvsp-table th span{
|
160 |
-
font-size: 12px;
|
161 |
-
}
|
162 |
-
table.xoo-fvsp-table tbody tr:nth-child(odd){
|
163 |
-
background-color: #f0f0f0;
|
164 |
-
}
|
165 |
-
.xfp-yes{
|
166 |
-
color: #3c763d;
|
167 |
-
text-align: center;
|
168 |
-
}
|
169 |
-
.xfp-no{
|
170 |
-
text-align: center;
|
171 |
-
color: #a94442;
|
172 |
-
}
|
173 |
-
.xfp-alert{
|
174 |
-
color: #0000ff;
|
175 |
-
}
|
176 |
-
/**** -- */
|
177 |
-
.prem-images h3{
|
178 |
-
margin: 5px;
|
179 |
-
}
|
180 |
-
.prem-images span{
|
181 |
-
font-size: 16px;
|
182 |
-
margin: 5px 0 10px 5px;
|
183 |
-
display: block;
|
184 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/index.php
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php // Silence is golden
|
|
admin/js/xoo-wsc-admin.js
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function($){
|
2 |
-
'use strict';
|
3 |
-
|
4 |
-
//Initialize Color Picker
|
5 |
-
$(function(){
|
6 |
-
$('.color-field').wpColorPicker();
|
7 |
-
});
|
8 |
-
|
9 |
-
|
10 |
-
//Sidebar JS
|
11 |
-
$(function(){
|
12 |
-
var show_class = 'xoo-sidebar-show';
|
13 |
-
var sidebar = $('.xoo-sidebar');
|
14 |
-
var togglebar = $('.xoo-sidebar-toggle');
|
15 |
-
|
16 |
-
//Show / hide sidebar
|
17 |
-
if(localStorage.xoo_admin_sidebar_display){
|
18 |
-
if(localStorage.xoo_admin_sidebar_display == 'shown'){
|
19 |
-
sidebar.removeClass(show_class);
|
20 |
-
}
|
21 |
-
else{
|
22 |
-
sidebar.addClass(show_class);
|
23 |
-
}
|
24 |
-
on_sidebar_toggle();
|
25 |
-
}
|
26 |
-
|
27 |
-
togglebar.on('click',function(){
|
28 |
-
sidebar.toggleClass(show_class);
|
29 |
-
on_sidebar_toggle();
|
30 |
-
})
|
31 |
-
|
32 |
-
function on_sidebar_toggle(){
|
33 |
-
if(sidebar.hasClass(show_class)){
|
34 |
-
togglebar.text('Show');
|
35 |
-
var display = "hidden";
|
36 |
-
}else{
|
37 |
-
togglebar.text('Hide');
|
38 |
-
var display = "shown";
|
39 |
-
}
|
40 |
-
localStorage.setItem("xoo_admin_sidebar_display",display);
|
41 |
-
}
|
42 |
-
});
|
43 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/images/1.png
DELETED
Binary file
|
admin/partials/images/2.png
DELETED
Binary file
|
admin/partials/images/3.png
DELETED
Binary file
|
admin/partials/images/4.png
DELETED
Binary file
|
admin/partials/images/5.png
DELETED
Binary file
|
admin/partials/images/6.png
DELETED
Binary file
|
admin/partials/images/7.png
DELETED
Binary file
|
admin/partials/images/8.png
DELETED
Binary file
|
admin/partials/images/9.png
DELETED
Binary file
|
admin/partials/xoo-wsc-admin-display.php
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Provide a dashboard view for the plugin
|
5 |
-
*
|
6 |
-
* This file is used to markup the public-facing aspects of the plugin.
|
7 |
-
*
|
8 |
-
* @since 1.0.0
|
9 |
-
*
|
10 |
-
* @package xoo-wsc
|
11 |
-
* @subpackage xoo-wsc/admin/partials
|
12 |
-
*/
|
13 |
-
?>
|
14 |
-
<?php
|
15 |
-
?>
|
16 |
-
<div class="wrap">
|
17 |
-
<?php
|
18 |
-
$tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'general';
|
19 |
-
$this->render_tabs();
|
20 |
-
?>
|
21 |
-
|
22 |
-
<div class="xoo-container">
|
23 |
-
|
24 |
-
<div class="xoo-main">
|
25 |
-
<?php
|
26 |
-
switch ($tab) {
|
27 |
-
case 'style': ?>
|
28 |
-
<form method="post" action="options.php">
|
29 |
-
<?php
|
30 |
-
settings_fields( 'xoo-wsc-sy-options' ); // Display Settings
|
31 |
-
|
32 |
-
do_settings_sections( 'xoo-wsc-sy' ); // Display Sections
|
33 |
-
|
34 |
-
submit_button( 'Save Settings' ); // Display Save Button
|
35 |
-
?>
|
36 |
-
</form>
|
37 |
-
<?php
|
38 |
-
break;
|
39 |
-
case 'advanced':
|
40 |
-
?>
|
41 |
-
<form method="post" action="options.php">
|
42 |
-
|
43 |
-
<?php
|
44 |
-
settings_fields( 'xoo-wsc-av-options' );
|
45 |
-
|
46 |
-
do_settings_sections( 'xoo-wsc-av' );
|
47 |
-
|
48 |
-
submit_button( 'Save Settings' );
|
49 |
-
?>
|
50 |
-
</form>
|
51 |
-
|
52 |
-
<?php
|
53 |
-
break;
|
54 |
-
case 'premium':
|
55 |
-
?>
|
56 |
-
<?php include(plugin_dir_path(__FILE__).'xoo-wsc-premium-info.php'); ?>
|
57 |
-
|
58 |
-
<?php
|
59 |
-
break;
|
60 |
-
default:
|
61 |
-
?>
|
62 |
-
<form method="post" action="options.php">
|
63 |
-
<?php
|
64 |
-
settings_fields( 'xoo-wsc-gl-options' );
|
65 |
-
|
66 |
-
do_settings_sections( 'xoo-wsc-gl' );
|
67 |
-
|
68 |
-
submit_button( 'Save Settings' );
|
69 |
-
?>
|
70 |
-
<div class="clear"></div>
|
71 |
-
</form>
|
72 |
-
<?php
|
73 |
-
}
|
74 |
-
?>
|
75 |
-
</div>
|
76 |
-
|
77 |
-
<div class="xoo-sidebar">
|
78 |
-
<?php include XOO_WSC_PATH.'/admin/partials/xoo-wsc-sidebar.php'; ?>
|
79 |
-
</div>
|
80 |
-
</div>
|
81 |
-
</div>
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/xoo-wsc-premium-info.php
DELETED
@@ -1,74 +0,0 @@
|
|
1 |
-
<div class="xoo-wsc-prem">
|
2 |
-
<div class="xoo-hero-btns">
|
3 |
-
<a class="buy-prem button button-primary button-hero" href="http://demo.xootix.com/side-cart-for-woocommerce/">LIVE DEMO</a>
|
4 |
-
<a class="live-demo button button-primary button-hero" href="http://xootix.com/plugins/side-cart-for-woocommerce/">BUY PREMIUM</a>
|
5 |
-
</div>
|
6 |
-
|
7 |
-
<!-- Free V/s Premium -->
|
8 |
-
<div class="xoo-fvsp">
|
9 |
-
<span class="xoo-fvsp-head">Free V/s Premium</span>
|
10 |
-
|
11 |
-
<?php
|
12 |
-
|
13 |
-
$table_content = array(
|
14 |
-
array('Add to cart without refresh on product page','yes','yes'),
|
15 |
-
array('Hide basket on specific pages','yes','yes'),
|
16 |
-
array('Update quantity from the side cart','no','yes','alert'),
|
17 |
-
array('Show shipping / Apply Coupons','no','yes','alert'),
|
18 |
-
array('Paypal Express Checkout','no','yes','alert'),
|
19 |
-
array('Show Total Sales','no','yes','alert'),
|
20 |
-
array('Notification on cart update','no','yes','alert'),
|
21 |
-
array('Cross-Sells / Up-Sells / Related Products','no','yes','alert'),
|
22 |
-
array('Header menu SHORTCODE (Use anywhere)','no','yes','alert'),
|
23 |
-
array('Different basket icons / Custom Image','no','yes','alert'),
|
24 |
-
array('Hide basket when empty','no','yes','alert'),
|
25 |
-
array('Fly to cart animation','no','yes'),
|
26 |
-
array('Additional styling options','no','yes'),
|
27 |
-
);
|
28 |
-
|
29 |
-
?>
|
30 |
-
|
31 |
-
<table class="xoo-fvsp-table">
|
32 |
-
<thead>
|
33 |
-
<tr>
|
34 |
-
<th></th>
|
35 |
-
<th>Free</th>
|
36 |
-
<th>Premium</th>
|
37 |
-
</tr>
|
38 |
-
</thead>
|
39 |
-
|
40 |
-
<tbody>
|
41 |
-
<?php
|
42 |
-
$html = '';
|
43 |
-
foreach ($table_content as $table_row) {
|
44 |
-
$html .= '<tr>';
|
45 |
-
$alert = isset($table_row[3]) ? 'class=xfp-alert' : '';
|
46 |
-
$html .= '<td '.$alert.'>'.$table_row[0].'</td>';
|
47 |
-
$html .= '<td class="xfp-'.$table_row[1].'"><span class="dashicons dashicons-'.$table_row[1].'"></span></td>';
|
48 |
-
$html .= '<td class="xfp-'.$table_row[2].'"><span class="dashicons dashicons-'.$table_row[2].'"></span></td>';
|
49 |
-
$html .= '</tr>';
|
50 |
-
}
|
51 |
-
|
52 |
-
echo $html;
|
53 |
-
?>
|
54 |
-
</tbody>
|
55 |
-
|
56 |
-
</table>
|
57 |
-
|
58 |
-
</div>
|
59 |
-
|
60 |
-
|
61 |
-
<div class="prem-images">
|
62 |
-
<h3>Premium Options</h3>
|
63 |
-
<span>Menu Shortcode - [xoo_wsc_cart]</span>
|
64 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ).'images/1.png'?>">
|
65 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ).'images/2.png'?>">
|
66 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ).'images/3.png'?>">
|
67 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ).'images/4.png'?>">
|
68 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ).'images/5.png'?>">
|
69 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ).'images/6.png'?>">
|
70 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ).'images/7.png'?>">
|
71 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ).'images/8.png'?>">
|
72 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ).'images/9.png'?>">
|
73 |
-
</div>
|
74 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/xoo-wsc-sidebar.php
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$plugins_list = array(
|
3 |
-
array(
|
4 |
-
'title' => 'Woo Login/Signup Popup',
|
5 |
-
'dashicon' => 'dashicons-unlock',
|
6 |
-
'desc' => 'Allow users to login/signup anywhere from the site with the simple pop up.',
|
7 |
-
'demo' => 'http://demo.xootix.com/easy-login-for-woocommerce',
|
8 |
-
'download' => 'https://wordpress.org/plugins/easy-login-woocommerce/'
|
9 |
-
),
|
10 |
-
|
11 |
-
array(
|
12 |
-
'title' => 'Woo Side Cart',
|
13 |
-
'dashicon' => 'dashicons-cart',
|
14 |
-
'desc' => 'Adds a site wide basket icon that displays the added cart items.',
|
15 |
-
'demo' => 'http://demo.xootix.com/side-cart-for-woocommerce',
|
16 |
-
'download' => 'https://wordpress.org/plugins/side-cart-woocommerce/'
|
17 |
-
),
|
18 |
-
|
19 |
-
array(
|
20 |
-
'title' => 'Woo Waitlist',
|
21 |
-
'dashicon' => 'dashicons-list-view',
|
22 |
-
'desc' => 'Lets you track demand for out-of-stock items, ensuring your customers feel informed.',
|
23 |
-
'demo' => 'http://demo.xootix.com/waitlist-for-woocommerce',
|
24 |
-
'download' => 'https://wordpress.org/plugins/waitlist-woocommerce/'
|
25 |
-
),
|
26 |
-
|
27 |
-
array(
|
28 |
-
'title' => 'Woo Quick View',
|
29 |
-
'dashicon' => 'dashicons-welcome-view-site',
|
30 |
-
'desc' => 'Allow users to get a quick look of products without opening the product page.',
|
31 |
-
'demo' => 'http://demo.xootix.com/quick-view-for-woocommerce',
|
32 |
-
'download' => 'https://wordpress.org/plugins/quick-view-woocommerce/'
|
33 |
-
),
|
34 |
-
|
35 |
-
array(
|
36 |
-
'title' => 'Woo Cart Popup',
|
37 |
-
'dashicon' => 'dashicons-cart',
|
38 |
-
'desc' => 'Shows the item added to cart without page refresh.',
|
39 |
-
'demo' => 'http://demo.xootix.com/cart-pop-up-for-woocommerce',
|
40 |
-
'download' => 'https://wordpress.org/plugins/added-to-cart-popup-woocommerce/'
|
41 |
-
),
|
42 |
-
)
|
43 |
-
?>
|
44 |
-
|
45 |
-
<a class="xoo-sidebar-toggle">Hide</a>
|
46 |
-
<div class="xoo-other-plugins">
|
47 |
-
<div class="xoo-sidebar-head">
|
48 |
-
<span class="xoo-op-head">Try other awesome plugins</span>
|
49 |
-
</div>
|
50 |
-
|
51 |
-
<ul class="xoo-op-list">
|
52 |
-
|
53 |
-
<?php foreach($plugins_list as $plugin): ?>
|
54 |
-
<li class="xoo-op-plugin">
|
55 |
-
<div class="xoo-op-plugin-icon">
|
56 |
-
<span class="dashicons <?php echo $plugin['dashicon']; ?>"></span>
|
57 |
-
</div>
|
58 |
-
|
59 |
-
<div class="xoo-op-plugin-details">
|
60 |
-
<span class="xoo-op-plugin-head"><?php echo $plugin['title']; ?></span>
|
61 |
-
<span class="xoo-op-plugin-about"><?php echo $plugin['desc']; ?></span>
|
62 |
-
<a href="<?php echo $plugin['demo']; ?>">Demo</a>
|
63 |
-
<a href="<?php echo $plugin['download']; ?>">Download</a>
|
64 |
-
</div>
|
65 |
-
</li>
|
66 |
-
<?php endforeach; ?>
|
67 |
-
</ul>
|
68 |
-
<a href="http://xootix.com/support">Need Help? Use Live Chat</a>
|
69 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/settings/class-xoo-wsc-advanced-settings.php
DELETED
@@ -1,127 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Admin Part of Plugin, dashboard and options.
|
5 |
-
*
|
6 |
-
* @package WooCommerce Side Cart
|
7 |
-
*/
|
8 |
-
class xoo_wsc_Advanced_Settings extends xoo_wsc_Admin {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* The ID of this plugin.
|
12 |
-
*
|
13 |
-
* @since 1.0.0
|
14 |
-
* @access private
|
15 |
-
* @var string $xoo_wsc The ID of this plugin.
|
16 |
-
*/
|
17 |
-
private $xoo_wsc;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* The ID of Advanced Settings.
|
21 |
-
*
|
22 |
-
* @since 1.0.0
|
23 |
-
* @access private
|
24 |
-
* @var string $group The ID of Advanced Settings.
|
25 |
-
*/
|
26 |
-
private $group;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Initialize the class and set its properties.
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
* @var string $xoo_wsc The name of this plugin.
|
33 |
-
* @var string $version The version of this plugin.
|
34 |
-
*/
|
35 |
-
public function __construct( $xoo_wsc ) {
|
36 |
-
|
37 |
-
$this->xoo_wsc = $xoo_wsc;
|
38 |
-
$this->group = $xoo_wsc.'-av';
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Creates our settings sections with fields etc.
|
43 |
-
*
|
44 |
-
* @since 1.0.0
|
45 |
-
*/
|
46 |
-
public function settings_api_init(){
|
47 |
-
|
48 |
-
// register_setting( $option_group, $option_name, $settings_sanitize_callback );
|
49 |
-
register_setting(
|
50 |
-
$this->group . '-options',
|
51 |
-
$this->group . '-options',
|
52 |
-
array( $this, 'settings_sanitize' )
|
53 |
-
);
|
54 |
-
|
55 |
-
// add_settings_section( $id, $title, $callback, $menu_slug );
|
56 |
-
add_settings_section(
|
57 |
-
$this->group . '-options', // section
|
58 |
-
'',
|
59 |
-
array( $this, 'options_section' ),
|
60 |
-
$this->group // Advanced Section
|
61 |
-
);
|
62 |
-
|
63 |
-
|
64 |
-
// add_settings_field( $id, $title, $callback, $menu_slug, $section, $args );
|
65 |
-
add_settings_field(
|
66 |
-
'custom-css',
|
67 |
-
__( 'Custom CSS','side-cart-woocommerce' ),
|
68 |
-
array( $this, 'custom_css' ),
|
69 |
-
$this->group,
|
70 |
-
$this->group . '-options' // Custom CSS
|
71 |
-
);
|
72 |
-
|
73 |
-
|
74 |
-
add_settings_field(
|
75 |
-
'trigger-class',
|
76 |
-
__( 'Trigger Class','side-cart-woocommerce' ),
|
77 |
-
array( $this, 'trigger_class' ),
|
78 |
-
$this->group,
|
79 |
-
$this->group . '-options' // Trigger Class
|
80 |
-
);
|
81 |
-
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Creates a settings section
|
86 |
-
*
|
87 |
-
* @since 1.0.0
|
88 |
-
* @return mixed The settings section
|
89 |
-
*/
|
90 |
-
public function options_section() {}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Custom CSS
|
94 |
-
*
|
95 |
-
* @since 1.0.0
|
96 |
-
* @return mixed The settings field
|
97 |
-
*/
|
98 |
-
public function custom_css() {
|
99 |
-
|
100 |
-
$options = get_option( $this->group . '-options' );
|
101 |
-
$option = isset( $options['custom-css']) ? $options['custom-css'] : '';
|
102 |
-
|
103 |
-
?>
|
104 |
-
<textarea name="<?php echo $this->group; ?>-options[custom-css]" cols="80" rows="20" placeholder="/* Place your custom CSS here */"><?php echo $option; ?></textarea>
|
105 |
-
<?php
|
106 |
-
}
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Trigger Class
|
112 |
-
*
|
113 |
-
* @since 1.0.0
|
114 |
-
* @return mixed The settings field
|
115 |
-
*/
|
116 |
-
public function trigger_class() {
|
117 |
-
|
118 |
-
$options = get_option( $this->group . '-options' );
|
119 |
-
$option = isset( $options['trigger-class']) ? $options['trigger-class'] : '';
|
120 |
-
|
121 |
-
?>
|
122 |
-
<input type="text" name="<?php echo $this->group; ?>-options[trigger-class]" value="<?php echo $option; ?>" placeholder="header-class">
|
123 |
-
<label>Open Side Cart using custom class.</label>
|
124 |
-
<?php
|
125 |
-
}
|
126 |
-
|
127 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/settings/class-xoo-wsc-general-settings.php
DELETED
@@ -1,569 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Admin Part of Plugin, dashboard and options.
|
5 |
-
*
|
6 |
-
* @package WooCommerce Side Cart
|
7 |
-
*/
|
8 |
-
class xoo_wsc_General_Settings extends xoo_wsc_Admin {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* The ID of this plugin.
|
12 |
-
*
|
13 |
-
* @since 1.0.0
|
14 |
-
* @access private
|
15 |
-
* @var string $xoo_wsc The ID of this plugin.
|
16 |
-
*/
|
17 |
-
private $xoo_wsc;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* The ID of General Settings.
|
21 |
-
*
|
22 |
-
* @since 1.0.0
|
23 |
-
* @access private
|
24 |
-
* @var string $group The ID of General Settings.
|
25 |
-
*/
|
26 |
-
private $group;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Initialize the class and set its properties.
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
* @var string $xoo_wsc The name of this plugin.
|
33 |
-
* @var string $version The version of this plugin.
|
34 |
-
*/
|
35 |
-
public function __construct( $xoo_wsc ) {
|
36 |
-
|
37 |
-
$this->xoo_wsc = $xoo_wsc;
|
38 |
-
$this->group = $xoo_wsc.'-gl';
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Creates our settings sections with fields etc.
|
43 |
-
*
|
44 |
-
* @since 1.0.0
|
45 |
-
*/
|
46 |
-
public function settings_api_init(){
|
47 |
-
|
48 |
-
// register_setting( $option_group, $option_name, $settings_sanitize_callback );
|
49 |
-
register_setting(
|
50 |
-
$this->group . '-options',
|
51 |
-
$this->group . '-options',
|
52 |
-
array( $this, 'settings_sanitize' )
|
53 |
-
);
|
54 |
-
|
55 |
-
// add_settings_section( $id, $title, $callback, $menu_slug );
|
56 |
-
add_settings_section(
|
57 |
-
$this->group . '-sc-options', // section
|
58 |
-
'',
|
59 |
-
array( $this, 'sc_options_section' ),
|
60 |
-
$this->group // Side Cart Section
|
61 |
-
);
|
62 |
-
|
63 |
-
add_settings_section(
|
64 |
-
$this->group . '-bk-options', // section
|
65 |
-
'',
|
66 |
-
array( $this, 'bk_options_section' ),
|
67 |
-
$this->group // Cart Basket Section
|
68 |
-
);
|
69 |
-
|
70 |
-
/*
|
71 |
-
=============================================
|
72 |
-
============= Side Cart Fields ==============
|
73 |
-
=============================================
|
74 |
-
*/
|
75 |
-
|
76 |
-
// add_settings_field( $id, $title, $callback, $menu_slug, $section, $args );
|
77 |
-
add_settings_field(
|
78 |
-
'sc-auto-open',
|
79 |
-
__( 'Auto Open', 'side-cart-woocommerce' ),
|
80 |
-
array( $this, 'sc_auto_open' ),
|
81 |
-
$this->group,
|
82 |
-
$this->group . '-sc-options' // Auto Open Side Cart
|
83 |
-
);
|
84 |
-
|
85 |
-
add_settings_field(
|
86 |
-
'sc-ajax-atc',
|
87 |
-
__( 'Ajax Add to Cart', 'side-cart-woocommerce' ),
|
88 |
-
array( $this, 'sc_ajax_atc' ),
|
89 |
-
$this->group,
|
90 |
-
$this->group . '-sc-options' // ajax add to cart
|
91 |
-
);
|
92 |
-
|
93 |
-
add_settings_field(
|
94 |
-
'sc-atc-icons',
|
95 |
-
__( 'Loading Icon', 'side-cart-woocommerce' ),
|
96 |
-
array( $this, 'sc_atc_icons' ),
|
97 |
-
$this->group,
|
98 |
-
$this->group . '-sc-options' // show icons on add to cart
|
99 |
-
);
|
100 |
-
|
101 |
-
add_settings_field(
|
102 |
-
'sc-atc-reset',
|
103 |
-
__( 'Reset Cart Form', 'side-cart-woocommerce' ),
|
104 |
-
array( $this, 'sc_atc_reset' ),
|
105 |
-
$this->group,
|
106 |
-
$this->group . '-sc-options' // Reset cart form
|
107 |
-
);
|
108 |
-
|
109 |
-
add_settings_field(
|
110 |
-
'sc-head-text',
|
111 |
-
__( 'Head Title', 'side-cart-woocommerce' ),
|
112 |
-
array( $this, 'sc_head_text' ),
|
113 |
-
$this->group,
|
114 |
-
$this->group . '-sc-options' // Cart Head Text
|
115 |
-
);
|
116 |
-
|
117 |
-
|
118 |
-
add_settings_field(
|
119 |
-
'sc-shipping-text',
|
120 |
-
__( 'Shipping Text', 'side-cart-woocommerce' ),
|
121 |
-
array( $this, 'sc_shipping_text' ),
|
122 |
-
$this->group,
|
123 |
-
$this->group . '-sc-options' // Shipping Text
|
124 |
-
);
|
125 |
-
|
126 |
-
add_settings_field(
|
127 |
-
'sc-cart-text',
|
128 |
-
__( 'Cart Button Text', 'side-cart-woocommerce' ),
|
129 |
-
array( $this, 'sc_cart_text' ),
|
130 |
-
$this->group,
|
131 |
-
$this->group . '-sc-options' // Cart Button Text
|
132 |
-
);
|
133 |
-
|
134 |
-
add_settings_field(
|
135 |
-
'sc-checkout-text',
|
136 |
-
__( 'Checkout Button Text', 'side-cart-woocommerce' ),
|
137 |
-
array( $this, 'sc_checkout_text' ),
|
138 |
-
$this->group,
|
139 |
-
$this->group . '-sc-options' // Checkout Button Text
|
140 |
-
);
|
141 |
-
|
142 |
-
add_settings_field(
|
143 |
-
'sc-continue-text',
|
144 |
-
__( 'Continue Button Text', 'side-cart-woocommerce' ),
|
145 |
-
array( $this, 'sc_continue_text' ),
|
146 |
-
$this->group,
|
147 |
-
$this->group . '-sc-options' // Continue Button Text
|
148 |
-
);
|
149 |
-
|
150 |
-
|
151 |
-
add_settings_field(
|
152 |
-
'sc-cont-btn-url',
|
153 |
-
__( 'Cotinue Button URL', 'side-cart-woocommerce' ),
|
154 |
-
array( $this, 'sc_cont_btn_url' ),
|
155 |
-
$this->group,
|
156 |
-
$this->group . '-sc-options' // Continue Button URL
|
157 |
-
);
|
158 |
-
|
159 |
-
|
160 |
-
add_settings_field(
|
161 |
-
'sc-show-ptotal',
|
162 |
-
__( 'Product total', 'side-cart-woocommerce' ),
|
163 |
-
array( $this, 'sc_show_ptotal' ),
|
164 |
-
$this->group,
|
165 |
-
$this->group . '-sc-options' // Product total
|
166 |
-
);
|
167 |
-
|
168 |
-
add_settings_field(
|
169 |
-
'sc-cart-redirect',
|
170 |
-
__( 'Redirect to Cart', 'side-cart-woocommerce' ),
|
171 |
-
array( $this, 'sc_cart_redirect' ),
|
172 |
-
$this->group,
|
173 |
-
$this->group . '-sc-options' // Product total
|
174 |
-
);
|
175 |
-
|
176 |
-
|
177 |
-
/*
|
178 |
-
=============================================
|
179 |
-
============= Cart Basket Fields ============
|
180 |
-
=============================================
|
181 |
-
*/
|
182 |
-
|
183 |
-
add_settings_field(
|
184 |
-
'bk-show-basket',
|
185 |
-
__( 'Enable Basket', 'side-cart-woocommerce' ),
|
186 |
-
array( $this, 'bk_show_basket' ),
|
187 |
-
$this->group,
|
188 |
-
$this->group . '-bk-options' // Cart Basket
|
189 |
-
);
|
190 |
-
|
191 |
-
add_settings_field(
|
192 |
-
'bk-chk-basket',
|
193 |
-
__( 'On Cart & Checkout Page', 'side-cart-woocommerce' ),
|
194 |
-
array( $this, 'bk_chk_basket' ),
|
195 |
-
$this->group,
|
196 |
-
$this->group . '-bk-options' // Cart Basket
|
197 |
-
);
|
198 |
-
|
199 |
-
add_settings_field(
|
200 |
-
'bk-show-basket-mobile',
|
201 |
-
__( 'Basket on mobile', 'side-cart-woocommerce' ),
|
202 |
-
array( $this, 'bk_show_basket_mobile' ),
|
203 |
-
$this->group,
|
204 |
-
$this->group . '-bk-options' // Cart Basket
|
205 |
-
);
|
206 |
-
|
207 |
-
add_settings_field(
|
208 |
-
'bk-hide-basket-pages',
|
209 |
-
__( 'Hide Basket Pages', 'side-cart-woocommerce' ),
|
210 |
-
array( $this, 'bk_hide_basket_pages' ),
|
211 |
-
$this->group,
|
212 |
-
$this->group . '-bk-options' // Cart Basket
|
213 |
-
);
|
214 |
-
|
215 |
-
add_settings_field(
|
216 |
-
'bk-show-bkcount',
|
217 |
-
__( 'Product Count', 'side-cart-woocommerce' ),
|
218 |
-
array( $this, 'bk_show_bkcount' ),
|
219 |
-
$this->group,
|
220 |
-
$this->group . '-bk-options' // Product Count
|
221 |
-
);
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Creates a settings section
|
226 |
-
*
|
227 |
-
* @since 1.0.0
|
228 |
-
* @return mixed The settings section
|
229 |
-
*/
|
230 |
-
public function sc_options_section() {
|
231 |
-
$this->get_section_markup('Side Cart');
|
232 |
-
|
233 |
-
}
|
234 |
-
|
235 |
-
|
236 |
-
/**
|
237 |
-
* Creates a basket section
|
238 |
-
*
|
239 |
-
* @since 1.0.0
|
240 |
-
* @return mixed The settings section
|
241 |
-
*/
|
242 |
-
public function bk_options_section() {
|
243 |
-
$this->get_section_markup('Cart Basket');
|
244 |
-
}
|
245 |
-
|
246 |
-
|
247 |
-
/*
|
248 |
-
=============================================
|
249 |
-
============= Side Cart Section =============
|
250 |
-
=============================================
|
251 |
-
*/
|
252 |
-
|
253 |
-
/**
|
254 |
-
* Enable Bar Field
|
255 |
-
*
|
256 |
-
* @since 1.0.0
|
257 |
-
* @return mixed The settings field
|
258 |
-
*/
|
259 |
-
public function sc_auto_open() {
|
260 |
-
|
261 |
-
$options = get_option( $this->group . '-options' );
|
262 |
-
$option = isset( $options['sc-auto-open']) ? $options['sc-auto-open'] : 1;
|
263 |
-
$id = $this->group.'-options[sc-auto-open]';
|
264 |
-
?>
|
265 |
-
<input type="hidden" name="<?php echo $id; ?>" value="false">
|
266 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
267 |
-
<label for="<?php echo $id; ?>">Auto open side cart when item is added to cart.</label> <?php
|
268 |
-
}
|
269 |
-
|
270 |
-
/**
|
271 |
-
* Enable Ajax add to cart
|
272 |
-
*
|
273 |
-
* @since 1.0.0
|
274 |
-
* @return mixed The settings field
|
275 |
-
*/
|
276 |
-
public function sc_ajax_atc() {
|
277 |
-
|
278 |
-
$options = get_option( $this->group . '-options' );
|
279 |
-
$option = isset( $options['sc-ajax-atc']) ? $options['sc-ajax-atc'] : 0;
|
280 |
-
$id = $this->group.'-options[sc-ajax-atc]';
|
281 |
-
?>
|
282 |
-
<input type="hidden" name="<?php echo $id; ?>" value="false">
|
283 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
284 |
-
<label for="<?php echo $id; ?>">Add to cart without page refresh.</label> <?php
|
285 |
-
}
|
286 |
-
|
287 |
-
/**
|
288 |
-
* Show icons while adding to cart
|
289 |
-
*
|
290 |
-
* @since 1.0.0
|
291 |
-
* @return mixed The settings field
|
292 |
-
*/
|
293 |
-
public function sc_atc_icons() {
|
294 |
-
|
295 |
-
$options = get_option( $this->group . '-options' );
|
296 |
-
$option = isset( $options['sc-atc-icons']) ? $options['sc-atc-icons'] : 1;
|
297 |
-
$id = $this->group.'-options[sc-atc-icons]';
|
298 |
-
?>
|
299 |
-
<input type="hidden" name="<?php echo $id; ?>" value="false">
|
300 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
301 |
-
<label for="<?php echo $id; ?>">Show preloader/check icon while adding to cart.</label> <?php
|
302 |
-
}
|
303 |
-
|
304 |
-
|
305 |
-
/**
|
306 |
-
* Reset cart form
|
307 |
-
*
|
308 |
-
* @since 1.0.0
|
309 |
-
* @return mixed The settings field
|
310 |
-
*/
|
311 |
-
public function sc_atc_reset() {
|
312 |
-
|
313 |
-
$options = get_option( $this->group . '-options' );
|
314 |
-
$option = isset( $options['sc-atc-reset']) ? $options['sc-atc-reset'] : 0;
|
315 |
-
$id = $this->group.'-options[sc-atc-reset]';
|
316 |
-
?>
|
317 |
-
<input type="hidden" name="<?php echo $id; ?>" value="false">
|
318 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
319 |
-
<label for="<?php echo $id; ?>">Resets quantity , removes "View cart" button.</label> <?php
|
320 |
-
}
|
321 |
-
|
322 |
-
|
323 |
-
/**
|
324 |
-
* Head Title
|
325 |
-
*
|
326 |
-
* @since 1.0.0
|
327 |
-
* @return mixed The settings field
|
328 |
-
*/
|
329 |
-
public function sc_head_text() {
|
330 |
-
|
331 |
-
$options = get_option( $this->group . '-options' );
|
332 |
-
$option = isset( $options['sc-head-text']) ? $options['sc-head-text'] : __('Your Cart','side-cart-woocommerce');
|
333 |
-
|
334 |
-
?>
|
335 |
-
<input type="text" value="<?php echo $option; ?>" name="<?php echo $this->group; ?>-options[sc-head-text]" />
|
336 |
-
<?php
|
337 |
-
}
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
/**
|
343 |
-
* Shipping text
|
344 |
-
*
|
345 |
-
* @since 1.0.0
|
346 |
-
* @return mixed The settings field
|
347 |
-
*/
|
348 |
-
public function sc_shipping_text() {
|
349 |
-
|
350 |
-
$options = get_option( $this->group . '-options' );
|
351 |
-
$option = isset( $options['sc-shipping-text']) ? $options['sc-shipping-text'] : __('To find out your shipping cost , Please proceed to checkout.','side-cart-woocommerce');
|
352 |
-
|
353 |
-
?>
|
354 |
-
<input type="text" value="<?php echo $option; ?>" name="<?php echo $this->group; ?>-options[sc-shipping-text]" />
|
355 |
-
<?php
|
356 |
-
}
|
357 |
-
|
358 |
-
|
359 |
-
/**
|
360 |
-
* Cart text
|
361 |
-
*
|
362 |
-
* @since 1.0.0
|
363 |
-
* @return mixed The settings field
|
364 |
-
*/
|
365 |
-
public function sc_cart_text() {
|
366 |
-
|
367 |
-
$options = get_option( $this->group . '-options' );
|
368 |
-
$option = isset( $options['sc-cart-text']) ? $options['sc-cart-text'] : __('View Cart','side-cart-woocommerce');
|
369 |
-
|
370 |
-
?>
|
371 |
-
<input type="text" value="<?php echo $option; ?>" name="<?php echo $this->group; ?>-options[sc-cart-text]" />
|
372 |
-
<?php
|
373 |
-
}
|
374 |
-
|
375 |
-
/**
|
376 |
-
* Checkout text
|
377 |
-
*
|
378 |
-
* @since 1.0.0
|
379 |
-
* @return mixed The settings field
|
380 |
-
*/
|
381 |
-
public function sc_checkout_text() {
|
382 |
-
|
383 |
-
$options = get_option( $this->group . '-options' );
|
384 |
-
$option = isset( $options['sc-checkout-text']) ? $options['sc-checkout-text'] : __('Checkout','side-cart-woocommerce');
|
385 |
-
|
386 |
-
?>
|
387 |
-
<input type="text" value="<?php echo $option; ?>" name="<?php echo $this->group; ?>-options[sc-checkout-text]" />
|
388 |
-
<?php
|
389 |
-
}
|
390 |
-
|
391 |
-
|
392 |
-
/**
|
393 |
-
* Continue text
|
394 |
-
*
|
395 |
-
* @since 1.0.0
|
396 |
-
* @return mixed The settings field
|
397 |
-
*/
|
398 |
-
public function sc_continue_text() {
|
399 |
-
|
400 |
-
$options = get_option( $this->group . '-options' );
|
401 |
-
$option = isset( $options['sc-continue-text']) ? $options['sc-continue-text'] : __('Continue Shopping','side-cart-woocommerce');
|
402 |
-
|
403 |
-
?>
|
404 |
-
<input type="text" value="<?php echo $option; ?>" name="<?php echo $this->group; ?>-options[sc-continue-text]" />
|
405 |
-
<p class="description">Leave empty to disable</p>
|
406 |
-
<?php
|
407 |
-
}
|
408 |
-
|
409 |
-
|
410 |
-
/**
|
411 |
-
* Continue Shopping Button
|
412 |
-
*
|
413 |
-
* @since 1.0.0
|
414 |
-
* @return mixed The settings field
|
415 |
-
*/
|
416 |
-
public function sc_cont_btn_url() {
|
417 |
-
|
418 |
-
$options = get_option( $this->group . '-options' );
|
419 |
-
$option = isset( $options['sc-cont-btn-url']) ? $options['sc-cont-btn-url'] : "#";
|
420 |
-
|
421 |
-
?>
|
422 |
-
<input type="text" value="<?php echo $option; ?>" name="<?php echo $this->group; ?>-options[sc-cont-btn-url]" />
|
423 |
-
<p class="description">Use "#" for the same page</p>
|
424 |
-
<?php
|
425 |
-
}
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
/**
|
431 |
-
* Product Total
|
432 |
-
*
|
433 |
-
* @since 1.0.0
|
434 |
-
* @return mixed The settings field
|
435 |
-
*/
|
436 |
-
public function sc_show_ptotal() {
|
437 |
-
|
438 |
-
$options = get_option( $this->group . '-options' );
|
439 |
-
$option = isset( $options['sc-show-ptotal']) ? $options['sc-show-ptotal'] : 1;
|
440 |
-
$id = $this->group.'-options[sc-show-ptotal]';
|
441 |
-
?>
|
442 |
-
<input type="hidden" name="<?php echo $id; ?>" value="false">
|
443 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
444 |
-
<label for="<?php echo $id; ?>">Show Product Total.</label>
|
445 |
-
<?php
|
446 |
-
}
|
447 |
-
|
448 |
-
|
449 |
-
/**
|
450 |
-
* Product Total
|
451 |
-
*
|
452 |
-
* @since 1.0.0
|
453 |
-
* @return mixed The settings field
|
454 |
-
*/
|
455 |
-
public function sc_cart_redirect() {
|
456 |
-
|
457 |
-
$options = get_option( $this->group . '-options' );
|
458 |
-
$option = isset( $options['sc-cart-redirect']) ? $options['sc-cart-redirect'] : 0;
|
459 |
-
$id = $this->group.'-options[sc-cart-redirect]';
|
460 |
-
?>
|
461 |
-
<input type="hidden" name="<?php echo $id; ?>" value="0">
|
462 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
463 |
-
<label for="<?php echo $id; ?>">Redirect to the cart page after successful addition.</label>
|
464 |
-
<?php
|
465 |
-
}
|
466 |
-
|
467 |
-
|
468 |
-
/*
|
469 |
-
=============================================
|
470 |
-
============ Cart Basket Section ============
|
471 |
-
=============================================
|
472 |
-
*/
|
473 |
-
|
474 |
-
|
475 |
-
/**
|
476 |
-
* Enable Cart Basket
|
477 |
-
*
|
478 |
-
* @since 1.0.0
|
479 |
-
* @return mixed The settings field
|
480 |
-
*/
|
481 |
-
public function bk_show_basket() {
|
482 |
-
|
483 |
-
$options = get_option( $this->group . '-options' );
|
484 |
-
$option = isset( $options['bk-show-basket']) ? $options['bk-show-basket'] : 1;
|
485 |
-
$id = $this->group.'-options[bk-show-basket]';
|
486 |
-
?>
|
487 |
-
<input type="hidden" name="<?php echo $id; ?>" value="false">
|
488 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
489 |
-
<label for="<?php echo $id; ?>">Show Cart Basket.</label>
|
490 |
-
<?php
|
491 |
-
}
|
492 |
-
|
493 |
-
|
494 |
-
/**
|
495 |
-
* Enable Cart Basket on cart and checkout page
|
496 |
-
*
|
497 |
-
* @since 1.0.0
|
498 |
-
* @return mixed The settings field
|
499 |
-
*/
|
500 |
-
public function bk_chk_basket() {
|
501 |
-
|
502 |
-
$options = get_option( $this->group . '-options' );
|
503 |
-
$option = isset( $options['bk-chk-basket']) ? $options['bk-chk-basket'] : 1;
|
504 |
-
$id = $this->group.'-options[bk-chk-basket]';
|
505 |
-
?>
|
506 |
-
<input type="hidden" name="<?php echo $id; ?>" value="false">
|
507 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
508 |
-
<label for="<?php echo $id; ?>">Show Cart Basket on cart and checkout pages.</label>
|
509 |
-
<?php
|
510 |
-
}
|
511 |
-
|
512 |
-
|
513 |
-
/**
|
514 |
-
* Basket on mobile devices
|
515 |
-
*
|
516 |
-
* @since 1.0.0
|
517 |
-
* @return mixed The settings field
|
518 |
-
*/
|
519 |
-
public function bk_show_basket_mobile() {
|
520 |
-
|
521 |
-
$options = get_option( $this->group . '-options' );
|
522 |
-
$option = isset( $options['bk-show-basket-mobile']) ? $options['bk-show-basket-mobile'] : 1;
|
523 |
-
$id = $this->group.'-options[bk-show-basket-mobile]';
|
524 |
-
?>
|
525 |
-
<input type="hidden" name="<?php echo $id; ?>" value="false">
|
526 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
527 |
-
<label for="<?php echo $id; ?>">Show basket on mobile device (smartphone,tablet).</label>
|
528 |
-
<?php
|
529 |
-
}
|
530 |
-
|
531 |
-
|
532 |
-
/**
|
533 |
-
* Hide Basket on pages
|
534 |
-
*
|
535 |
-
* @since 1.0.0
|
536 |
-
* @return mixed The settings field
|
537 |
-
*/
|
538 |
-
public function bk_hide_basket_pages() {
|
539 |
-
|
540 |
-
$options = get_option( $this->group . '-options' );
|
541 |
-
$option = isset( $options['bk-hide-basket-pages']) ? $options['bk-hide-basket-pages'] : '';
|
542 |
-
$id = $this->group.'-options[bk-hide-basket-pages]';
|
543 |
-
?>
|
544 |
-
<input type="text" value="<?php echo $option; ?>" name="<?php echo $id; ?>" />
|
545 |
-
<label for="<?php echo $id; ?>">Do not show basket on pages.</label>
|
546 |
-
<p class="description">Use post type/page id/slug separated by comma. For eg: post,contact-us,about-us</p>
|
547 |
-
<?php
|
548 |
-
}
|
549 |
-
|
550 |
-
|
551 |
-
/**
|
552 |
-
* Product Count
|
553 |
-
*
|
554 |
-
* @since 1.0.0
|
555 |
-
* @return mixed The settings field
|
556 |
-
*/
|
557 |
-
public function bk_show_bkcount() {
|
558 |
-
|
559 |
-
$options = get_option( $this->group . '-options' );
|
560 |
-
$option = isset( $options['bk-show-bkcount']) ? $options['bk-show-bkcount'] : 1;
|
561 |
-
$id = $this->group.'-options[bk-show-bkcount]';
|
562 |
-
?>
|
563 |
-
<input type="hidden" name="<?php echo $id; ?>" value="false">
|
564 |
-
<input type="checkbox" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="1" <?php checked($option, 1); ?> />
|
565 |
-
<label for="<?php echo $id; ?>">Show Product Count.</label>
|
566 |
-
<?php
|
567 |
-
}
|
568 |
-
|
569 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/settings/class-xoo-wsc-premium-settings.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Admin Part of Plugin, dashboard and options.
|
5 |
-
*
|
6 |
-
* @package WooCommerce Side Cart
|
7 |
-
*/
|
8 |
-
class xoo_wsc_Premium_Settings extends xoo_wsc_Admin {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* The ID of this plugin.
|
12 |
-
*
|
13 |
-
* @since 1.0.0
|
14 |
-
* @access private
|
15 |
-
* @var string $xoo_wsc The ID of this plugin.
|
16 |
-
*/
|
17 |
-
private $xoo_wsc;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* The ID of Advanced Settings.
|
21 |
-
*
|
22 |
-
* @since 1.0.0
|
23 |
-
* @access private
|
24 |
-
* @var string $group The ID of Premium Settings.
|
25 |
-
*/
|
26 |
-
private $group;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Initialize the class and set its properties.
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
* @var string $xoo_wsc The name of this plugin.
|
33 |
-
* @var string $version The version of this plugin.
|
34 |
-
*/
|
35 |
-
public function __construct( $xoo_wsc ) {
|
36 |
-
|
37 |
-
$this->xoo_wsc = $xoo_wsc;
|
38 |
-
$this->group = $xoo_wsc.'-pm';
|
39 |
-
}
|
40 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/settings/class-xoo-wsc-style-settings.php
DELETED
@@ -1,504 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Admin Part of Plugin, dashboard and options.
|
5 |
-
*
|
6 |
-
* @package WooCommerce Side Cart
|
7 |
-
*/
|
8 |
-
class xoo_wsc_Style_Settings extends xoo_wsc_Admin {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* The ID of this plugin.
|
12 |
-
*
|
13 |
-
* @since 1.0.0
|
14 |
-
* @access private
|
15 |
-
* @var string $xoo_wsc The ID of this plugin.
|
16 |
-
*/
|
17 |
-
private $xoo_wsc;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* The ID of General Settings.
|
21 |
-
*
|
22 |
-
* @since 1.0.0
|
23 |
-
* @access private
|
24 |
-
* @var string $group The ID of General Settings.
|
25 |
-
*/
|
26 |
-
private $group;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Initialize the class and set its properties.
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
* @var string $xoo_wsc The name of this plugin.
|
33 |
-
* @var string $version The version of this plugin.
|
34 |
-
*/
|
35 |
-
public function __construct( $xoo_wsc ) {
|
36 |
-
|
37 |
-
$this->xoo_wsc = $xoo_wsc;
|
38 |
-
$this->group = $xoo_wsc.'-sy';
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Creates our settings sections with fields etc.
|
43 |
-
*
|
44 |
-
* @since 1.0.0
|
45 |
-
*/
|
46 |
-
public function settings_api_init(){
|
47 |
-
|
48 |
-
// register_setting( $option_group, $option_name, $settings_sanitize_callback );
|
49 |
-
register_setting(
|
50 |
-
$this->group . '-options',
|
51 |
-
$this->group . '-options',
|
52 |
-
array( $this, 'settings_sanitize' )
|
53 |
-
);
|
54 |
-
|
55 |
-
// add_settings_section( $id, $title, $callback, $menu_slug );
|
56 |
-
add_settings_section(
|
57 |
-
$this->group . '-sc-options', // section
|
58 |
-
'',
|
59 |
-
array( $this, 'sc_options_section' ),
|
60 |
-
$this->group // Side Cart - Head Section
|
61 |
-
);
|
62 |
-
|
63 |
-
|
64 |
-
add_settings_section(
|
65 |
-
$this->group . '-bk-options', // section
|
66 |
-
'',
|
67 |
-
array( $this, 'bk_options_section' ),
|
68 |
-
$this->group // Cart Basket Section
|
69 |
-
);
|
70 |
-
|
71 |
-
/*
|
72 |
-
=============================================
|
73 |
-
============= Side Cart - Head ==============
|
74 |
-
=============================================
|
75 |
-
*/
|
76 |
-
|
77 |
-
// add_settings_field( $id, $title, $callback, $menu_slug, $section, $args );
|
78 |
-
|
79 |
-
add_settings_field(
|
80 |
-
'sch-fs',
|
81 |
-
__( 'Head Font Size', 'side-cart-woocommerce' ),
|
82 |
-
array( $this, 'sch_fs' ),
|
83 |
-
$this->group,
|
84 |
-
$this->group . '-sc-options' // Font Size
|
85 |
-
);
|
86 |
-
|
87 |
-
/*
|
88 |
-
=============================================
|
89 |
-
============= Side Cart - Body ==============
|
90 |
-
=============================================
|
91 |
-
*/
|
92 |
-
|
93 |
-
|
94 |
-
add_settings_field(
|
95 |
-
'scb-open',
|
96 |
-
__( 'Open From', 'side-cart-woocommerce' ),
|
97 |
-
array( $this, 'scb_open' ),
|
98 |
-
$this->group,
|
99 |
-
$this->group . '-sc-options' // Container Height
|
100 |
-
);
|
101 |
-
|
102 |
-
|
103 |
-
add_settings_field(
|
104 |
-
'scb-ch',
|
105 |
-
__( 'Container Height', 'side-cart-woocommerce' ),
|
106 |
-
array( $this, 'scb_ch' ),
|
107 |
-
$this->group,
|
108 |
-
$this->group . '-sc-options' // Container Height
|
109 |
-
);
|
110 |
-
|
111 |
-
add_settings_field(
|
112 |
-
'scb-cw',
|
113 |
-
__( 'Container Width', 'side-cart-woocommerce' ),
|
114 |
-
array( $this, 'scb_cw' ),
|
115 |
-
$this->group,
|
116 |
-
$this->group . '-sc-options' // Container Width
|
117 |
-
);
|
118 |
-
|
119 |
-
add_settings_field(
|
120 |
-
'scb-fs',
|
121 |
-
__( 'Body Font Size', 'side-cart-woocommerce' ),
|
122 |
-
array( $this, 'scb_fs' ),
|
123 |
-
$this->group,
|
124 |
-
$this->group . '-sc-options' // Font Size
|
125 |
-
);
|
126 |
-
|
127 |
-
add_settings_field(
|
128 |
-
'scb-imgw',
|
129 |
-
__( 'Product Image Width', 'side-cart-woocommerce' ),
|
130 |
-
array( $this, 'scb_imgw' ),
|
131 |
-
$this->group,
|
132 |
-
$this->group . '-sc-options' // Image Width
|
133 |
-
);
|
134 |
-
|
135 |
-
|
136 |
-
/*
|
137 |
-
=============================================
|
138 |
-
============ Side Cart - Footer =============
|
139 |
-
=============================================
|
140 |
-
*/
|
141 |
-
|
142 |
-
add_settings_field(
|
143 |
-
'scf-bm',
|
144 |
-
__( 'Footer Buttons Margin', 'side-cart-woocommerce' ),
|
145 |
-
array( $this, 'scf_bm' ),
|
146 |
-
$this->group,
|
147 |
-
$this->group . '-sc-options' // Button Margin
|
148 |
-
);
|
149 |
-
|
150 |
-
|
151 |
-
/*
|
152 |
-
=============================================
|
153 |
-
=============== Cart Basket =================
|
154 |
-
=============================================
|
155 |
-
*/
|
156 |
-
|
157 |
-
add_settings_field(
|
158 |
-
'bk-pos',
|
159 |
-
__( 'Basket Position', 'side-cart-woocommerce' ),
|
160 |
-
array( $this, 'bk_pos' ),
|
161 |
-
$this->group,
|
162 |
-
$this->group . '-bk-options' // Basket Position
|
163 |
-
);
|
164 |
-
|
165 |
-
add_settings_field(
|
166 |
-
'bk-bbgc',
|
167 |
-
__( 'Basket Background Color', 'side-cart-woocommerce' ),
|
168 |
-
array( $this, 'bk_bbgc' ),
|
169 |
-
$this->group,
|
170 |
-
$this->group . '-bk-options' // Basket Bg Color
|
171 |
-
);
|
172 |
-
|
173 |
-
add_settings_field(
|
174 |
-
'bk-bfc',
|
175 |
-
__( 'Basket Icon Color', 'side-cart-woocommerce' ),
|
176 |
-
array( $this, 'bk_bfc' ),
|
177 |
-
$this->group,
|
178 |
-
$this->group . '-bk-options' // Basket Icon Color
|
179 |
-
);
|
180 |
-
|
181 |
-
add_settings_field(
|
182 |
-
'bk-bfs',
|
183 |
-
__( 'Basket Icon Size', 'side-cart-woocommerce' ),
|
184 |
-
array( $this, 'bk_bfs' ),
|
185 |
-
$this->group,
|
186 |
-
$this->group . '-bk-options' // Basket Font Size
|
187 |
-
);
|
188 |
-
|
189 |
-
add_settings_field(
|
190 |
-
'bk-cbgc',
|
191 |
-
__( 'Count Background Color', 'side-cart-woocommerce' ),
|
192 |
-
array( $this, 'bk_cbgc' ),
|
193 |
-
$this->group,
|
194 |
-
$this->group . '-bk-options' // Count background Color
|
195 |
-
);
|
196 |
-
|
197 |
-
add_settings_field(
|
198 |
-
'bk-cfc',
|
199 |
-
__( 'Count Text Color', 'side-cart-woocommerce' ),
|
200 |
-
array( $this, 'bk_cfc' ),
|
201 |
-
$this->group,
|
202 |
-
$this->group . '-bk-options' // Count Text Color
|
203 |
-
);
|
204 |
-
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Creates a settings section
|
209 |
-
*
|
210 |
-
* @since 1.0.0
|
211 |
-
* @return mixed The settings section
|
212 |
-
*/
|
213 |
-
public function sc_options_section() {
|
214 |
-
$this->get_section_markup('Side Cart');
|
215 |
-
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Creates a basket section
|
220 |
-
*
|
221 |
-
* @since 1.0.0
|
222 |
-
* @return mixed The settings section
|
223 |
-
*/
|
224 |
-
public function bk_options_section() {
|
225 |
-
$this->get_section_markup('Cart Basket');
|
226 |
-
}
|
227 |
-
|
228 |
-
|
229 |
-
/*
|
230 |
-
=============================================
|
231 |
-
========= Side Cart - Head Section ==========
|
232 |
-
=============================================
|
233 |
-
*/
|
234 |
-
|
235 |
-
/**
|
236 |
-
* Head- font Size
|
237 |
-
*
|
238 |
-
* @since 1.0.0
|
239 |
-
* @return mixed The settings field
|
240 |
-
*/
|
241 |
-
public function sch_fs() {
|
242 |
-
|
243 |
-
$options = get_option( $this->group . '-options' );
|
244 |
-
$option = isset( $options['sch-fs']) ? $options['sch-fs'] : 20;
|
245 |
-
$id = $this->group.'-options[sch-fs]';
|
246 |
-
?>
|
247 |
-
<input type="number" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
248 |
-
<span class="description">Size in px (Default: 25)</span>
|
249 |
-
<?php
|
250 |
-
}
|
251 |
-
|
252 |
-
|
253 |
-
/**
|
254 |
-
* Head- Close Cart Icon Size
|
255 |
-
*
|
256 |
-
* @since 1.0.0
|
257 |
-
* @return mixed The settings field
|
258 |
-
*/
|
259 |
-
public function sch_cis() {
|
260 |
-
|
261 |
-
$options = get_option( $this->group . '-options' );
|
262 |
-
$option = isset( $options['sch-cis']) ? $options['sch-cis'] : 20;
|
263 |
-
$id = $this->group.'-options[sch-cis]';
|
264 |
-
?>
|
265 |
-
<input type="number" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
266 |
-
<span class="description">Size in px (Default: 20)</span>
|
267 |
-
<?php
|
268 |
-
}
|
269 |
-
|
270 |
-
|
271 |
-
/*
|
272 |
-
=============================================
|
273 |
-
========= Side Cart - Body Section ==========
|
274 |
-
=============================================
|
275 |
-
*/
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
/**
|
280 |
-
* Container Height
|
281 |
-
*
|
282 |
-
* @since 1.0.0
|
283 |
-
* @return mixed The settings field
|
284 |
-
*/
|
285 |
-
public function scb_ch() {
|
286 |
-
|
287 |
-
$options = get_option( $this->group . '-options' );
|
288 |
-
$option = !empty( $options['scb-ch']) ? $options['scb-ch'] : 'full_screen';
|
289 |
-
$id = $this->group.'-options[scb-ch]';
|
290 |
-
?>
|
291 |
-
<select name="<?php echo $id; ?>">
|
292 |
-
<option value="full_screen" <?php selected($option,'full_screen'); ?>>Full Screen</option>
|
293 |
-
<option value="auto_adjust" <?php selected($option,'auto_adjust'); ?>>Auto Adjust</option>
|
294 |
-
</select>
|
295 |
-
<?php
|
296 |
-
}
|
297 |
-
|
298 |
-
|
299 |
-
/**
|
300 |
-
* Container open
|
301 |
-
*
|
302 |
-
* @since 1.0.0
|
303 |
-
* @return mixed The settings field
|
304 |
-
*/
|
305 |
-
public function scb_open() {
|
306 |
-
|
307 |
-
$options = get_option( $this->group . '-options' );
|
308 |
-
$option = !empty( $options['scb-open']) ? $options['scb-open'] : 'right';
|
309 |
-
$id = $this->group.'-options[scb-open]';
|
310 |
-
?>
|
311 |
-
<select name="<?php echo $id; ?>">
|
312 |
-
<option value="right" <?php selected($option,'right'); ?>>Right</option>
|
313 |
-
<option value="left" <?php selected($option,'left'); ?>>Left</option>
|
314 |
-
</select>
|
315 |
-
<?php
|
316 |
-
}
|
317 |
-
|
318 |
-
/**
|
319 |
-
* Container Width
|
320 |
-
*
|
321 |
-
* @since 1.0.0
|
322 |
-
* @return mixed The settings field
|
323 |
-
*/
|
324 |
-
public function scb_cw() {
|
325 |
-
|
326 |
-
$options = get_option( $this->group . '-options' );
|
327 |
-
$option = !empty( $options['scb-cw']) ? $options['scb-cw'] : 300;
|
328 |
-
$id = $this->group.'-options[scb-cw]';
|
329 |
-
?>
|
330 |
-
<input type="number" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
331 |
-
<span class="description">Size in px (Default: 300)</span>
|
332 |
-
<?php
|
333 |
-
}
|
334 |
-
|
335 |
-
|
336 |
-
/**
|
337 |
-
* Body- font Size
|
338 |
-
*
|
339 |
-
* @since 1.0.0
|
340 |
-
* @return mixed The settings field
|
341 |
-
*/
|
342 |
-
public function scb_fs() {
|
343 |
-
|
344 |
-
$options = get_option( $this->group . '-options' );
|
345 |
-
$option = isset( $options['scb-fs']) ? $options['scb-fs'] : 14;
|
346 |
-
$id = $this->group.'-options[scb-fs]';
|
347 |
-
?>
|
348 |
-
<input type="number" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
349 |
-
<span class="description">Size in px (Default: 25)</span>
|
350 |
-
<?php
|
351 |
-
}
|
352 |
-
|
353 |
-
|
354 |
-
/**
|
355 |
-
* Body- Product Images Width
|
356 |
-
*
|
357 |
-
* @since 1.0.0
|
358 |
-
* @return mixed The settings field
|
359 |
-
*/
|
360 |
-
public function scb_imgw() {
|
361 |
-
|
362 |
-
$options = get_option( $this->group . '-options' );
|
363 |
-
$option = isset( $options['scb-imgw']) ? $options['scb-imgw'] : 35;
|
364 |
-
$id = $this->group.'-options[scb-imgw]';
|
365 |
-
?>
|
366 |
-
<input type="number" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
367 |
-
<span class="description">Width in percentage. (Default: 35)</span>
|
368 |
-
<?php
|
369 |
-
}
|
370 |
-
|
371 |
-
/*
|
372 |
-
=============================================
|
373 |
-
========= Side Cart - Footer Section ==========
|
374 |
-
=============================================
|
375 |
-
*/
|
376 |
-
|
377 |
-
|
378 |
-
/**
|
379 |
-
* Footer- Buttons Margin
|
380 |
-
*
|
381 |
-
* @since 1.0.0
|
382 |
-
* @return mixed The settings field
|
383 |
-
*/
|
384 |
-
public function scf_bm() {
|
385 |
-
|
386 |
-
$options = get_option( $this->group . '-options' );
|
387 |
-
$option = isset( $options['scf-bm']) ? $options['scf-bm'] : 4;
|
388 |
-
$id = $this->group.'-options[scf-bm]';
|
389 |
-
?>
|
390 |
-
<input type="number" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
391 |
-
<span class="description">Size in px (Default: 4)</span>
|
392 |
-
<?php
|
393 |
-
}
|
394 |
-
|
395 |
-
/*
|
396 |
-
=============================================
|
397 |
-
============= Cart Basket - Section =========
|
398 |
-
=============================================
|
399 |
-
*/
|
400 |
-
|
401 |
-
/**
|
402 |
-
* Basket Position
|
403 |
-
*
|
404 |
-
* @since 1.0.0
|
405 |
-
* @return mixed The settings field
|
406 |
-
*/
|
407 |
-
public function bk_pos() {
|
408 |
-
|
409 |
-
$options = get_option( $this->group . '-options' );
|
410 |
-
$option = isset( $options['bk-pos']) ? $options['bk-pos'] : 'bottom_fixed';
|
411 |
-
$id = $this->group.'-options[bk-pos]';
|
412 |
-
?>
|
413 |
-
<select name="<?php echo $id; ?>">
|
414 |
-
<option value="top" <?php selected($option,'top'); ?>>Top</option>
|
415 |
-
<option value="top_fixed" <?php selected($option,'top_fixed'); ?>>Top Fixed</option>
|
416 |
-
<option value="bottom_fixed" <?php selected($option,'bottom_fixed'); ?>>Bottom Fixed</option>
|
417 |
-
<?php
|
418 |
-
}
|
419 |
-
|
420 |
-
|
421 |
-
/**
|
422 |
-
* Basket Background Color
|
423 |
-
*
|
424 |
-
* @since 1.0.0
|
425 |
-
* @return mixed The settings field
|
426 |
-
*/
|
427 |
-
public function bk_bbgc() {
|
428 |
-
|
429 |
-
$options = get_option( $this->group . '-options' );
|
430 |
-
$option = isset( $options['bk-bbgc']) ? $options['bk-bbgc'] : '#ffffff';
|
431 |
-
$id = $this->group.'-options[bk-bbgc]';
|
432 |
-
?>
|
433 |
-
<input type="text" class="color-field" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
434 |
-
<?php
|
435 |
-
}
|
436 |
-
|
437 |
-
|
438 |
-
/**
|
439 |
-
* Basket Icon Color
|
440 |
-
*
|
441 |
-
* @since 1.0.0
|
442 |
-
* @return mixed The settings field
|
443 |
-
*/
|
444 |
-
public function bk_bfc() {
|
445 |
-
|
446 |
-
$options = get_option( $this->group . '-options' );
|
447 |
-
$option = isset( $options['bk-bfc']) ? $options['bk-bfc'] : '#000000';
|
448 |
-
$id = $this->group.'-options[bk-bfc]';
|
449 |
-
?>
|
450 |
-
<input type="text" class="color-field" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
451 |
-
<?php
|
452 |
-
}
|
453 |
-
|
454 |
-
/**
|
455 |
-
* Basket Icon Size
|
456 |
-
*
|
457 |
-
* @since 1.0.0
|
458 |
-
* @return mixed The settings field
|
459 |
-
*/
|
460 |
-
public function bk_bfs() {
|
461 |
-
|
462 |
-
$options = get_option( $this->group . '-options' );
|
463 |
-
$option = isset( $options['bk-bfs']) ? $options['bk-bfs'] : 35;
|
464 |
-
$id = $this->group.'-options[bk-bfs]';
|
465 |
-
?>
|
466 |
-
<input type="number" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
467 |
-
<span class="description">Size in px (Default: 35)</span>
|
468 |
-
<?php
|
469 |
-
}
|
470 |
-
|
471 |
-
/**
|
472 |
-
* Count BG Color
|
473 |
-
*
|
474 |
-
* @since 1.0.0
|
475 |
-
* @return mixed The settings field
|
476 |
-
*/
|
477 |
-
public function bk_cbgc() {
|
478 |
-
|
479 |
-
$options = get_option( $this->group . '-options' );
|
480 |
-
$option = isset( $options['bk-cbgc']) ? $options['bk-cbgc'] : '#cc0086';
|
481 |
-
$id = $this->group.'-options[bk-cbgc]';
|
482 |
-
?>
|
483 |
-
<input type="text" class="color-field" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
484 |
-
<?php
|
485 |
-
}
|
486 |
-
|
487 |
-
|
488 |
-
/**
|
489 |
-
* Count Text Color
|
490 |
-
*
|
491 |
-
* @since 1.0.0
|
492 |
-
* @return mixed The settings field
|
493 |
-
*/
|
494 |
-
public function bk_cfc() {
|
495 |
-
|
496 |
-
$options = get_option( $this->group . '-options' );
|
497 |
-
$option = isset( $options['bk-cfc']) ? $options['bk-cfc'] : '#ffffff';
|
498 |
-
$id = $this->group.'-options[bk-cfc]';
|
499 |
-
?>
|
500 |
-
<input type="text" class="color-field" id="<?php echo $id; ?>" name="<?php echo $id; ?>" value="<?php echo $option; ?>" />
|
501 |
-
<?php
|
502 |
-
}
|
503 |
-
|
504 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/templates/xoo-wsc-tab-info.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p style="border: 1px solid #eee">
|
2 |
+
<h3>How to trigger side cart using your own icon?</h3>
|
3 |
+
<h4>You can trigger side cart using class name "xoo-wsc-cart-trigger". <br><br>For eg: Your HTML should look like this<br><xmp><div class="xoo-wsc-cart-trigger">Trigger Side Cart</div></xmp></h4>
|
4 |
+
</p>
|
5 |
+
|
6 |
+
<p style="border: 1px solid #eee">
|
7 |
+
<h3>Having problem with footer button design?</h3>
|
8 |
+
<h4>Go to style tab -> Side cart Footer & change button design option to "Custom", you can then set your own colors above</h4>
|
9 |
+
</p>
|
10 |
+
|
11 |
+
<p style="border: 1px solid #eee">
|
12 |
+
<h3><a href="https://docs.xootix.com/side-cart-for-woocommerce" target="__blank">Documentation</a></h3>
|
13 |
+
</p>
|
admin/templates/xoo-wsc-tab-pro.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="xoo-wsc-premium">
|
2 |
+
<div class="xoo-wscp-head">
|
3 |
+
<span>Premium</span>
|
4 |
+
<a href="https://xootix.com/plugins/side-cart-for-woocommerce">BUY NOW</a>
|
5 |
+
<a href="https://demo.xootix.com/side-cart-for-woocommerce/">DEMO</a>
|
6 |
+
</div>
|
7 |
+
|
8 |
+
<h3>A complete replacement of your cart page</h3>
|
9 |
+
|
10 |
+
<ul class="xoo-wscp-features">
|
11 |
+
<li>Update quantity</li>
|
12 |
+
<li>Select different basket icon or set your own.</li>
|
13 |
+
<li>Show shipping, tax, discount, fee & other totals</li>
|
14 |
+
<li>Shipping calculator</li>
|
15 |
+
<li>Apply & display all coupons</li>
|
16 |
+
<li>Increase sales by showing Cross-Sells / Up-Sells / Related products</li>
|
17 |
+
<li>Show notifications on add/update/delete item</li>
|
18 |
+
<li>Shipping bar( Remaining amount for free shipping )</li>
|
19 |
+
<li>One Click Paypal checkout</li>
|
20 |
+
<li>Header menu SHORTCODE (Use anywhere)</li>
|
21 |
+
<li>Additional styling options</li>
|
22 |
+
</ul>
|
23 |
+
</div>
|
admin/views/sections.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$sections = array(
|
4 |
+
|
5 |
+
/* General TAB Sections */
|
6 |
+
array(
|
7 |
+
'title' => 'Main',
|
8 |
+
'id' => 'main',
|
9 |
+
'tab' => 'general',
|
10 |
+
),
|
11 |
+
|
12 |
+
array(
|
13 |
+
'title' => 'Side Cart Header',
|
14 |
+
'id' => 'sc_head',
|
15 |
+
'tab' => 'general',
|
16 |
+
),
|
17 |
+
|
18 |
+
array(
|
19 |
+
'title' => 'Side Cart Body',
|
20 |
+
'id' => 'sc_body',
|
21 |
+
'tab' => 'general',
|
22 |
+
),
|
23 |
+
|
24 |
+
|
25 |
+
array(
|
26 |
+
'title' => 'Side Cart Footer',
|
27 |
+
'id' => 'sc_footer',
|
28 |
+
'tab' => 'general',
|
29 |
+
),
|
30 |
+
|
31 |
+
|
32 |
+
array(
|
33 |
+
'title' => 'Texts',
|
34 |
+
'id' => 'texts',
|
35 |
+
'tab' => 'general',
|
36 |
+
'desc' => 'Leave text empty to remove element'
|
37 |
+
),
|
38 |
+
|
39 |
+
|
40 |
+
array(
|
41 |
+
'title' => 'URLs',
|
42 |
+
'id' => 'urls',
|
43 |
+
'tab' => 'general',
|
44 |
+
),
|
45 |
+
|
46 |
+
|
47 |
+
array(
|
48 |
+
'title' => 'Basket',
|
49 |
+
'id' => 'basket',
|
50 |
+
'tab' => 'general',
|
51 |
+
),
|
52 |
+
|
53 |
+
array(
|
54 |
+
'title' => 'Suggested Products',
|
55 |
+
'id' => 'suggested_products',
|
56 |
+
'tab' => 'general',
|
57 |
+
'pro' => 'yes'
|
58 |
+
),
|
59 |
+
|
60 |
+
/* Style TAB Sections */
|
61 |
+
array(
|
62 |
+
'title' => 'Main',
|
63 |
+
'id' => 'sc_main',
|
64 |
+
'tab' => 'style',
|
65 |
+
),
|
66 |
+
|
67 |
+
array(
|
68 |
+
'title' => 'Side Cart Basket',
|
69 |
+
'id' => 'sc_basket',
|
70 |
+
'tab' => 'style',
|
71 |
+
),
|
72 |
+
|
73 |
+
array(
|
74 |
+
'title' => 'Side Cart Header',
|
75 |
+
'id' => 'sc_head',
|
76 |
+
'tab' => 'style',
|
77 |
+
),
|
78 |
+
|
79 |
+
array(
|
80 |
+
'title' => 'Side Cart Body',
|
81 |
+
'id' => 'sc_body',
|
82 |
+
'tab' => 'style',
|
83 |
+
),
|
84 |
+
|
85 |
+
array(
|
86 |
+
'title' => 'Side Cart Body ( Product )',
|
87 |
+
'id' => 'scb_product',
|
88 |
+
'tab' => 'style',
|
89 |
+
),
|
90 |
+
|
91 |
+
|
92 |
+
array(
|
93 |
+
'title' => 'Side Cart Body ( Quantity )',
|
94 |
+
'id' => 'scb_qty',
|
95 |
+
'tab' => 'style',
|
96 |
+
'pro' => 'yes'
|
97 |
+
),
|
98 |
+
|
99 |
+
array(
|
100 |
+
'title' => 'Side Cart Footer',
|
101 |
+
'id' => 'sc_footer',
|
102 |
+
'tab' => 'style',
|
103 |
+
),
|
104 |
+
|
105 |
+
array(
|
106 |
+
'title' => 'Suggested Products',
|
107 |
+
'id' => 'sc_sug_products',
|
108 |
+
'tab' => 'style',
|
109 |
+
'pro' => 'yes'
|
110 |
+
),
|
111 |
+
|
112 |
+
/* Custom CSS TAB Sections */
|
113 |
+
array(
|
114 |
+
'title' => 'Main',
|
115 |
+
'id' => 'av_main',
|
116 |
+
'tab' => 'advanced',
|
117 |
+
),
|
118 |
+
);
|
119 |
+
|
120 |
+
return apply_filters( 'xoo_wsc_admin_settings_sections', $sections );
|
admin/views/settings/advanced.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$settings = array(
|
4 |
+
|
5 |
+
array(
|
6 |
+
'callback' => 'checkbox',
|
7 |
+
'title' => 'Refresh Cart',
|
8 |
+
'id' => 'm-refresh-cart',
|
9 |
+
'section_id' => 'av_main',
|
10 |
+
'default' => 'no',
|
11 |
+
'desc' => '<b>NOTE - Enable this option only if the cart is not showing correct prices.</b>'
|
12 |
+
),
|
13 |
+
|
14 |
+
array(
|
15 |
+
'callback' => 'textarea',
|
16 |
+
'title' => 'Custom CSS',
|
17 |
+
'id' => 'm-custom-css',
|
18 |
+
'section_id' => 'av_main',
|
19 |
+
'default' => '',
|
20 |
+
'args' => array(
|
21 |
+
'rows' => 20,
|
22 |
+
'cols' => 70
|
23 |
+
)
|
24 |
+
),
|
25 |
+
|
26 |
+
);
|
27 |
+
|
28 |
+
|
29 |
+
return apply_filters( 'xoo_wsc_admin_settings', $settings, 'advanced' );
|
30 |
+
|
31 |
+
?>
|
admin/views/settings/general.php
ADDED
@@ -0,0 +1,494 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$settings = array(
|
4 |
+
|
5 |
+
/** MAIN **/
|
6 |
+
|
7 |
+
array(
|
8 |
+
'callback' => 'checkbox',
|
9 |
+
'title' => 'Auto Open Cart',
|
10 |
+
'id' => 'm-auto-open',
|
11 |
+
'section_id' => 'main',
|
12 |
+
'default' => 'yes',
|
13 |
+
),
|
14 |
+
|
15 |
+
|
16 |
+
array(
|
17 |
+
'callback' => 'checkbox',
|
18 |
+
'title' => 'Ajax add to cart',
|
19 |
+
'id' => 'm-ajax-atc',
|
20 |
+
'section_id' => 'main',
|
21 |
+
'default' => 'yes',
|
22 |
+
'desc' => 'Add to cart without refreshing page'
|
23 |
+
),
|
24 |
+
|
25 |
+
|
26 |
+
array(
|
27 |
+
'callback' => 'checkbox',
|
28 |
+
'title' => 'Fly to Cart Animation',
|
29 |
+
'id' => 'm-flycart',
|
30 |
+
'section_id' => 'main',
|
31 |
+
'default' => 'yes',
|
32 |
+
'desc' => 'Works with ajax add to cart',
|
33 |
+
'pro' => 'yes'
|
34 |
+
),
|
35 |
+
|
36 |
+
|
37 |
+
array(
|
38 |
+
'callback' => 'select',
|
39 |
+
'title' => 'Cart Order',
|
40 |
+
'id' => 'm-cart-order',
|
41 |
+
'section_id' => 'main',
|
42 |
+
'args' => array(
|
43 |
+
'options' => array(
|
44 |
+
'asc' => 'Recently added item at last (Asc)',
|
45 |
+
'desc' => 'Recently added item on top (Desc)',
|
46 |
+
),
|
47 |
+
),
|
48 |
+
'default' => 'asc',
|
49 |
+
'desc' => 'If you have bundle/composite products use Asc order'
|
50 |
+
),
|
51 |
+
|
52 |
+
array(
|
53 |
+
'callback' => 'select',
|
54 |
+
'title' => 'Basket Count',
|
55 |
+
'id' => 'm-bk-count',
|
56 |
+
'section_id' => 'main',
|
57 |
+
'args' => array(
|
58 |
+
'options' => array(
|
59 |
+
'quantity' => 'Sum of Quantity of all the products',
|
60 |
+
'items' => 'Number of products',
|
61 |
+
),
|
62 |
+
),
|
63 |
+
'default' => 'items'
|
64 |
+
),
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
array(
|
69 |
+
'callback' => 'select',
|
70 |
+
'title' => 'Coupons List',
|
71 |
+
'id' => 'm-cp-list',
|
72 |
+
'section_id' => 'main',
|
73 |
+
'args' => array(
|
74 |
+
'options' => array(
|
75 |
+
'all' => 'Show All',
|
76 |
+
'available' => 'Show only available',
|
77 |
+
'hide' => 'Do not show'
|
78 |
+
),
|
79 |
+
),
|
80 |
+
'default' => 'all',
|
81 |
+
'pro' => 'yes'
|
82 |
+
),
|
83 |
+
|
84 |
+
|
85 |
+
array(
|
86 |
+
'callback' => 'number',
|
87 |
+
'title' => 'Maximum coupouns count',
|
88 |
+
'id' => 'm-cp-count',
|
89 |
+
'section_id' => 'main',
|
90 |
+
'default' => 20,
|
91 |
+
'pro' => 'yes'
|
92 |
+
),
|
93 |
+
|
94 |
+
array(
|
95 |
+
'callback' => 'textarea',
|
96 |
+
'title' => 'Custom coupons post ID',
|
97 |
+
'id' => 'm-cp-custom',
|
98 |
+
'section_id' => 'main',
|
99 |
+
'default' => '',
|
100 |
+
'desc' => 'Display only these coupons. Add coupons post ID separated by comma. Leave empty to list all',
|
101 |
+
'pro' => 'yes'
|
102 |
+
),
|
103 |
+
|
104 |
+
|
105 |
+
array(
|
106 |
+
'callback' => 'text',
|
107 |
+
'title' => 'Empty cart button URL',
|
108 |
+
'id' => 'm-shop-url',
|
109 |
+
'section_id' => 'main',
|
110 |
+
'default' => get_permalink( wc_get_page_id( 'shop' ) ),
|
111 |
+
),
|
112 |
+
|
113 |
+
|
114 |
+
array(
|
115 |
+
'callback' => 'textarea',
|
116 |
+
'title' => 'Do not show cart on pages',
|
117 |
+
'id' => 'm-hide-cart',
|
118 |
+
'section_id' => 'main',
|
119 |
+
'default' => '',
|
120 |
+
'desc' => 'Use post type/page id/slug separated by comma. For eg: post,contact-us,about-us .For all non woocommerce pages, use no-woocommerce. For checkout page use checkout, for cart page -> cart'
|
121 |
+
),
|
122 |
+
|
123 |
+
|
124 |
+
|
125 |
+
/** SIDE CART HEADER **/
|
126 |
+
|
127 |
+
array(
|
128 |
+
'callback' => 'checkbox_list',
|
129 |
+
'title' => 'Show',
|
130 |
+
'id' => 'sch-show',
|
131 |
+
'section_id' => 'sc_head',
|
132 |
+
'args' => array(
|
133 |
+
'options' => array(
|
134 |
+
'notifications' => 'Notifications',
|
135 |
+
'shipping_bar' => 'Free Shipping Bar',
|
136 |
+
'basket' => 'Basket Icon',
|
137 |
+
'close' => 'Close Icon'
|
138 |
+
),
|
139 |
+
),
|
140 |
+
'default' => array(
|
141 |
+
'notifications', 'shipping_bar', 'basket', 'close'
|
142 |
+
),
|
143 |
+
'pro' => array(
|
144 |
+
'notifications', 'shipping_bar'
|
145 |
+
)
|
146 |
+
),
|
147 |
+
|
148 |
+
|
149 |
+
array(
|
150 |
+
'callback' => 'number',
|
151 |
+
'title' => 'Show notification for seconds',
|
152 |
+
'id' => 'sch-notify-time',
|
153 |
+
'section_id' => 'sc_head',
|
154 |
+
'default' => '5000',
|
155 |
+
'desc' => '( 1 second = 1000 )',
|
156 |
+
'pro' => 'yes'
|
157 |
+
),
|
158 |
+
|
159 |
+
|
160 |
+
/** SIDE CART BODY **/
|
161 |
+
|
162 |
+
array(
|
163 |
+
'callback' => 'checkbox_list',
|
164 |
+
'title' => 'Show',
|
165 |
+
'id' => 'scb-show',
|
166 |
+
'section_id' => 'sc_body',
|
167 |
+
'args' => array(
|
168 |
+
'options' => array(
|
169 |
+
'total_sales' => 'Product Sales Count',
|
170 |
+
'product_image' => 'Product Image',
|
171 |
+
'product_name' => 'Product Name',
|
172 |
+
'product_price' => 'Product Price',
|
173 |
+
'product_total' => 'Product Total',
|
174 |
+
'product_meta' => 'Product Meta ( Variations )',
|
175 |
+
'product_link' => 'Link to Product Page',
|
176 |
+
'product_del' => 'Delete Product',
|
177 |
+
),
|
178 |
+
),
|
179 |
+
'default' => array(
|
180 |
+
'total_sales', 'product_price', 'product_total', 'product_name', 'product_link', 'product_del', 'product_image', 'product_meta'
|
181 |
+
),
|
182 |
+
'pro' => array(
|
183 |
+
'total_sales'
|
184 |
+
)
|
185 |
+
),
|
186 |
+
|
187 |
+
|
188 |
+
array(
|
189 |
+
'callback' => 'checkbox',
|
190 |
+
'title' => 'Allow quantity update',
|
191 |
+
'id' => 'scb-update-qty',
|
192 |
+
'section_id' => 'sc_body',
|
193 |
+
'default' => 'yes',
|
194 |
+
'pro' => 'yes',
|
195 |
+
),
|
196 |
+
|
197 |
+
|
198 |
+
array(
|
199 |
+
'callback' => 'number',
|
200 |
+
'title' => 'Quantity Update Delay',
|
201 |
+
'id' => 'scb-update-delay',
|
202 |
+
'section_id' => 'sc_body',
|
203 |
+
'default' => '500',
|
204 |
+
'desc' => 'Wait before quantiy update request is sent to server ( 1 second = 1000 )',
|
205 |
+
'pro' => 'yes',
|
206 |
+
),
|
207 |
+
|
208 |
+
array(
|
209 |
+
'callback' => 'select',
|
210 |
+
'title' => 'Product name (Variable Product)',
|
211 |
+
'id' => 'scb-pname-var',
|
212 |
+
'section_id' => 'sc_body',
|
213 |
+
'args' => array(
|
214 |
+
'options' => array(
|
215 |
+
'yes' => 'Include Variation',
|
216 |
+
'no' => 'Do not include variation',
|
217 |
+
),
|
218 |
+
),
|
219 |
+
'default' => 'yes',
|
220 |
+
'desc' => 'If you do not wish to include variation attributes in product name, make sure "Product Meta" is checked above to display variation data separately.'
|
221 |
+
),
|
222 |
+
|
223 |
+
|
224 |
+
|
225 |
+
/** SIDE CART FOOTER **/
|
226 |
+
|
227 |
+
array(
|
228 |
+
'callback' => 'checkbox_list',
|
229 |
+
'title' => 'Show',
|
230 |
+
'id' => 'scf-show',
|
231 |
+
'section_id' => 'sc_footer',
|
232 |
+
'args' => array(
|
233 |
+
'options' => array(
|
234 |
+
'subtotal' => 'Subtotal',
|
235 |
+
'discount' => 'Discount',
|
236 |
+
'tax' => 'Tax',
|
237 |
+
'shipping' => 'Shipping Amount',
|
238 |
+
'shipping_calc' => 'Shipping Calculator',
|
239 |
+
'fee' => 'Other Fee',
|
240 |
+
'total' => 'Total',
|
241 |
+
'coupon' => 'Coupon',
|
242 |
+
),
|
243 |
+
),
|
244 |
+
'default' => array(
|
245 |
+
'subtotal', 'discount', 'tax', 'shipping', 'shipping_calc', 'fee', 'total', 'coupon', 'order_notes'
|
246 |
+
),
|
247 |
+
'pro' => array(
|
248 |
+
'discount', 'tax', 'shipping', 'shipping_calc', 'fee', 'total', 'coupon'
|
249 |
+
)
|
250 |
+
),
|
251 |
+
|
252 |
+
|
253 |
+
array(
|
254 |
+
'callback' => 'checkbox',
|
255 |
+
'title' => 'Papyal Express Checkout',
|
256 |
+
'id' => 'scf-pec-enable',
|
257 |
+
'section_id' => 'sc_footer',
|
258 |
+
'default' => 'no',
|
259 |
+
'desc' => '<a href="https://wordpress.org/plugins/woocommerce-gateway-paypal-express-checkout/" target="_blank">Download paypal plugin</a>',
|
260 |
+
'pro' => 'yes'
|
261 |
+
),
|
262 |
+
|
263 |
+
|
264 |
+
/*** SUGGESTED PRODUCTS ***/
|
265 |
+
|
266 |
+
array(
|
267 |
+
'callback' => 'checkbox',
|
268 |
+
'title' => 'Enable',
|
269 |
+
'id' => 'scsp-enable',
|
270 |
+
'section_id' => 'suggested_products',
|
271 |
+
'default' => 'yes',
|
272 |
+
'pro' => 'yes'
|
273 |
+
),
|
274 |
+
|
275 |
+
|
276 |
+
array(
|
277 |
+
'callback' => 'checkbox',
|
278 |
+
'title' => 'Display on mobile devices',
|
279 |
+
'id' => 'scsp-mob-enable',
|
280 |
+
'section_id' => 'suggested_products',
|
281 |
+
'default' => 'yes',
|
282 |
+
'pro' => 'yes'
|
283 |
+
),
|
284 |
+
|
285 |
+
|
286 |
+
|
287 |
+
array(
|
288 |
+
'callback' => 'checkbox_list',
|
289 |
+
'title' => 'Show',
|
290 |
+
'id' => 'scsp-show',
|
291 |
+
'section_id' => 'suggested_products',
|
292 |
+
'args' => array(
|
293 |
+
'options' => array(
|
294 |
+
'image' => 'Product Image',
|
295 |
+
'title' => 'Product Title',
|
296 |
+
'price' => 'Product Price',
|
297 |
+
'addtocart' => 'Add to cart button',
|
298 |
+
),
|
299 |
+
),
|
300 |
+
'default' => array(
|
301 |
+
'image', 'price', 'addtocart', 'title'
|
302 |
+
),
|
303 |
+
'pro' => 'yes'
|
304 |
+
),
|
305 |
+
|
306 |
+
|
307 |
+
array(
|
308 |
+
'callback' => 'select',
|
309 |
+
'title' => 'Products type',
|
310 |
+
'id' => 'scsp-type',
|
311 |
+
'section_id' => 'suggested_products',
|
312 |
+
'args' => array(
|
313 |
+
'options' => array(
|
314 |
+
'cross_sells' => 'Cross-Sells',
|
315 |
+
'related' => 'Related',
|
316 |
+
'up_sells' => 'Up-Sells'
|
317 |
+
),
|
318 |
+
),
|
319 |
+
'default' => 'related',
|
320 |
+
'pro' => 'yes'
|
321 |
+
),
|
322 |
+
|
323 |
+
|
324 |
+
array(
|
325 |
+
'callback' => 'textarea',
|
326 |
+
'title' => 'Custom Product IDS',
|
327 |
+
'id' => 'scsp-ids',
|
328 |
+
'section_id' => 'suggested_products',
|
329 |
+
'default' => '',
|
330 |
+
'desc' => 'Product IDS separated by comma.',
|
331 |
+
'args' => array(
|
332 |
+
'rows' => 2
|
333 |
+
),
|
334 |
+
'pro' => 'yes'
|
335 |
+
),
|
336 |
+
|
337 |
+
|
338 |
+
array(
|
339 |
+
'callback' => 'number',
|
340 |
+
'title' => 'Number of products',
|
341 |
+
'id' => 'scsp-count',
|
342 |
+
'section_id' => 'suggested_products',
|
343 |
+
'default' => 5,
|
344 |
+
'pro' => 'yes'
|
345 |
+
),
|
346 |
+
|
347 |
+
|
348 |
+
array(
|
349 |
+
'callback' => 'checkbox',
|
350 |
+
'title' => 'Random Products',
|
351 |
+
'id' => 'scsp-random',
|
352 |
+
'section_id' => 'suggested_products',
|
353 |
+
'default' => 'yes',
|
354 |
+
'desc' => 'If cross sells/upsells mentioned above are not available, show other random products',
|
355 |
+
'pro' => 'yes'
|
356 |
+
),
|
357 |
+
|
358 |
+
|
359 |
+
|
360 |
+
/***** TEXTS *****/
|
361 |
+
array(
|
362 |
+
'callback' => 'text',
|
363 |
+
'title' => 'Cart Heading',
|
364 |
+
'id' => 'sct-cart-heading',
|
365 |
+
'section_id' => 'texts',
|
366 |
+
'default' => 'Your Cart',
|
367 |
+
),
|
368 |
+
|
369 |
+
array(
|
370 |
+
'callback' => 'text',
|
371 |
+
'title' => 'Continue Button',
|
372 |
+
'id' => 'sct-ft-contbtn',
|
373 |
+
'section_id' => 'texts',
|
374 |
+
'default' => 'Continue Shopping',
|
375 |
+
),
|
376 |
+
|
377 |
+
|
378 |
+
array(
|
379 |
+
'callback' => 'text',
|
380 |
+
'title' => 'Cart Button',
|
381 |
+
'id' => 'sct-ft-cartbtn',
|
382 |
+
'section_id' => 'texts',
|
383 |
+
'default' => 'View Cart',
|
384 |
+
),
|
385 |
+
|
386 |
+
|
387 |
+
array(
|
388 |
+
'callback' => 'text',
|
389 |
+
'title' => 'Checkout Button',
|
390 |
+
'id' => 'sct-ft-chkbtn',
|
391 |
+
'section_id' => 'texts',
|
392 |
+
'default' => 'Checkout',
|
393 |
+
),
|
394 |
+
|
395 |
+
array(
|
396 |
+
'callback' => 'text',
|
397 |
+
'title' => 'Empty Cart',
|
398 |
+
'id' => 'sct-empty',
|
399 |
+
'section_id' => 'texts',
|
400 |
+
'default' => 'Your cart is empty',
|
401 |
+
),
|
402 |
+
|
403 |
+
|
404 |
+
array(
|
405 |
+
'callback' => 'text',
|
406 |
+
'title' => 'Shop Button',
|
407 |
+
'id' => 'sct-shop-btn',
|
408 |
+
'section_id' => 'texts',
|
409 |
+
'default' => 'Return to Shop',
|
410 |
+
'desc' => 'Displays when cart is empty'
|
411 |
+
),
|
412 |
+
|
413 |
+
|
414 |
+
array(
|
415 |
+
'callback' => 'text',
|
416 |
+
'title' => 'Subtotal',
|
417 |
+
'id' => 'sct-subtotal',
|
418 |
+
'section_id' => 'texts',
|
419 |
+
'default' => 'Subtotal',
|
420 |
+
),
|
421 |
+
|
422 |
+
|
423 |
+
array(
|
424 |
+
'callback' => 'text',
|
425 |
+
'title' => 'Remaining amount',
|
426 |
+
'id' => 'sct-sb-remaining',
|
427 |
+
'section_id' => 'texts',
|
428 |
+
'default' => "You're %s away from free shipping.",
|
429 |
+
'desc' => 'Shipping Bar',
|
430 |
+
'pro' => 'yes',
|
431 |
+
),
|
432 |
+
|
433 |
+
array(
|
434 |
+
'callback' => 'text',
|
435 |
+
'title' => 'Free shipping',
|
436 |
+
'id' => 'sct-sb-free',
|
437 |
+
'section_id' => 'texts',
|
438 |
+
'default' => "Congrats! You get free shipping.",
|
439 |
+
'desc' => 'Shipping Bar',
|
440 |
+
'pro' => 'yes',
|
441 |
+
),
|
442 |
+
|
443 |
+
array(
|
444 |
+
'callback' => 'text',
|
445 |
+
'title' => 'Remaining amount',
|
446 |
+
'id' => 'sct-sb-remaining',
|
447 |
+
'section_id' => 'texts',
|
448 |
+
'default' => "You're %s away from free shipping.",
|
449 |
+
'desc' => 'Shipping Bar',
|
450 |
+
'pro' => 'yes'
|
451 |
+
),
|
452 |
+
|
453 |
+
array(
|
454 |
+
'callback' => 'text',
|
455 |
+
'title' => 'Free shipping',
|
456 |
+
'id' => 'sct-sb-free',
|
457 |
+
'section_id' => 'texts',
|
458 |
+
'default' => "Congrats! You get free shipping.",
|
459 |
+
'desc' => 'Shipping Bar',
|
460 |
+
'pro' => 'yes'
|
461 |
+
),
|
462 |
+
|
463 |
+
|
464 |
+
array(
|
465 |
+
'callback' => 'text',
|
466 |
+
'title' => 'Continue Shopping',
|
467 |
+
'id' => 'scu-continue',
|
468 |
+
'section_id' => 'urls',
|
469 |
+
'default' => '#',
|
470 |
+
'desc' => 'Use # to close side cart & remain on the same page'
|
471 |
+
|
472 |
+
),
|
473 |
+
|
474 |
+
array(
|
475 |
+
'callback' => 'text',
|
476 |
+
'title' => 'Cart',
|
477 |
+
'id' => 'scu-cart',
|
478 |
+
'section_id' => 'urls',
|
479 |
+
'default' => wc_get_cart_url(),
|
480 |
+
),
|
481 |
+
|
482 |
+
array(
|
483 |
+
'callback' => 'text',
|
484 |
+
'title' => 'Checkout',
|
485 |
+
'id' => 'scu-checkout',
|
486 |
+
'section_id' => 'urls',
|
487 |
+
'default' => wc_get_checkout_url(),
|
488 |
+
),
|
489 |
+
|
490 |
+
);
|
491 |
+
|
492 |
+
return apply_filters( 'xoo_wsc_admin_settings', $settings, 'general' );
|
493 |
+
|
494 |
+
?>
|
admin/views/settings/style.php
ADDED
@@ -0,0 +1,781 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$settings = array(
|
4 |
+
|
5 |
+
/** SIDE CART MAIN **/
|
6 |
+
array(
|
7 |
+
'callback' => 'number',
|
8 |
+
'title' => 'Side Cart Width',
|
9 |
+
'id' => 'scm-width',
|
10 |
+
'section_id' => 'sc_main',
|
11 |
+
'default' => '320',
|
12 |
+
'desc' => 'Size in px'
|
13 |
+
),
|
14 |
+
|
15 |
+
array(
|
16 |
+
'callback' => 'select',
|
17 |
+
'title' => 'Side Cart Height',
|
18 |
+
'id' => 'scm-height',
|
19 |
+
'section_id' => 'sc_main',
|
20 |
+
'args' => array(
|
21 |
+
'options' => array(
|
22 |
+
'full' => 'Full Height',
|
23 |
+
'auto' => 'Auto Adjust',
|
24 |
+
),
|
25 |
+
),
|
26 |
+
'default' => 'full'
|
27 |
+
),
|
28 |
+
|
29 |
+
array(
|
30 |
+
'callback' => 'select',
|
31 |
+
'title' => 'Open From',
|
32 |
+
'id' => 'scm-open-from',
|
33 |
+
'section_id' => 'sc_main',
|
34 |
+
'args' => array(
|
35 |
+
'options' => array(
|
36 |
+
'left' => 'Left',
|
37 |
+
'right' => 'Right',
|
38 |
+
),
|
39 |
+
),
|
40 |
+
'default' => 'right'
|
41 |
+
),
|
42 |
+
|
43 |
+
|
44 |
+
array(
|
45 |
+
'callback' => 'text',
|
46 |
+
'title' => 'Font',
|
47 |
+
'id' => 'scm-font',
|
48 |
+
'section_id' => 'sc_main',
|
49 |
+
'default' => '',
|
50 |
+
'desc' => 'Use custom font for side cart',
|
51 |
+
),
|
52 |
+
|
53 |
+
/** SIDE CART BASKET **/
|
54 |
+
array(
|
55 |
+
'callback' => 'select',
|
56 |
+
'title' => 'Enable',
|
57 |
+
'id' => 'sck-enable',
|
58 |
+
'section_id' => 'sc_basket',
|
59 |
+
'args' => array(
|
60 |
+
'options' => array(
|
61 |
+
'always_hide' => 'Always Hide',
|
62 |
+
'always_show' => 'Always show',
|
63 |
+
'hide_empty' => 'Hide when cart is empty',
|
64 |
+
),
|
65 |
+
),
|
66 |
+
'default' => 'always_show'
|
67 |
+
),
|
68 |
+
|
69 |
+
|
70 |
+
array(
|
71 |
+
'callback' => 'select',
|
72 |
+
'title' => 'Shape',
|
73 |
+
'id' => 'sck-shape',
|
74 |
+
'section_id' => 'sc_basket',
|
75 |
+
'args' => array(
|
76 |
+
'options' => array(
|
77 |
+
'round' => 'Round',
|
78 |
+
'square' => 'Square',
|
79 |
+
),
|
80 |
+
),
|
81 |
+
'default' => 'round'
|
82 |
+
),
|
83 |
+
|
84 |
+
|
85 |
+
array(
|
86 |
+
'callback' => 'number',
|
87 |
+
'title' => 'Icon Size',
|
88 |
+
'id' => 'sck-size',
|
89 |
+
'section_id' => 'sc_basket',
|
90 |
+
'default' => 30,
|
91 |
+
'desc' => 'Size in px'
|
92 |
+
),
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
array(
|
97 |
+
'callback' => 'checkbox',
|
98 |
+
'title' => 'Show Count',
|
99 |
+
'id' => 'sck-show-count',
|
100 |
+
'section_id' => 'sc_basket',
|
101 |
+
'default' => 'yes',
|
102 |
+
),
|
103 |
+
|
104 |
+
|
105 |
+
array(
|
106 |
+
'callback' => 'radio',
|
107 |
+
'title' => 'Basket Icon',
|
108 |
+
'id' => 'sck-basket-icon',
|
109 |
+
'section_id' => 'sc_basket',
|
110 |
+
'args' => array(
|
111 |
+
'options' => array(
|
112 |
+
'xoo-wsc-icon-basket1' => 'xoo-wsc-icon-basket1',
|
113 |
+
'xoo-wsc-icon-basket2' => 'xoo-wsc-icon-basket2',
|
114 |
+
'xoo-wsc-icon-basket3' => 'xoo-wsc-icon-basket3',
|
115 |
+
'xoo-wsc-icon-basket4' => 'xoo-wsc-icon-basket4',
|
116 |
+
'xoo-wsc-icon-basket5' => 'xoo-wsc-icon-basket5',
|
117 |
+
'xoo-wsc-icon-basket6' => 'xoo-wsc-icon-basket6',
|
118 |
+
'xoo-wsc-icon-cart1' => 'xoo-wsc-icon-cart1',
|
119 |
+
'xoo-wsc-icon-cart2' => 'xoo-wsc-icon-cart2',
|
120 |
+
'xoo-wsc-icon-bag1' => 'xoo-wsc-icon-bag1',
|
121 |
+
'xoo-wsc-icon-bag2' => 'xoo-wsc-icon-bag2',
|
122 |
+
'xoo-wsc-icon-shopping-bag1'=> 'xoo-wsc-icon-shopping-bag1',
|
123 |
+
),
|
124 |
+
'has_asset' => true,
|
125 |
+
'asset_type' => 'icon',
|
126 |
+
'upload' => 'yes'
|
127 |
+
),
|
128 |
+
'default' => 'xoo-wsc-icon-basket1',
|
129 |
+
'pro' => 'yes'
|
130 |
+
),
|
131 |
+
|
132 |
+
array(
|
133 |
+
'callback' => 'upload',
|
134 |
+
'title' => 'Custom Basket Icon',
|
135 |
+
'id' => 'sck-cust-icon',
|
136 |
+
'section_id' => 'sc_basket',
|
137 |
+
'default' => '',
|
138 |
+
'pro' => 'yes'
|
139 |
+
),
|
140 |
+
|
141 |
+
|
142 |
+
array(
|
143 |
+
'callback' => 'select',
|
144 |
+
'title' => 'Basket Position',
|
145 |
+
'id' => 'sck-position',
|
146 |
+
'section_id' => 'sc_basket',
|
147 |
+
'args' => array(
|
148 |
+
'options' => array(
|
149 |
+
'top' => 'Top',
|
150 |
+
'bottom' => 'Bottom',
|
151 |
+
),
|
152 |
+
),
|
153 |
+
'default' => 'bottom'
|
154 |
+
),
|
155 |
+
|
156 |
+
array(
|
157 |
+
'callback' => 'number',
|
158 |
+
'title' => 'Basket Offset ↨',
|
159 |
+
'id' => 'sck-offset',
|
160 |
+
'section_id' => 'sc_basket',
|
161 |
+
'default' => 12,
|
162 |
+
'desc' => 'Leave pixels from top/bottom'
|
163 |
+
),
|
164 |
+
|
165 |
+
array(
|
166 |
+
'callback' => 'number',
|
167 |
+
'title' => 'Basket Offset ⟷',
|
168 |
+
'id' => 'sck-hoffset',
|
169 |
+
'section_id' => 'sc_basket',
|
170 |
+
'default' => 0,
|
171 |
+
'desc' => 'Leave pixels from left/right'
|
172 |
+
),
|
173 |
+
|
174 |
+
|
175 |
+
array(
|
176 |
+
'callback' => 'select',
|
177 |
+
'title' => 'Count Position',
|
178 |
+
'id' => 'sck-count-pos',
|
179 |
+
'section_id' => 'sc_basket',
|
180 |
+
'args' => array(
|
181 |
+
'options' => array(
|
182 |
+
'top_right' => 'Top Right',
|
183 |
+
'top_left' => 'Top Left',
|
184 |
+
'bottom_right' => 'Bottom Right',
|
185 |
+
'bottom_left' => 'Bottom Left',
|
186 |
+
),
|
187 |
+
),
|
188 |
+
'default' => 'top_left'
|
189 |
+
),
|
190 |
+
|
191 |
+
|
192 |
+
array(
|
193 |
+
'callback' => 'color',
|
194 |
+
'title' => 'Basket Color',
|
195 |
+
'id' => 'sck-basket-color',
|
196 |
+
'section_id' => 'sc_basket',
|
197 |
+
'default' => '#000000',
|
198 |
+
),
|
199 |
+
|
200 |
+
|
201 |
+
array(
|
202 |
+
'callback' => 'color',
|
203 |
+
'title' => 'Basket Background Color',
|
204 |
+
'id' => 'sck-basket-bg',
|
205 |
+
'section_id' => 'sc_basket',
|
206 |
+
'default' => '#ffffff',
|
207 |
+
),
|
208 |
+
|
209 |
+
|
210 |
+
array(
|
211 |
+
'callback' => 'text',
|
212 |
+
'title' => 'Basket Shadow',
|
213 |
+
'id' => 'sck-basket-sh',
|
214 |
+
'section_id' => 'sc_basket',
|
215 |
+
'default' => '0 1px 4px 0',
|
216 |
+
'desc' => 'Default: 0 1px 4px 0'
|
217 |
+
),
|
218 |
+
|
219 |
+
array(
|
220 |
+
'callback' => 'color',
|
221 |
+
'title' => 'Count Color',
|
222 |
+
'id' => 'sck-count-color',
|
223 |
+
'section_id' => 'sc_basket',
|
224 |
+
'default' => '#ffffff',
|
225 |
+
),
|
226 |
+
|
227 |
+
|
228 |
+
array(
|
229 |
+
'callback' => 'color',
|
230 |
+
'title' => 'Count Background Color',
|
231 |
+
'id' => 'sck-count-bg',
|
232 |
+
'section_id' => 'sc_basket',
|
233 |
+
'default' => '#000000',
|
234 |
+
),
|
235 |
+
|
236 |
+
|
237 |
+
|
238 |
+
/** SIDE CART HEADER **/
|
239 |
+
|
240 |
+
array(
|
241 |
+
'callback' => 'select',
|
242 |
+
'title' => 'Heading Align',
|
243 |
+
'id' => 'sch-head-align',
|
244 |
+
'section_id' => 'sc_head',
|
245 |
+
'args' => array(
|
246 |
+
'options' => array(
|
247 |
+
'center' => 'Center',
|
248 |
+
'flex-start' => 'Left',
|
249 |
+
'flex-end' => 'Right'
|
250 |
+
),
|
251 |
+
),
|
252 |
+
'default' => 'center'
|
253 |
+
),
|
254 |
+
|
255 |
+
|
256 |
+
array(
|
257 |
+
'callback' => 'select',
|
258 |
+
'title' => 'Close Icon Align',
|
259 |
+
'id' => 'sch-close-align',
|
260 |
+
'section_id' => 'sc_head',
|
261 |
+
'args' => array(
|
262 |
+
'options' => array(
|
263 |
+
'left' => 'Left',
|
264 |
+
'right' => 'Right'
|
265 |
+
),
|
266 |
+
),
|
267 |
+
'default' => 'right'
|
268 |
+
),
|
269 |
+
|
270 |
+
array(
|
271 |
+
'callback' => 'radio',
|
272 |
+
'title' => 'Close Icon',
|
273 |
+
'id' => 'sch-close-icon',
|
274 |
+
'section_id' => 'sc_head',
|
275 |
+
'args' => array(
|
276 |
+
'options' => array(
|
277 |
+
'xoo-wsc-icon-cross' => 'xoo-wsc-icon-cross',
|
278 |
+
'xoo-wsc-icon-arrow-long-right' => 'xoo-wsc-icon-arrow-long-right',
|
279 |
+
'xoo-wsc-icon-arrow-thin-right' => 'xoo-wsc-icon-arrow-thin-right'
|
280 |
+
),
|
281 |
+
'has_asset' => true,
|
282 |
+
'asset_type' => 'icon',
|
283 |
+
'upload' => 'yes'
|
284 |
+
),
|
285 |
+
'default' => 'xoo-wsc-icon-cross',
|
286 |
+
'pro' => 'yes'
|
287 |
+
),
|
288 |
+
|
289 |
+
array(
|
290 |
+
'callback' => 'number',
|
291 |
+
'title' => 'Close Icon Size',
|
292 |
+
'id' => 'sch-close-fsize',
|
293 |
+
'section_id' => 'sc_head',
|
294 |
+
'default' => '16',
|
295 |
+
'desc' => 'Size in px'
|
296 |
+
),
|
297 |
+
|
298 |
+
|
299 |
+
array(
|
300 |
+
'callback' => 'number',
|
301 |
+
'title' => 'Heading Font Size',
|
302 |
+
'id' => 'sch-head-fsize',
|
303 |
+
'section_id' => 'sc_head',
|
304 |
+
'default' => '20',
|
305 |
+
'desc' => 'Size in px'
|
306 |
+
),
|
307 |
+
|
308 |
+
array(
|
309 |
+
'callback' => 'color',
|
310 |
+
'title' => 'Shipping Bar Color',
|
311 |
+
'id' => 'sch-sbcolor',
|
312 |
+
'section_id' => 'sc_head',
|
313 |
+
'default' => '#1e73be',
|
314 |
+
'pro' => 'yes'
|
315 |
+
),
|
316 |
+
|
317 |
+
|
318 |
+
array(
|
319 |
+
'callback' => 'color',
|
320 |
+
'title' => 'Background Color',
|
321 |
+
'id' => 'sch-bgcolor',
|
322 |
+
'section_id' => 'sc_head',
|
323 |
+
'default' => '#ffffff',
|
324 |
+
),
|
325 |
+
|
326 |
+
|
327 |
+
array(
|
328 |
+
'callback' => 'color',
|
329 |
+
'title' => 'Text Color',
|
330 |
+
'id' => 'sch-txtcolor',
|
331 |
+
'section_id' => 'sc_head',
|
332 |
+
'default' => '#000000',
|
333 |
+
),
|
334 |
+
|
335 |
+
/** SIDE CART BODY **/
|
336 |
+
array(
|
337 |
+
'callback' => 'radio',
|
338 |
+
'title' => 'Delete Icon',
|
339 |
+
'id' => 'scb-del-icon',
|
340 |
+
'section_id' => 'sc_body',
|
341 |
+
'args' => array(
|
342 |
+
'options' => array(
|
343 |
+
'xoo-wsc-icon-trash' => 'xoo-wsc-icon-trash',
|
344 |
+
'xoo-wsc-icon-trash1' => 'xoo-wsc-icon-trash1',
|
345 |
+
'xoo-wsc-icon-trash2' => 'xoo-wsc-icon-trash2',
|
346 |
+
'xoo-wsc-icon-cross' => 'xoo-wsc-icon-cross',
|
347 |
+
'xoo-wsc-icon-del1' => 'xoo-wsc-icon-del1',
|
348 |
+
'xoo-wsc-icon-del2' => 'xoo-wsc-icon-del2',
|
349 |
+
'xoo-wsc-icon-del3' => 'xoo-wsc-icon-del3',
|
350 |
+
'xoo-wsc-icon-del4' => 'xoo-wsc-icon-del4',
|
351 |
+
),
|
352 |
+
'has_asset' => true,
|
353 |
+
'asset_type' => 'icon'
|
354 |
+
),
|
355 |
+
'default' => 'xoo-wsc-icon-trash',
|
356 |
+
'pro' => 'yes'
|
357 |
+
),
|
358 |
+
|
359 |
+
|
360 |
+
array(
|
361 |
+
'callback' => 'number',
|
362 |
+
'title' => 'Font Size',
|
363 |
+
'id' => 'scb-fsize',
|
364 |
+
'section_id' => 'sc_body',
|
365 |
+
'default' => 16,
|
366 |
+
'desc' => 'Size in px'
|
367 |
+
),
|
368 |
+
|
369 |
+
|
370 |
+
array(
|
371 |
+
'callback' => 'color',
|
372 |
+
'title' => 'Background Color',
|
373 |
+
'id' => 'scb-bgcolor',
|
374 |
+
'section_id' => 'sc_body',
|
375 |
+
'default' => '#ffffff',
|
376 |
+
),
|
377 |
+
|
378 |
+
|
379 |
+
array(
|
380 |
+
'callback' => 'color',
|
381 |
+
'title' => 'Text Color',
|
382 |
+
'id' => 'scb-txtcolor',
|
383 |
+
'section_id' => 'sc_body',
|
384 |
+
'default' => '#000000',
|
385 |
+
),
|
386 |
+
|
387 |
+
|
388 |
+
array(
|
389 |
+
'callback' => 'upload',
|
390 |
+
'title' => 'Empty Cart Image',
|
391 |
+
'id' => 'scb-empty-img',
|
392 |
+
'section_id' => 'sc_body',
|
393 |
+
'default' => '',
|
394 |
+
'pro' => 'yes'
|
395 |
+
),
|
396 |
+
|
397 |
+
|
398 |
+
/** SIDE CART BODY Product **/
|
399 |
+
|
400 |
+
array(
|
401 |
+
'callback' => 'number',
|
402 |
+
'title' => 'Image Width',
|
403 |
+
'id' => 'scbp-imgw',
|
404 |
+
'section_id' => 'scb_product',
|
405 |
+
'default' => 30,
|
406 |
+
'desc' => 'Value in percentage'
|
407 |
+
),
|
408 |
+
|
409 |
+
array(
|
410 |
+
'callback' => 'text',
|
411 |
+
'title' => 'Product Padding',
|
412 |
+
'id' => 'scbp-padding',
|
413 |
+
'section_id' => 'scb_product',
|
414 |
+
'default' => '20px 15px',
|
415 |
+
'desc' => '↨ ⟷ ( Default: 20px 15px )'
|
416 |
+
),
|
417 |
+
|
418 |
+
|
419 |
+
array(
|
420 |
+
'callback' => 'select',
|
421 |
+
'title' => 'Product Details Display',
|
422 |
+
'id' => 'scbp-display',
|
423 |
+
'section_id' => 'scb_product',
|
424 |
+
'args' => array(
|
425 |
+
'options' => array(
|
426 |
+
'stretched' => 'Stretched',
|
427 |
+
'center' => 'Center',
|
428 |
+
'flex-start' => 'Top'
|
429 |
+
),
|
430 |
+
),
|
431 |
+
'default' => 'center',
|
432 |
+
),
|
433 |
+
|
434 |
+
|
435 |
+
|
436 |
+
array(
|
437 |
+
'callback' => 'select',
|
438 |
+
'title' => 'Quantiy & Price Display',
|
439 |
+
'id' => 'scbp-qpdisplay',
|
440 |
+
'section_id' => 'scb_product',
|
441 |
+
'args' => array(
|
442 |
+
'options' => array(
|
443 |
+
'one_liner' => 'Show in one line',
|
444 |
+
'separate' => 'Show separately',
|
445 |
+
),
|
446 |
+
),
|
447 |
+
'default' => 'one_liner',
|
448 |
+
'desc' => 'When quantity update is not allowed'
|
449 |
+
),
|
450 |
+
|
451 |
+
|
452 |
+
|
453 |
+
/** SIDE CART BODY Quantity **/
|
454 |
+
|
455 |
+
array(
|
456 |
+
'callback' => 'select',
|
457 |
+
'title' => 'Quantity Input Style',
|
458 |
+
'id' => 'scbq-style',
|
459 |
+
'section_id' => 'scb_qty',
|
460 |
+
'args' => array(
|
461 |
+
'options' => array(
|
462 |
+
'square' => 'Square Corners',
|
463 |
+
'circle' => 'Round Corners',
|
464 |
+
),
|
465 |
+
),
|
466 |
+
'default' => 'square',
|
467 |
+
'pro' => 'yes'
|
468 |
+
),
|
469 |
+
|
470 |
+
array(
|
471 |
+
'callback' => 'number',
|
472 |
+
'title' => 'Box Width',
|
473 |
+
'id' => 'scbq-width',
|
474 |
+
'section_id' => 'scb_qty',
|
475 |
+
'default' => 75,
|
476 |
+
'desc' => 'Size in px',
|
477 |
+
'pro' => 'yes'
|
478 |
+
),
|
479 |
+
|
480 |
+
|
481 |
+
array(
|
482 |
+
'callback' => 'number',
|
483 |
+
'title' => 'Box Height',
|
484 |
+
'id' => 'scbq-height',
|
485 |
+
'section_id' => 'scb_qty',
|
486 |
+
'default' => 28,
|
487 |
+
'desc' => 'Size in px',
|
488 |
+
'pro' => 'yes'
|
489 |
+
),
|
490 |
+
|
491 |
+
array(
|
492 |
+
'callback' => 'number',
|
493 |
+
'title' => 'Border Size',
|
494 |
+
'id' => 'scbq-bsize',
|
495 |
+
'section_id' => 'scb_qty',
|
496 |
+
'default' => 1,
|
497 |
+
'desc' => 'Size in px',
|
498 |
+
'pro' => 'yes'
|
499 |
+
),
|
500 |
+
|
501 |
+
|
502 |
+
array(
|
503 |
+
'callback' => 'color',
|
504 |
+
'title' => 'Input Border Color',
|
505 |
+
'id' => 'scbq-input-bcolor',
|
506 |
+
'section_id' => 'scb_qty',
|
507 |
+
'default' => '#000000',
|
508 |
+
'desc' => 'Leave empty to remove border',
|
509 |
+
'pro' => 'yes'
|
510 |
+
),
|
511 |
+
|
512 |
+
|
513 |
+
array(
|
514 |
+
'callback' => 'color',
|
515 |
+
'title' => 'Box Border Color',
|
516 |
+
'id' => 'scbq-box-bcolor',
|
517 |
+
'section_id' => 'scb_qty',
|
518 |
+
'default' => '#000000',
|
519 |
+
'desc' => 'Leave empty to remove border',
|
520 |
+
'pro' => 'yes'
|
521 |
+
),
|
522 |
+
|
523 |
+
array(
|
524 |
+
'callback' => 'color',
|
525 |
+
'title' => 'Input BG Color',
|
526 |
+
'id' => 'scbq-input-bgcolor',
|
527 |
+
'section_id' => 'scb_qty',
|
528 |
+
'default' => '#ffffff',
|
529 |
+
'pro' => 'yes'
|
530 |
+
),
|
531 |
+
|
532 |
+
|
533 |
+
array(
|
534 |
+
'callback' => 'color',
|
535 |
+
'title' => 'Input Text Color',
|
536 |
+
'id' => 'scbq-input-txtcolor',
|
537 |
+
'section_id' => 'scb_qty',
|
538 |
+
'default' => '#000000',
|
539 |
+
'pro' => 'yes'
|
540 |
+
),
|
541 |
+
|
542 |
+
|
543 |
+
array(
|
544 |
+
'callback' => 'color',
|
545 |
+
'title' => 'Buttons BG Color',
|
546 |
+
'id' => 'scbq-box-bgcolor',
|
547 |
+
'section_id' => 'scb_qty',
|
548 |
+
'default' => '#ffffff',
|
549 |
+
'pro' => 'yes'
|
550 |
+
),
|
551 |
+
|
552 |
+
|
553 |
+
array(
|
554 |
+
'callback' => 'color',
|
555 |
+
'title' => 'Buttons Text Color',
|
556 |
+
'id' => 'scbq-box-txtcolor',
|
557 |
+
'section_id' => 'scb_qty',
|
558 |
+
'default' => '#000000',
|
559 |
+
'pro' => 'yes'
|
560 |
+
),
|
561 |
+
|
562 |
+
/** SIDE CART FOOTER **/
|
563 |
+
|
564 |
+
array(
|
565 |
+
'callback' => 'checkbox',
|
566 |
+
'title' => 'Stick to bottom',
|
567 |
+
'id' => 'scf-stick',
|
568 |
+
'section_id' => 'sc_footer',
|
569 |
+
'default' => 'yes',
|
570 |
+
'desc' => 'If enabled, footer will be sticked to bottom.'
|
571 |
+
),
|
572 |
+
|
573 |
+
array(
|
574 |
+
'callback' => 'text',
|
575 |
+
'title' => 'Padding',
|
576 |
+
'id' => 'scf-padding',
|
577 |
+
'section_id' => 'sc_footer',
|
578 |
+
'default' => '10px 20px',
|
579 |
+
'desc' => '↨ ⟷ ( Default: 10px 20px ), use values'
|
580 |
+
),
|
581 |
+
|
582 |
+
|
583 |
+
array(
|
584 |
+
'callback' => 'number',
|
585 |
+
'title' => 'Font Size',
|
586 |
+
'id' => 'scf-fsize',
|
587 |
+
'section_id' => 'sc_footer',
|
588 |
+
'default' => '18',
|
589 |
+
'desc' => 'Size in px'
|
590 |
+
),
|
591 |
+
|
592 |
+
|
593 |
+
array(
|
594 |
+
'callback' => 'color',
|
595 |
+
'title' => 'Background Color',
|
596 |
+
'id' => 'scf-bgcolor',
|
597 |
+
'section_id' => 'sc_footer',
|
598 |
+
'default' => '#ffffff',
|
599 |
+
),
|
600 |
+
|
601 |
+
|
602 |
+
array(
|
603 |
+
'callback' => 'color',
|
604 |
+
'title' => 'Text Color',
|
605 |
+
'id' => 'scf-txtcolor',
|
606 |
+
'section_id' => 'sc_footer',
|
607 |
+
'default' => '#000000',
|
608 |
+
),
|
609 |
+
|
610 |
+
array(
|
611 |
+
'callback' => 'radio',
|
612 |
+
'title' => 'Coupon Icon',
|
613 |
+
'id' => 'scf-coup-icon',
|
614 |
+
'section_id' => 'sc_footer',
|
615 |
+
'args' => array(
|
616 |
+
'options' => array(
|
617 |
+
'xoo-wsc-icon-coupon' => 'xoo-wsc-icon-coupon',
|
618 |
+
'xoo-wsc-icon-coupon-1' => 'xoo-wsc-icon-coupon-1',
|
619 |
+
'xoo-wsc-icon-coupon-2' => 'xoo-wsc-icon-coupon-2',
|
620 |
+
'xoo-wsc-icon-coupon-3' => 'xoo-wsc-icon-coupon-3',
|
621 |
+
'xoo-wsc-icon-coupon-4' => 'xoo-wsc-icon-coupon-4',
|
622 |
+
'xoo-wsc-icon-coupon-5' => 'xoo-wsc-icon-coupon-5',
|
623 |
+
'xoo-wsc-icon-coupon-6' => 'xoo-wsc-icon-coupon-6',
|
624 |
+
'xoo-wsc-icon-coupon-7' => 'xoo-wsc-icon-coupon-7',
|
625 |
+
'xoo-wsc-icon-coupon-8' => 'xoo-wsc-icon-coupon-8',
|
626 |
+
),
|
627 |
+
'has_asset' => true,
|
628 |
+
'asset_type' => 'icon',
|
629 |
+
'upload' => 'yes'
|
630 |
+
),
|
631 |
+
'default' => 'xoo-wsc-icon-coupon-8',
|
632 |
+
'pro' => 'yes'
|
633 |
+
),
|
634 |
+
|
635 |
+
array(
|
636 |
+
'callback' => 'sortable',
|
637 |
+
'title' => 'Button Position',
|
638 |
+
'id' => 'scf-button-pos',
|
639 |
+
'section_id' => 'sc_footer',
|
640 |
+
'args' => array(
|
641 |
+
'options' => array(
|
642 |
+
'continue' => 'Continue Shopping',
|
643 |
+
'cart' => 'View Cart',
|
644 |
+
'checkout' => 'Checkout'
|
645 |
+
),
|
646 |
+
'display' => 'vertical'
|
647 |
+
),
|
648 |
+
'default' => array( 'cart', 'continue', 'checkout' ),
|
649 |
+
'desc' => 'Drag to change order. Leave button text empty under general -> texts to remove button'
|
650 |
+
),
|
651 |
+
|
652 |
+
|
653 |
+
array(
|
654 |
+
'callback' => 'select',
|
655 |
+
'title' => 'Button Row',
|
656 |
+
'id' => 'scf-btns-row',
|
657 |
+
'section_id' => 'sc_footer',
|
658 |
+
'args' => array(
|
659 |
+
'options' => array(
|
660 |
+
'one' => 'One in a row ( 1+1+1 )',
|
661 |
+
'two_one' => 'Two in first row ( 2 + 1 )',
|
662 |
+
'one_two' => 'Two in last row ( 1 + 2 )',
|
663 |
+
'three' => 'Three in one row( 3 )'
|
664 |
+
),
|
665 |
+
),
|
666 |
+
'default' => 'one'
|
667 |
+
),
|
668 |
+
|
669 |
+
|
670 |
+
array(
|
671 |
+
'callback' => 'select',
|
672 |
+
'title' => 'Button Design',
|
673 |
+
'id' => 'scf-btns-theme',
|
674 |
+
'section_id' => 'sc_footer',
|
675 |
+
'args' => array(
|
676 |
+
'options' => array(
|
677 |
+
'theme' => 'Use theme button design & colors',
|
678 |
+
'custom' => 'Custom',
|
679 |
+
),
|
680 |
+
),
|
681 |
+
'default' => 'theme',
|
682 |
+
'desc' => 'Below color options will be ineffective if set to theme design.'
|
683 |
+
),
|
684 |
+
|
685 |
+
|
686 |
+
array(
|
687 |
+
'callback' => 'color',
|
688 |
+
'title' => 'Button Background Color',
|
689 |
+
'id' => 'scf-btn-bgcolor',
|
690 |
+
'section_id' => 'sc_footer',
|
691 |
+
'default' => '#ffffff',
|
692 |
+
),
|
693 |
+
|
694 |
+
|
695 |
+
array(
|
696 |
+
'callback' => 'color',
|
697 |
+
'title' => 'Button Text Color',
|
698 |
+
'id' => 'scf-btn-txtcolor',
|
699 |
+
'section_id' => 'sc_footer',
|
700 |
+
'default' => '#000000',
|
701 |
+
),
|
702 |
+
|
703 |
+
array(
|
704 |
+
'callback' => 'text',
|
705 |
+
'title' => 'Button Border',
|
706 |
+
'id' => 'scf-btn-border',
|
707 |
+
'section_id' => 'sc_footer',
|
708 |
+
'default' => '2px solid #000000',
|
709 |
+
'desc' => 'Default: 2px solid #000000'
|
710 |
+
),
|
711 |
+
|
712 |
+
|
713 |
+
|
714 |
+
/** Suggested products **/
|
715 |
+
array(
|
716 |
+
'callback' => 'select',
|
717 |
+
'title' => 'Style',
|
718 |
+
'id' => 'scsp-style',
|
719 |
+
'section_id' => 'sc_sug_products',
|
720 |
+
'args' => array(
|
721 |
+
'options' => array(
|
722 |
+
'narrow' => 'Narrow',
|
723 |
+
'wide' => 'Wide',
|
724 |
+
),
|
725 |
+
),
|
726 |
+
'default' => 'wide',
|
727 |
+
'pro' => 'yes'
|
728 |
+
),
|
729 |
+
|
730 |
+
|
731 |
+
array(
|
732 |
+
'callback' => 'select',
|
733 |
+
'title' => 'Location',
|
734 |
+
'id' => 'scsp-location',
|
735 |
+
'section_id' => 'sc_sug_products',
|
736 |
+
'args' => array(
|
737 |
+
'options' => array(
|
738 |
+
'before' => 'Before Totals',
|
739 |
+
'after' => 'After Totals',
|
740 |
+
),
|
741 |
+
),
|
742 |
+
'default' => 'after',
|
743 |
+
'pro' => 'yes'
|
744 |
+
),
|
745 |
+
|
746 |
+
|
747 |
+
array(
|
748 |
+
'callback' => 'number',
|
749 |
+
'title' => 'Image Width',
|
750 |
+
'id' => 'scsp-imgw',
|
751 |
+
'section_id' => 'sc_sug_products',
|
752 |
+
'default' => '80',
|
753 |
+
'desc' => 'value in px',
|
754 |
+
'pro' => 'yes'
|
755 |
+
),
|
756 |
+
|
757 |
+
|
758 |
+
array(
|
759 |
+
'callback' => 'number',
|
760 |
+
'title' => 'Font Size',
|
761 |
+
'id' => 'scsp-fsize',
|
762 |
+
'section_id' => 'sc_sug_products',
|
763 |
+
'default' => '14',
|
764 |
+
'desc' => 'Size in px',
|
765 |
+
'pro' => 'yes'
|
766 |
+
),
|
767 |
+
|
768 |
+
|
769 |
+
array(
|
770 |
+
'callback' => 'color',
|
771 |
+
'title' => 'Background Color',
|
772 |
+
'id' => 'scsp-bgcolor',
|
773 |
+
'section_id' => 'sc_sug_products',
|
774 |
+
'default' => '#eee',
|
775 |
+
'pro' => 'yes'
|
776 |
+
),
|
777 |
+
|
778 |
+
);
|
779 |
+
|
780 |
+
return apply_filters( 'xoo_wsc_admin_settings', $settings, 'style' );
|
781 |
+
?>
|
admin/views/tabs.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$tabs = array(
|
4 |
+
'general' => array(
|
5 |
+
'title' => 'General',
|
6 |
+
'id' => 'general',
|
7 |
+
'option_key' => 'xoo-wsc-gl-options'
|
8 |
+
),
|
9 |
+
|
10 |
+
'style' => array(
|
11 |
+
'title' => 'Style',
|
12 |
+
'id' => 'style',
|
13 |
+
'option_key' => 'xoo-wsc-sy-options'
|
14 |
+
),
|
15 |
+
|
16 |
+
'advanced' => array(
|
17 |
+
'title' => 'Advanced',
|
18 |
+
'id' => 'advanced',
|
19 |
+
'option_key' => 'xoo-wsc-av-options'
|
20 |
+
),
|
21 |
+
|
22 |
+
'pro' => array(
|
23 |
+
'title' => 'PRO',
|
24 |
+
'id' => 'pro',
|
25 |
+
'option_key' => 'xoo-wsc-dummy-pro'
|
26 |
+
),
|
27 |
+
);
|
28 |
+
|
29 |
+
return apply_filters( 'xoo_wsc_admin_settings_tabs', $tabs );
|
assets/css/fonts/Woo-Side-Cart.eot
ADDED
Binary file
|
assets/css/fonts/Woo-Side-Cart.svg
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
+
<metadata>Generated by IcoMoon</metadata>
|
5 |
+
<defs>
|
6 |
+
<font id="Woo-Side-Cart" horiz-adv-x="1024">
|
7 |
+
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
+
<missing-glyph horiz-adv-x="1024" />
|
9 |
+
<glyph unicode=" " horiz-adv-x="512" d="" />
|
10 |
+
<glyph unicode="" glyph-name="arrow-long-right" d="M716.8 179.2v179.2h-665.6v204.8h665.6v179.2l268.8-281.6-268.8-281.6z" />
|
11 |
+
<glyph unicode="" glyph-name="basket5" d="M928 512h-832c-17.696 0-32 14.304-32 32s14.304 32 32 32h64l192 352c0 17.696 14.304 32 32 32h64c17.696 0 32-14.304 32-32l-192-352h448l-192 352c0 17.696 14.304 32 32 32h96c17.696 0 32-14.304 32-32l160-352h64c17.696 0 32-14.304 32-32s-14.304-32-32-32zM96 448h832c17.696 0 32-14.304 32-32l-64-448c0-17.696-14.304-32-32-32h-704c-17.696 0-32 14.304-32 32l-64 448c0 17.696 14.304 32 32 32zM704 64h64c17.696 0 32 14.304 32 32l32 192c0 17.696-14.304 32-32 32h-64c-17.696 0-32-14.304-32-32l-32-192c0-17.696 14.304-32 32-32zM448 96c0-17.696 14.304-32 32-32h64c17.696 0 32 14.304 32 32v192c0 17.696-14.304 32-32 32h-64c-17.696 0-32-14.304-32-32v-192zM224 96c0-17.696 14.304-32 32-32h64c17.696 0 32 14.304 32 32l-32 192c0 17.696-14.304 32-32 32h-64c-17.696 0-32-14.304-32-32l32-192z" />
|
12 |
+
<glyph unicode="" glyph-name="basket4" d="M942.029 614.4h-256.358l-92.774-92.774c-23.194-23.194-54.067-35.942-86.835-35.942-32.87 0-63.693 12.8-86.938 35.994-23.142 23.142-35.942 53.965-35.994 86.784 0 1.997 0.512 3.942 0.563 5.939h-301.773c-16.998 0-30.72-13.722-30.72-30.72v-122.88h921.6v122.88c0 16.998-13.824 30.72-30.771 30.72zM551.322 563.251l258.816 258.816c12.032 11.981 12.134 31.386 0.102 43.469l-47.104 47.104c-11.981 11.981-31.437 11.93-43.52 0l-258.816-258.867c-24.986-24.986-24.986-65.536 0-90.522 24.986-24.934 65.485-24.986 90.522 0zM195.738 88.525c4.966-20.531 26.368-37.325 47.462-37.325h537.6c21.094 0 42.496 16.794 47.462 37.325l77.978 321.075h-788.48l77.978-321.075z" />
|
13 |
+
<glyph unicode="" glyph-name="basket6" horiz-adv-x="1170" d="M1097.143 512c40.571 0 73.143-32.571 73.143-73.143s-32.571-73.143-73.143-73.143h-8.571l-65.714-378.286c-6.286-34.857-36.571-60.571-72-60.571h-731.429c-35.429 0-65.714 25.714-72 60.571l-65.714 378.286h-8.571c-40.571 0-73.143 32.571-73.143 73.143s32.571 73.143 73.143 73.143h1024zM277.143 54.857c20 1.714 35.429 19.429 33.714 39.429l-18.286 237.714c-1.714 20-19.429 35.429-39.429 33.714s-35.429-19.429-33.714-39.429l18.286-237.714c1.714-18.857 17.714-33.714 36.571-33.714h2.857zM512 91.428v237.714c0 20-16.571 36.571-36.571 36.571s-36.571-16.571-36.571-36.571v-237.714c0-20 16.571-36.571 36.571-36.571s36.571 16.571 36.571 36.571zM731.429 91.428v237.714c0 20-16.571 36.571-36.571 36.571s-36.571-16.571-36.571-36.571v-237.714c0-20 16.571-36.571 36.571-36.571s36.571 16.571 36.571 36.571zM932.571 88.571l18.286 237.714c1.714 20-13.714 37.714-33.714 39.429s-37.714-13.714-39.429-33.714l-18.286-237.714c-1.714-20 13.714-37.714 33.714-39.429h2.857c18.857 0 34.857 14.857 36.571 33.714zM272 784l-53.143-235.429h-75.429l57.714 252c14.857 66.857 73.714 113.714 142.286 113.714h95.429c0 20 16.571 36.571 36.571 36.571h219.429c20 0 36.571-16.571 36.571-36.571h95.429c68.571 0 127.429-46.857 142.286-113.714l57.714-252h-75.429l-53.143 235.429c-8 33.714-37.143 57.143-71.429 57.143h-95.429c0-20-16.571-36.571-36.571-36.571h-219.429c-20 0-36.571 16.571-36.571 36.571h-95.429c-34.286 0-63.429-23.429-71.429-57.143z" />
|
14 |
+
<glyph unicode="" glyph-name="basket1" d="M512 212.667c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM384 554.667h256l-128 188zM734 554.667h204c24 0 44-18 44-42-34.625-138.041-73.705-271.628-110-408-10-36-42-62-82-62h-556c-40 0-72 26-82 62l-108 396c-2 4-2 8-2 12 0 24 20 42 44 42h204l186 280c8 12 22 18 36 18s28-6 36-18z" />
|
15 |
+
<glyph unicode="" glyph-name="basket2" d="M0 512v96h120l240.992 241.024c-1.6 4.768-2.976 9.632-2.976 14.976 0 26.528 21.472 48 48 48 26.496 0 48-21.472 48-48 0-26.496-21.504-48-48-48-3.552 0-6.688 1.312-9.984 2.016l-210.048-210.016h619.328l-208.8 210.528c-4.128-1.152-8.064-2.528-12.512-2.528-26.496 0-48 21.504-48 48 0 26.528 21.504 48 48 48s48-21.472 48-48c0-4.896-1.44-9.376-2.816-13.856l242.144-242.144h120.672v-96h-992zM795.808 35.136c-9.376-37.504-35.36-35.424-35.36-35.424l-531.040-1.024c-27.072 0-34.336 34.304-34.336 34.304l-140.384 446.56 882.368 0.832-141.248-445.248zM319.968 416h-32v-160h32v160zM319.968 224h-32v-160h32v160zM383.968 416h-31.968v-160h31.968v160zM383.968 224h-31.968v-160h31.968v160zM447.968 416h-32v-160h32v160zM447.968 224h-32v-160h32v160zM512 416h-32v-160h32v160zM512 224h-32v-160h32v160zM576 416h-32v-160h32v160zM576 224h-32v-160h32v160zM640 416h-32v-160h32v160zM640 224h-32v-160h32v160zM704 416h-32v-160h32v160zM704 224h-32v-160h32v160z" />
|
16 |
+
<glyph unicode="" glyph-name="basket3" horiz-adv-x="1344" d="M1264 512h-1184c-4.928 0-9.6-2.272-12.64-6.144s-4.096-8.928-2.912-13.728l128.192-512.544c3.072-10.784 12.512-43.584 47.36-43.584h864c34.976 0 44.32 32.832 47.52 44.128l128 512c1.184 4.768 0.128 9.856-2.912 13.728-3.008 3.872-7.68 6.144-12.608 6.144zM1120.64-11.616c-5.824-20.384-11.84-20.384-16.64-20.384h-864c-4.768 0-10.752 0-16.48 19.872l-123.008 492.128h1143.008l-122.88-491.616zM592 64c8.832 0 16 7.168 16 16v288c0 8.832-7.168 16-16 16s-16-7.168-16-16v-288c0-8.832 7.168-16 16-16zM367.968 64c0.608 0 1.184 0.032 1.824 0.096 8.768 0.992 15.104 8.896 14.112 17.664l-32 288c-0.96 8.8-8.64 15.008-17.696 14.144-8.768-0.992-15.104-8.896-14.112-17.664l32-288c0.896-8.192 7.84-14.24 15.872-14.24zM784 64c8.832 0 16 7.168 16 16v288c0 8.832-7.168 16-16 16s-16-7.168-16-16v-288c0-8.832 7.168-16 16-16zM974.208 64.096c0.64-0.064 1.216-0.096 1.824-0.096 8.032 0 14.976 6.048 15.872 14.24l32 288c0.96 8.768-5.344 16.672-14.112 17.664-9.184 0.896-16.704-5.344-17.696-14.144l-32-288c-0.96-8.768 5.344-16.672 14.112-17.664zM1104 576c3.712 0 7.424 1.28 10.464 3.904 6.688 5.792 7.392 15.872 1.632 22.56l-304 352c-5.792 6.72-15.872 7.392-22.56 1.664-6.688-5.792-7.392-15.872-1.632-22.56l304-352c3.168-3.68 7.616-5.568 12.096-5.568zM570.112 956.384c-6.816 5.536-16.896 4.608-22.496-2.272l-288-352c-5.6-6.816-4.608-16.896 2.24-22.528 2.976-2.4 6.592-3.584 10.144-3.584 4.64 0 9.216 1.984 12.384 5.888l288 352c5.6 6.816 4.576 16.896-2.272 22.496zM1328 640h-128c-8.832 0-16-7.168-16-16s7.168-16 16-16h128c8.832 0 16 7.168 16 16s-7.168 16-16 16zM432 608h512c8.832 0 16 7.168 16 16s-7.168 16-16 16h-512c-8.832 0-16-7.168-16-16s7.168-16 16-16zM16 608h160c8.832 0 16 7.168 16 16s-7.168 16-16 16h-160c-8.832 0-16-7.168-16-16s7.168-16 16-16z" />
|
17 |
+
<glyph unicode="" glyph-name="trash1" horiz-adv-x="805" d="M292.571 530.286v-329.143c0-10.286-8-18.286-18.286-18.286h-36.571c-10.286 0-18.286 8-18.286 18.286v329.143c0 10.286 8 18.286 18.286 18.286h36.571c10.286 0 18.286-8 18.286-18.286zM438.857 530.286v-329.143c0-10.286-8-18.286-18.286-18.286h-36.571c-10.286 0-18.286 8-18.286 18.286v329.143c0 10.286 8 18.286 18.286 18.286h36.571c10.286 0 18.286-8 18.286-18.286zM585.143 530.286v-329.143c0-10.286-8-18.286-18.286-18.286h-36.571c-10.286 0-18.286 8-18.286 18.286v329.143c0 10.286 8 18.286 18.286 18.286h36.571c10.286 0 18.286-8 18.286-18.286zM658.286 116.571v541.714h-512v-541.714c0-27.429 15.429-43.429 18.286-43.429h475.429c2.857 0 18.286 16 18.286 43.429zM274.286 731.428h256l-27.429 66.857c-1.714 2.286-6.857 5.714-9.714 6.286h-181.143c-3.429-0.571-8-4-9.714-6.286zM804.571 713.143v-36.571c0-10.286-8-18.286-18.286-18.286h-54.857v-541.714c0-62.857-41.143-116.571-91.429-116.571h-475.429c-50.286 0-91.429 51.429-91.429 114.286v544h-54.857c-10.286 0-18.286 8-18.286 18.286v36.571c0 10.286 8 18.286 18.286 18.286h176.571l40 95.429c11.429 28 45.714 50.857 76 50.857h182.857c30.286 0 64.571-22.857 76-50.857l40-95.429h176.571c10.286 0 18.286-8 18.286-18.286z" />
|
18 |
+
<glyph unicode="" glyph-name="trash" d="M896 725.334h-170.667v42.667c0 72.533-55.467 128-128 128h-170.667c-72.533 0-128-55.467-128-128v-42.667h-170.667c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h42.667v-554.667c0-72.533 55.467-128 128-128h426.667c72.533 0 128 55.467 128 128v554.667h42.667c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667zM384 768c0 25.6 17.067 42.667 42.667 42.667h170.667c25.6 0 42.667-17.067 42.667-42.667v-42.667h-256v42.667zM768 85.334c0-25.6-17.067-42.667-42.667-42.667h-426.667c-25.6 0-42.667 17.067-42.667 42.667v554.667h512v-554.667z" />
|
19 |
+
<glyph unicode="" glyph-name="cross" d="M734.618 212.531c-24.013-24.013-62.925-24.013-86.886 0l-135.731 155.136-135.731-155.085c-24.013-24.013-62.925-24.013-86.886 0-24.013 24.013-24.013 62.925 0 86.886l141.21 161.28-141.261 161.382c-24.013 24.013-24.013 62.874 0 86.886s62.874 24.013 86.886 0l135.782-155.187 135.731 155.187c24.013 24.013 62.874 24.013 86.886 0s24.013-62.925 0-86.886l-141.21-161.382 141.21-161.28c24.013-24.013 24.013-62.925 0-86.938z" />
|
20 |
+
<glyph unicode="" glyph-name="check_circle" d="M426 212.667l384 384-60 62-324-324-152 152-60-60zM512 852.667c236 0 426-190 426-426s-190-426-426-426-426 190-426 426 190 426 426 426z" />
|
21 |
+
<glyph unicode="" glyph-name="pencil" d="M864 960c88.364 0 160-71.634 160-160 0-36.020-11.91-69.258-32-96l-64-64-224 224 64 64c26.742 20.090 59.978 32 96 32zM64 224l-64-288 288 64 592 592-224 224-592-592zM715.578 596.422l-448-448-55.156 55.156 448 448 55.156-55.156z" />
|
22 |
+
<glyph unicode="" glyph-name="bag1" d="M921.6 74.837l-58.634 660.26c-1.256 14.658-13.611 25.757-28.061 25.757h-120.618c-1.675 110.148-91.72 199.146-202.287 199.146s-200.612-88.998-202.287-199.146h-120.618c-14.658 0-26.804-11.099-28.061-25.757l-58.634-660.26c0-0.838-0.209-1.675-0.209-2.513 0-75.177 68.895-136.324 153.705-136.324h512.209c84.81 0 153.705 61.147 153.705 136.324 0 0.838 0 1.675-0.209 2.513zM512 903.46c79.365 0 144.072-63.66 145.747-142.606h-291.494c1.675 78.946 66.382 142.606 145.747 142.606zM768.105-7.46h-512.209c-53.189 0-96.327 35.18-97.165 78.528l56.121 633.037h94.652v-85.857c0-15.706 12.564-28.27 28.27-28.27s28.27 12.564 28.27 28.27v85.857h291.704v-85.857c0-15.706 12.564-28.27 28.27-28.27s28.27 12.564 28.27 28.27v85.857h94.652l56.33-633.037c-0.838-43.347-44.185-78.528-97.165-78.528z" />
|
23 |
+
<glyph unicode="" glyph-name="arrow-thin-right" d="M828.006 512l-310.835 310.835 72.397 72.397 434.432-434.432-434.432-434.432-72.397 72.397 310.835 310.835h-828.006v102.4z" />
|
24 |
+
<glyph unicode="" glyph-name="shopping-bag1" d="M810.667 725.334h-597.333l64 85.333h469.333zM929.877 708.608l-127.744 170.325c-8.363 11.136-21.077 17.024-34.133 17.067h-512c-13.909 0-26.283-6.656-34.133-17.067l-127.744-170.325c-1.835-2.389-3.456-4.992-4.736-7.765-2.773-5.845-4.096-12.075-4.053-18.176v-597.333c0-35.328 14.379-67.413 37.504-90.496s55.168-37.504 90.496-37.504h597.333c35.328 0 67.413 14.379 90.496 37.504s37.504 55.168 37.504 90.496v597.333c0 9.344-3.029 18.005-8.064 24.96-0.171 0.213-0.299 0.427-0.469 0.64zM170.667 640h682.667v-554.667c0-11.776-4.736-22.4-12.501-30.165s-18.389-12.501-30.165-12.501h-597.333c-11.776 0-22.4 4.736-30.165 12.501s-12.501 18.389-12.501 30.165zM640 512c0-35.371-14.293-67.285-37.504-90.496s-55.125-37.504-90.496-37.504-67.285 14.293-90.496 37.504-37.504 55.125-37.504 90.496c0 23.552-19.115 42.667-42.667 42.667s-42.667-19.115-42.667-42.667c0-58.88 23.936-112.299 62.464-150.869s91.989-62.464 150.869-62.464 112.299 23.936 150.869 62.464 62.464 91.989 62.464 150.869c0 23.552-19.115 42.667-42.667 42.667s-42.667-19.115-42.667-42.667z" />
|
25 |
+
<glyph unicode="" glyph-name="shopping-cart" d="M469.333 42.667c0 23.552-9.6 44.928-25.003 60.331s-36.779 25.003-60.331 25.003-44.928-9.6-60.331-25.003-25.003-36.779-25.003-60.331 9.6-44.928 25.003-60.331 36.779-25.003 60.331-25.003 44.928 9.6 60.331 25.003 25.003 36.779 25.003 60.331zM938.667 42.667c0 23.552-9.6 44.928-25.003 60.331s-36.779 25.003-60.331 25.003-44.928-9.6-60.331-25.003-25.003-36.779-25.003-60.331 9.6-44.928 25.003-60.331 36.779-25.003 60.331-25.003 44.928 9.6 60.331 25.003 25.003 36.779 25.003 60.331zM308.096 640h621.653l-58.496-306.816c-1.963-9.728-7.083-18.133-14.165-24.235-7.68-6.656-17.621-10.496-29.355-10.283h-415.317c-9.899-0.128-19.243 3.029-26.709 8.661-8.107 6.101-14.037 14.976-16.171 25.728zM42.667 853.334h135.68l36.181-180.864c4.608-18.645 21.419-32.469 41.472-32.469h52.096l-17.067 85.333h-35.029c-23.552 0-42.667-19.115-42.667-42.667 0-2.261 0.171-4.48 0.512-6.613 0.171-1.195 0.427-2.432 0.725-3.584l71.296-356.139c6.357-32.043 24.32-59.008 48.64-77.269 22.229-16.725 49.92-26.155 79.104-25.728h414.123c31.915-0.64 62.080 11.136 85.12 31.019 21.077 18.176 36.181 43.221 42.027 71.808l68.352 358.485c4.395 23.168-10.752 45.483-33.92 49.92-2.773 0.555-5.547 0.811-7.979 0.768h-690.347l-35.84 179.029c-4.011 19.712-21.205 34.304-41.813 34.304h-170.667c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667z" />
|
26 |
+
<glyph unicode="" glyph-name="bag2" d="M956.108-30.342l-77.828 741.147c-1.633 15.516-14.711 27.297-30.312 27.297h-146.281v33.351c0 103.961-84.586 188.547-188.547 188.547-103.969 0-188.554-84.586-188.554-188.547v-33.351h-146.281c-15.602 0-28.68-11.781-30.312-27.297l-77.828-741.147c-0.898-8.586 1.891-17.156 7.664-23.578 5.781-6.414 14.016-10.078 22.648-10.078h825.311c8.641 0 16.875 3.664 22.648 10.078 5.789 6.422 8.57 14.992 7.672 23.578zM385.539 771.453c0 70.351 57.242 127.593 127.601 127.593 70.351 0 127.593-57.242 127.593-127.593v-33.351h-255.195zM134.321-3.045l71.43 680.194h118.836v-67.164c0-16.828 13.648-30.477 30.477-30.477s30.477 13.648 30.477 30.477v67.164h255.195v-67.164c0-16.828 13.648-30.477 30.477-30.477s30.477 13.648 30.477 30.477v67.164h118.836l71.43-680.194z" />
|
27 |
+
<glyph unicode="" glyph-name="cart1" d="M326.652 163.515c-59.043 0-106.904-47.863-106.904-106.904 0-59.043 47.863-106.904 106.904-106.904 59.043 0 106.904 47.863 106.904 106.904 0.002 59.040-47.861 106.904-106.904 106.904zM326.652-2.782c-32.801 0-59.39 26.59-59.39 59.39s26.59 59.39 59.39 59.39c32.801 0 59.39-26.59 59.39-59.39 0.002-32.801-26.59-59.39-59.39-59.39zM778.028 163.515c-59.043 0-106.904-47.863-106.904-106.904 0-59.043 47.863-106.904 106.904-106.904s106.904 47.863 106.904 106.904c0 59.040-47.861 106.904-106.904 106.904zM778.028-2.782c-32.801 0-59.39 26.59-59.39 59.39s26.59 59.39 59.39 59.39 59.39-26.59 59.39-59.39c0.002-32.801-26.59-59.39-59.39-59.39zM1019.157 787.124c-4.947 5.404-11.716 8.787-19.005 9.504l-773.276 10.69-21.381 65.331c-15.062 43.673-55.96 73.157-102.154 73.646h-79.584c-13.121 0-23.757-10.636-23.757-23.757s10.636-23.757 23.757-23.757h79.584c25.83-0.571 48.575-17.156 57.017-41.575l150.854-454.939-11.877-27.319c-13.248-34.163-9.269-72.614 10.69-103.341 19.769-30.18 53.027-48.805 89.088-49.889h462.066c13.121 0 23.757 10.636 23.757 23.757s-10.636 23.757-23.757 23.757h-462.069c-20.364 0.509-39.11 11.222-49.889 28.508-10.659 17.075-12.848 38.11-5.939 57.017l9.504 21.381 500.076 52.265c54.93 6.050 100.115 46.001 112.845 99.778l57.017 238.753c2.569 6.875 1.205 14.608-3.567 20.189zM919.381 538.869c-7.712-34.618-37.103-60.152-72.457-62.955l-494.138-51.076-110.469 334.967 728.139-10.69-51.076-210.245z" />
|
28 |
+
<glyph unicode="" glyph-name="cart2" d="M329.922 297.992h0.047c0.039 0 0.078 0.008 0.117 0.008h543.914c13.391 0 25.164 8.883 28.844 21.758l120 420c2.586 9.055 0.773 18.789-4.891 26.305-5.672 7.516-14.539 11.937-23.953 11.937h-733.265l-21.445 96.508c-3.055 13.727-15.227 23.492-29.289 23.492h-180c-16.57 0-30-13.43-30-30s13.43-30 30-30h155.937c3.797-17.102 102.625-461.836 108.312-487.422-31.883-13.859-54.25-45.648-54.25-82.578 0-49.625 40.375-90 90-90h544c16.57 0 30 13.43 30 30s-13.43 30-30 30h-544c-16.539 0-30 13.461-30 30 0 16.516 13.414 29.953 29.922 29.992zM954.226 718l-102.859-360h-497.304l-80 360zM300 88c0-49.625 40.375-90 90-90s90 40.375 90 90-40.375 90-90 90-90-40.375-90-90zM390 118c16.539 0 30-13.461 30-30s-13.461-30-30-30-30 13.461-30 30 13.461 30 30 30zM724 88c0-49.625 40.375-90 90-90s90 40.375 90 90-40.375 90-90 90-90-40.375-90-90zM814 118c16.539 0 30-13.461 30-30s-13.461-30-30-30-30 13.461-30 30 13.461 30 30 30z" />
|
29 |
+
<glyph unicode="" glyph-name="del4" d="M768 512v-128h-512v128h512z" />
|
30 |
+
<glyph unicode="" glyph-name="trash3" horiz-adv-x="805" d="M292.571 530.286v-329.143c0-10.286-8-18.286-18.286-18.286h-36.571c-10.286 0-18.286 8-18.286 18.286v329.143c0 10.286 8 18.286 18.286 18.286h36.571c10.286 0 18.286-8 18.286-18.286zM438.857 530.286v-329.143c0-10.286-8-18.286-18.286-18.286h-36.571c-10.286 0-18.286 8-18.286 18.286v329.143c0 10.286 8 18.286 18.286 18.286h36.571c10.286 0 18.286-8 18.286-18.286zM585.143 530.286v-329.143c0-10.286-8-18.286-18.286-18.286h-36.571c-10.286 0-18.286 8-18.286 18.286v329.143c0 10.286 8 18.286 18.286 18.286h36.571c10.286 0 18.286-8 18.286-18.286zM658.286 116.571v541.714h-512v-541.714c0-27.429 15.429-43.429 18.286-43.429h475.429c2.857 0 18.286 16 18.286 43.429zM274.286 731.428h256l-27.429 66.857c-1.714 2.286-6.857 5.714-9.714 6.286h-181.143c-3.429-0.571-8-4-9.714-6.286zM804.571 713.143v-36.571c0-10.286-8-18.286-18.286-18.286h-54.857v-541.714c0-62.857-41.143-116.571-91.429-116.571h-475.429c-50.286 0-91.429 51.429-91.429 114.286v544h-54.857c-10.286 0-18.286 8-18.286 18.286v36.571c0 10.286 8 18.286 18.286 18.286h176.571l40 95.429c11.429 28 45.714 50.857 76 50.857h182.857c30.286 0 64.571-22.857 76-50.857l40-95.429h176.571c10.286 0 18.286-8 18.286-18.286z" />
|
31 |
+
<glyph unicode="" glyph-name="del1" d="M512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM622 596.667l60-60-110-110 110-110-60-60-110 110-110-110-60 60 110 110-110 110 60 60 110-110z" />
|
32 |
+
<glyph unicode="" glyph-name="del2" d="M512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM298 468.667h428v-84h-428v84z" />
|
33 |
+
<glyph unicode="" glyph-name="del3" d="M810 384.667h-596v84h596v-84z" />
|
34 |
+
<glyph unicode="" glyph-name="shopping-bag" d="M1004 146.286l20-178.857c1.143-10.286-2.286-20.571-9.143-28.571-6.857-7.429-17.143-12-27.429-12h-950.857c-10.286 0-20.571 4.571-27.429 12-6.857 8-10.286 18.286-9.143 28.571l20 178.857h984zM950.857 625.714l49.143-442.857h-976l49.143 442.857c2.286 18.286 17.714 32.571 36.571 32.571h146.286v-73.143c0-40.571 32.571-73.143 73.143-73.143s73.143 32.571 73.143 73.143v73.143h219.429v-73.143c0-40.571 32.571-73.143 73.143-73.143s73.143 32.571 73.143 73.143v73.143h146.286c18.857 0 34.286-14.286 36.571-32.571zM731.429 731.428v-146.286c0-20-16.571-36.571-36.571-36.571s-36.571 16.571-36.571 36.571v146.286c0 80.571-65.714 146.286-146.286 146.286s-146.286-65.714-146.286-146.286v-146.286c0-20-16.571-36.571-36.571-36.571s-36.571 16.571-36.571 36.571v146.286c0 121.143 98.286 219.429 219.429 219.429s219.429-98.286 219.429-219.429z" />
|
35 |
+
<glyph unicode="" glyph-name="chevron-thin-left" d="M711.219 80.998c13.722-13.926 13.722-36.301 0-50.125s-35.891-13.875-49.613 0l-400.896 404.89c-13.722 13.824-13.722 36.198 0 50.125l400.896 404.89c13.722 13.824 35.891 13.824 49.613 0 13.722-13.875 13.722-36.301 0-50.125l-365.619-379.853 365.619-379.802z" />
|
36 |
+
<glyph unicode="" glyph-name="chevron-left" d="M637.542 741.581c22.835-22.323 24.627-53.402 0-80.691l-191.846-200.090 191.846-200.090c24.627-27.29 22.835-58.419 0-80.589-22.784-22.323-61.286-20.89-82.688 0-21.402 20.787-230.502 240.384-230.502 240.384-11.418 11.11-17.152 25.702-17.152 40.294s5.734 29.184 17.152 40.397c0 0 209.101 219.494 230.502 240.384 21.402 20.941 59.904 22.323 82.688 0z" />
|
37 |
+
<glyph unicode="" glyph-name="arrow-thin-left" d="M195.994 512l310.835 310.835-72.397 72.397-434.432-434.432 434.432-434.432 72.397 72.397-310.835 310.835h828.006v102.4h-828.006z" />
|
38 |
+
<glyph unicode="" glyph-name="arrow-left" d="M195.994 512l310.835 310.835-72.397 72.397-434.432-434.432 434.432-434.432 72.397 72.397-310.835 310.835h828.006v102.4h-828.006z" />
|
39 |
+
<glyph unicode="" glyph-name="coupon-1" d="M370.17 730.1c2.81-15.008 17.698-26.845 35.261-23.561 17.052 3.56 26.751 19.911 23.561 35.281-3.746 17.872-21.399 27.829-38.123 22.841-14.938-4.458-23.775-19.885-20.699-34.561zM1016.478 311.076c-163.242 475.185-152.012 442.628-152.71 444.246-16.992 39.327-49.977 69.9-90.5 83.882-5.802 2.002-334.383 78.864-343.879 82.152-29.123 10.086-69.584 4.432-97.989-21.693l-281.586-259.105c-31.657-29.117-49.813-70.566-49.813-113.723v-458.833c0-54.071 43.755-98.063 97.539-98.063h602.426c53.783 0 97.539 43.991 97.539 98.063v44.349l167.915 71.862c48.819 21.127 71.53 77.826 51.059 126.861zM699.965 29.943h-602.426c-20.699 0-37.537 17.074-37.537 38.061v458.833c0 26.419 11.092 51.775 30.435 69.566 241.247 221.982 92.131 83.522 282.546 259.125 9.93 9.152 23.641 12.828 37.239 8.728 12.154-3.63-9.292 13.838 296.85-267.857 19.339-17.788 30.431-43.143 30.431-69.562v-458.833c-0.002-20.987-16.84-38.061-37.537-38.061zM941.7 239.33l-144.198-61.712v349.218c0 43.157-18.156 84.606-49.809 113.719l-209.702 192.959 217.012-51.493c23.689-8.574 42.997-26.523 53.253-49.515 162.932-474.279 151.942-442.446 152.656-444.088 8.192-18.937-0.476-40.979-19.213-49.087zM483.931 555.395c-15.274 6.412-32.861-0.78-39.273-16.056l-146.050-348.090c-8.332-19.859 6.386-41.617 27.651-41.617 11.722 0 22.859 6.914 27.679 18.401l146.050 348.090c6.41 15.28-0.778 32.863-16.056 39.273zM343.327 468.947c0 57.902-42.407 105.009-94.535 105.009s-94.533-47.107-94.533-105.009 42.407-105.009 94.535-105.009 94.533 47.107 94.533 105.009zM248.795 423.939c-18.719 0-34.533 20.611-34.533 45.007s15.812 45.007 34.533 45.007 34.533-20.611 34.533-45.007c-0.002-24.397-15.814-45.007-34.533-45.007zM551.517 335.961c-52.127 0-94.535-47.107-94.535-105.009s42.407-105.009 94.535-105.009 94.535 47.107 94.535 105.009-42.409 105.009-94.535 105.009zM551.517 185.945c-18.719 0-34.533 20.611-34.533 45.007s15.812 45.007 34.533 45.007 34.533-20.611 34.533-45.007-15.814-45.007-34.533-45.007z" />
|
40 |
+
<glyph unicode="" glyph-name="coupon-2" d="M307.2 396.8h34.133v-34.133h-34.133v34.133zM307.2 328.533h34.133v-34.133h-34.133v34.133zM307.2 260.267h34.133v-34.133h-34.133v34.133zM307.2 465.067h34.133v-34.133h-34.133v34.133zM307.2 533.333h34.133v-34.133h-34.133v34.133zM307.2 601.6h34.133v-34.133h-34.133v34.133zM307.2 669.867h34.133v-34.133h-34.133v34.133zM68.267 669.867h34.133v-34.133h-34.133v34.133zM921.6 669.867h34.133v-34.133h-34.133v34.133zM921.6 260.267h34.133v-34.133h-34.133v34.133zM68.267 260.267h34.133v-34.133h-34.133v34.133zM1006.933 533.333c9.425 0 17.067 7.642 17.067 17.067v170.667c0 9.425-7.642 17.067-17.067 17.067h-989.867c-9.425 0-17.067-7.642-17.067-17.067v-170.667c0-9.425 7.642-17.067 17.067-17.067 47.127 0 85.333-38.206 85.333-85.333s-38.206-85.333-85.333-85.333c-9.425 0-17.067-7.642-17.067-17.067v-170.667c0-9.425 7.642-17.067 17.067-17.067h989.867c9.425 0 17.067 7.642 17.067 17.067v170.667c0 9.425-7.642 17.067-17.067 17.067-47.127 0-85.333 38.206-85.333 85.333s38.206 85.333 85.333 85.333zM888.585 431.027c7.535-52.501 48.783-93.747 101.282-101.282v-137.745h-955.733v137.745c65.31 9.374 110.656 69.916 101.282 135.228-7.535 52.499-48.781 93.747-101.282 101.282v137.745h955.733v-137.745c-65.31-9.374-110.656-69.916-101.282-135.228zM512 618.667c-37.702 0-68.267-30.564-68.267-68.267s30.564-68.267 68.267-68.267c37.702 0 68.267 30.564 68.267 68.267s-30.564 68.267-68.267 68.267zM512 516.267c-18.852 0-34.133 15.281-34.133 34.133s15.281 34.133 34.133 34.133 34.133-15.281 34.133-34.133-15.281-34.133-34.133-34.133zM716.8 413.867c-37.702 0-68.267-30.564-68.267-68.267s30.564-68.267 68.267-68.267c37.702 0 68.267 30.564 68.267 68.267s-30.564 68.267-68.267 68.267zM716.8 311.467c-18.852 0-34.133 15.281-34.133 34.133s15.281 34.133 34.133 34.133 34.133-15.281 34.133-34.133-15.281-34.133-34.133-34.133zM465.8 323.575l273.061 273.061 24.136-24.136-273.061-273.061-24.136 24.136z" />
|
41 |
+
<glyph unicode="" glyph-name="coupon-3" d="M574 658c-49.626 0-90-40.374-90-90s40.374-90 90-90 90 40.374 90 90-40.374 90-90 90zM574 538c-16.542 0-30 13.458-30 30s13.458 30 30 30 30-13.458 30-30-13.458-30-30-30zM814 418c-49.626 0-90-40.374-90-90s40.374-90 90-90 90 40.374 90 90-40.374 90-90 90zM814 298c-16.542 0-30 13.458-30 30s13.458 30 30 30 30-13.458 30-30-13.458-30-30-30zM830.64 652.962c-13.782 9.188-32.412 5.464-41.602-8.322l-240-360c-9.19-13.784-5.464-32.41 8.322-41.602 13.784-9.188 32.41-5.466 41.602 8.322l240 360c9.19 13.786 5.464 32.412-8.322 41.602zM994 778h-964c-16.568 0-30-13.432-30-30v-180c0-16.568 13.432-30 30-30 49.626 0 90-40.374 90-90s-40.374-90-90-90c-16.568 0-30-13.432-30-30v-180c0-16.568 13.432-30 30-30h964c16.568 0 30 13.432 30 30v600c0 16.568-13.432 30-30 30zM964 178h-664v30c0 16.568-13.432 30-30 30s-30-13.432-30-30v-30h-180v123.012c68.382 13.938 120 74.55 120 146.988s-51.618 133.048-120 146.986v123.014h182.5v-30c0-16.568 13.432-30 30-30s30 13.432 30 30v30h661.5v-540zM270 418c-16.568 0-30-13.432-30-30v-60c0-16.568 13.432-30 30-30s30 13.432 30 30v60c0 16.568-13.432 30-30 30zM270 598c-16.568 0-30-13.432-30-30v-60c0-16.568 13.432-30 30-30s30 13.432 30 30v60c0 16.568-13.432 30-30 30z" />
|
42 |
+
<glyph unicode="" glyph-name="coupon-5" d="M934.54 601.506c33.419 74.837 19.469 165.689-41.939 227.097s-152.258 75.354-227.097 41.939l-89.458 89.458-576.046-576.046 89.46-89.46c-33.419-74.837-19.469-165.689 41.939-227.097s152.258-75.354 227.097-41.939l89.46-89.46 576.046 576.044-89.462 89.464zM394.224 394.284c-27.899-27.899-73.134-27.899-101.033 0s-27.899 73.134 0 101.033c27.899 27.899 73.134 27.899 101.033 0 27.901-27.899 27.901-73.134 0-101.033zM504.166 206.659l-50.74 475.599 66.405 7.085 50.74-475.601-66.405-7.083zM731.212 400.28c-27.899-27.899-73.134-27.899-101.033 0s-27.899 73.134 0 101.033c27.899 27.899 73.134 27.899 101.033 0s27.899-73.134 0-101.033z" />
|
43 |
+
<glyph unicode="" glyph-name="coupon-6" d="M0 736.38v-193.244l33.104 1.86c2.074 0.118 3.902 0.174 5.59 0.174 53.58 0 97.17-43.588 97.17-97.17s-43.588-97.17-97.17-97.17c-1.658 0-3.494 0.056-5.618 0.176l-33.076 1.832v-193.216h1024v576.758h-1024zM372.184 258.4h-62.694v42.574h62.694v-42.574zM372.184 343.548h-62.694v42.574h62.694v-42.574zM372.184 428.694h-62.694v42.574h62.694v-42.574zM372.184 513.842h-62.694v42.574h62.694v-42.574zM372.184 598.988h-62.694v42.574h62.694v-42.574zM820.054 262.182l-125.15 65.794-125.148-65.796 23.904 139.358-101.248 98.69 139.92 20.332 62.572 126.788 62.574-126.788 139.918-20.332-101.246-98.69 23.904-139.356z" />
|
44 |
+
<glyph unicode="" glyph-name="coupon" d="M768 320c0-17.673-14.327-32-32-32s-32 14.327-32 32c0 17.673 14.327 32 32 32s32-14.327 32-32zM576 576c0-17.673-14.327-32-32-32s-32 14.327-32 32c0 17.673 14.327 32 32 32s32-14.327 32-32zM960 800h-608c-8.512 0-16.64-3.392-22.656-9.344l-41.344-41.408-41.344 41.408c-6.016 5.952-14.144 9.344-22.656 9.344h-160c-35.264 0-64-28.736-64-64v-576c0-35.328 28.736-64 64-64h160c8.512 0 16.64 3.392 22.656 9.344l41.344 41.408 41.344-41.344c6.016-6.016 14.144-9.408 22.656-9.408h608c35.328 0 64 28.672 64 64v576c0 35.264-28.672 64-64 64zM320 224h-64v64h64v-64zM320 352h-64v64h64v-64zM320 480h-64v64h64v-64zM320 608h-64v64h64v-64zM544 672c52.928 0 96-43.072 96-96s-43.072-96-96-96-96 43.072-96 96 43.072 96 96 96zM480 224c-7.232 0-14.464 2.432-20.48 7.424-13.568 11.328-15.424 31.488-4.096 45.056l320 384c11.392 13.632 31.552 15.296 45.056 4.096 13.568-11.328 15.36-31.488 4.032-45.12l-320-384c-6.272-7.488-15.36-11.456-24.512-11.456zM736 224c-52.928 0-96 43.072-96 96s43.072 96 96 96 96-43.072 96-96-43.072-96-96-96z" />
|
45 |
+
<glyph unicode="" glyph-name="coupon-4" d="M894.294 558.934h-78.506c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h78.506c9.42 0 17.066 7.646 17.066 17.066s-7.646 17.066-17.066 17.066zM737.28 558.934h-78.506c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h78.506c9.42 0 17.066 7.646 17.066 17.066s-7.646 17.066-17.066 17.066zM1006.934 558.934h-34.134c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h17.066v-17.066c0-9.42 7.646-17.066 17.066-17.066s17.066 7.646 17.066 17.066v34.134c0.002 9.418-7.644 17.064-17.064 17.064zM1006.934 341.948c-9.42 0-17.066-7.646-17.066-17.066v-60.946c0-9.42 7.646-17.066 17.066-17.066s17.066 7.646 17.066 17.066v60.946c0 9.42-7.646 17.066-17.066 17.066zM1006.934 463.854c-9.42 0-17.066-7.646-17.066-17.066v-60.946c0-9.42 7.646-17.066 17.066-17.066s17.066 7.646 17.066 17.066v60.946c0 9.422-7.646 17.066-17.066 17.066zM1006.934 220.040c-9.42 0-17.066-7.646-17.066-17.066v-60.946c0-9.42 7.646-17.066 17.066-17.066s17.066 7.646 17.066 17.066v60.946c0 9.42-7.646 17.066-17.066 17.066zM1006.934 98.134c-9.42 0-17.066-7.646-17.066-17.066v-17.068h-17.068c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h34.134c9.42 0 17.066 7.646 17.066 17.066v34.134c0 9.42-7.646 17.066-17.066 17.066zM334.762 64h-70.894c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h70.894c9.42 0 17.066 7.646 17.066 17.066s-7.644 17.066-17.066 17.066zM192.99 64h-70.896c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h70.894c9.42 0 17.066 7.646 17.066 17.066s-7.644 17.066-17.064 17.066zM476.552 64h-70.896c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h70.896c9.42 0 17.066 7.646 17.066 17.066s-7.628 17.066-17.066 17.066zM618.342 64h-70.894c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h70.894c9.42 0 17.066 7.646 17.066 17.066s-7.644 17.066-17.066 17.066zM901.906 64h-70.894c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h70.894c9.42 0 17.066 7.646 17.066 17.066s-7.646 17.066-17.066 17.066zM760.132 64h-70.894c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h70.894c9.42 0 17.066 7.646 17.066 17.066s-7.644 17.066-17.066 17.066zM51.2 64h-17.066v17.066c0 9.42-7.646 17.066-17.066 17.066s-17.068-7.644-17.068-17.066v-34.134c0-9.42 7.646-17.066 17.066-17.066h34.134c9.42 0 17.066 7.646 17.066 17.066s-7.646 17.068-17.066 17.068zM17.066 341.93c-9.42 0-17.066-7.646-17.066-17.066v-60.946c0-9.42 7.646-17.066 17.066-17.066s17.066 7.646 17.066 17.066v60.946c0.002 9.42-7.644 17.066-17.066 17.066zM17.066 463.838c-9.42 0-17.066-7.646-17.066-17.066v-60.946c0-9.42 7.646-17.066 17.066-17.066s17.066 7.646 17.066 17.066v60.946c0.002 9.42-7.644 17.066-17.066 17.066zM17.066 220.024c-9.42 0-17.066-7.646-17.066-17.066v-60.946c0-9.42 7.646-17.066 17.066-17.066s17.066 7.646 17.066 17.066v60.946c0.002 9.42-7.644 17.066-17.066 17.066zM51.2 558.934h-34.134c-9.42 0-17.066-7.646-17.066-17.066v-34.134c0-9.42 7.646-17.066 17.066-17.066s17.066 7.646 17.066 17.066v17.066h17.068c9.42 0 17.066 7.646 17.066 17.066s-7.646 17.068-17.066 17.068zM199.116 558.934h-73.966c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h73.966c9.42 0 17.066 7.646 17.066 17.066s-7.644 17.066-17.066 17.066zM880.316 316.826l-293.222 209.442c6.024 2.646 10.24 8.618 10.24 15.598 0 9.42-7.646 17.066-17.066 17.066h-34.134c-1.314 0-2.492-0.46-3.72-0.75l-2.15 1.536 340.020 241.306c6.058 4.3 8.636 12.032 6.382 19.098s-8.842 11.878-16.266 11.878h-153.6c-3.516 0-6.946-1.076-9.83-3.106l-280.064-197.086-74.12 59.29c3.602 12.22 5.614 25.122 5.614 38.502 0 75.282-61.252 136.534-136.534 136.534s-136.534-61.252-136.534-136.534c0-75.282 61.252-136.534 136.534-136.534 8.67 0 17.118 0.904 25.326 2.458l0.018-0.018 61.44-36.864c-0.512 0.034-0.938 0.29-1.45 0.29h-34.134c-9.42 0-17.066-7.646-17.066-17.066s7.646-17.066 17.066-17.066h1.776l-27.716-19.508c-8.192 1.536-16.622 2.44-25.258 2.44-75.282 0-136.534-61.252-136.534-136.534s61.252-136.534 136.534-136.534c75.282 0 136.534 61.252 136.534 136.534 0 18.654-3.788 36.438-10.582 52.668 1.16 0.478 2.338 0.938 3.396 1.69l80.93 57.43 274.824-193.996c2.868-2.032 6.298-3.124 9.83-3.124h153.6c7.424 0 13.994 4.796 16.248 11.862 2.27 7.066-0.29 14.78-6.332 19.098zM221.866 661.334c-37.65 0-68.266 30.618-68.266 68.266 0 37.65 30.618 68.266 68.266 68.266s68.266-30.618 68.266-68.266c0.002-37.65-30.616-68.266-68.266-68.266zM221.866 302.934c-37.65 0-68.266 30.618-68.266 68.266 0 37.65 30.618 68.266 68.266 68.266s68.266-30.618 68.266-68.266c0.002-37.65-30.616-68.266-68.266-68.266zM426.838 541.866c-9.42 0-17.152 7.646-17.152 17.066s7.56 17.066 16.982 17.066h0.17c9.42 0 17.066-7.646 17.066-17.066s-7.646-17.066-17.066-17.066z" />
|
46 |
+
<glyph unicode="" glyph-name="discout" d="M993.984 448c0-68-39.264-125.664-97.6-148.544v-74.56c0-17.6-14.272-31.872-31.84-31.872h-737.056c-17.632 0-31.872 14.272-31.872 31.872v74.56c-58.368 22.88-97.6 80.544-97.6 148.544s39.264 125.664 97.632 148.544v74.56c0 17.632 14.24 31.872 31.872 31.872h737.056c17.568 0 31.84-14.24 31.84-31.872v-74.56c58.336-22.88 97.568-80.544 97.568-148.544zM382.464 448h-127.488v-31.872h127.488v31.872zM533.824 556.672c-8.992 9.888-21.344 14.816-37.024 14.816-15.584 0-27.872-4.928-36.832-14.816-8.992-9.856-13.504-25.024-13.504-45.504 0-20.576 4.512-35.776 13.504-45.664 8.96-9.856 15.392-14.784 31.328-14.784 15.36 0 33.568 4.928 42.56 14.784 8.96 9.888 13.472 25.088 13.472 45.664-0.032 20.48-4.544 35.68-13.504 45.504zM642.24 576.48l-163.52-256.704h32.384l162.72 256.704h-31.584zM693.152 429.216c-8.96 9.856-21.344 14.784-37.024 14.784-15.552 0-27.872-4.928-36.864-14.784-8.96-9.888-13.44-25.024-13.44-45.504 0-20.576 4.48-35.808 13.44-45.664 8.992-9.888 21.44-14.816 37.376-14.816 15.36 0 27.552 4.928 36.544 14.816 8.96 9.856 13.472 25.088 13.472 45.664-0.032 20.48-4.544 35.616-13.504 45.504zM655.84 347.904c-4.608 0-8.192 1.952-10.784 5.792-3.424 5.024-5.152 15.008-5.152 29.952s1.728 24.96 5.152 30.080c2.496 3.744 6.080 5.664 10.784 5.664s8.352-1.92 10.944-5.664c3.328-5.12 4.992-15.168 4.992-30.080s-1.728-24.96-5.152-30.080c-2.496-3.776-6.080-5.664-10.784-5.664zM496.512 475.36c-4.608 0-8.192 1.952-10.784 5.824-3.424 5.024-5.152 15.008-5.152 29.952s1.728 24.96 5.152 30.080c2.496 3.744 6.080 5.632 10.784 5.632s8.32-1.888 10.944-5.632c3.328-5.12 4.992-15.168 4.992-30.080s-1.728-24.96-5.152-30.080c-2.528-3.776-6.112-5.696-10.784-5.696z" />
|
47 |
+
<glyph unicode="" glyph-name="coupon-7" d="M787.83 612.892l-97.338 84.36c50.056 126.462-43.794 262.748-178.492 262.748-134.89 0-228.464-136.502-178.492-262.748l-97.338-84.36c-28.072-24.326-44.17-59.582-44.17-96.728v-484.164c0-52.934 43.066-96 96-96h448c52.934 0 96 43.066 96 96v484.164c0 37.144-16.1 72.4-44.17 96.728zM512 896c80.524 0 141.182-73.772 125.564-152.878l-20.334 17.622c-60.428 52.374-150.138 52.282-210.462 0l-20.332-17.622c-15.596 78.998 44.94 152.878 125.564 152.878zM768 32c0-17.644-14.356-32-32-32h-448c-17.644 0-32 14.356-32 32v484.164c0 18.572 8.050 36.2 22.084 48.364l89.206 77.312c29.11-33.312 69.016-55.716 112.708-63.14v-2.7c0-17.672 14.328-32 32-32 17.674 0 32 14.328 32 32v64c0 17.672-14.326 32-32 32-16.304 0-29.732-12.204-31.718-27.97-24.966 6.418-47.562 20.262-64.626 39.724l33.030 28.626c36.362 31.512 90.338 31.456 126.632 0 33.47-29.008 117.562-101.888 170.598-147.854 14.038-12.164 22.086-29.792 22.086-48.364zM643.646 441.26c-13.948 10.848-34.054 8.336-44.906-5.614l-224-288c-16.454-21.158-1.042-51.648 25.238-51.648 9.536 0 18.974 4.246 25.282 12.356l224 288c10.85 13.95 8.336 34.056-5.614 44.906zM688 160c0-35.346-28.654-64-64-64s-64 28.654-64 64c0 35.346 28.654 64 64 64s64-28.654 64-64zM464 384c0-35.346-28.654-64-64-64s-64 28.654-64 64c0 35.346 28.654 64 64 64s64-28.654 64-64z" />
|
48 |
+
<glyph unicode="" glyph-name="coupon-8" d="M955.91 434.737c-4.12 8.43-4.12 18.098 0 26.526l38.192 78.13c21.264 43.502 4.416 95.351-38.356 118.045l-76.82 40.76c-8.288 4.396-13.97 12.22-15.592 21.458l-15.024 85.657c-8.366 47.692-52.482 79.74-100.415 72.958l-86.105-12.18c-9.294-1.312-18.484 1.676-25.226 8.198l-62.502 60.464c-34.802 33.668-89.321 33.67-124.121 0l-62.504-60.47c-6.744-6.524-15.934-9.506-25.226-8.198l-86.105 12.18c-47.95 6.786-92.049-25.266-100.415-72.958l-15.024-85.653c-1.622-9.24-7.304-17.062-15.59-21.46l-76.82-40.76c-42.772-22.692-59.62-74.546-38.356-118.047l38.19-78.128c4.12-8.43 4.12-18.098 0-26.526l-38.192-78.128c-21.264-43.502-4.416-95.351 38.356-118.045l76.82-40.76c8.288-4.396 13.97-12.22 15.592-21.458l15.024-85.657c7.616-43.416 44.844-73.864 87.629-73.86 4.214 0 8.49 0.296 12.788 0.904l86.105 12.18c9.286 1.318 18.482-1.676 25.226-8.198l62.502-60.464c17.404-16.836 39.728-25.252 62.060-25.25 22.326 0.002 44.664 8.418 62.060 25.25l62.504 60.464c6.744 6.522 15.936 9.502 25.226 8.198l86.105-12.18c47.956-6.784 92.049 25.266 100.415 72.958l15.026 85.653c1.622 9.24 7.304 17.062 15.59 21.46l76.82 40.76c42.772 22.692 59.62 74.546 38.356 118.047l-38.192 78.13zM928.065 290.734l-76.82-40.76c-24.492-12.998-41.29-36.114-46.080-63.426l-15.024-85.655c-2.83-16.136-17.748-26.974-33.974-24.684l-86.105 12.18c-27.46 3.89-54.632-4.948-74.562-24.226l-62.504-60.462c-11.772-11.388-30.218-11.388-41.994 0l-62.502 60.464c-16.844 16.294-38.864 25.124-61.852 25.124-4.212 0-8.458-0.296-12.71-0.898l-86.105-12.18c-16.212-2.292-31.142 8.548-33.974 24.684l-15.026 85.657c-4.792 27.312-21.588 50.43-46.082 63.424l-76.82 40.76c-14.472 7.678-20.172 25.22-12.978 39.938l38.192 78.13c12.176 24.912 12.176 53.484 0 78.396l-38.192 78.13c-7.194 14.718-1.494 32.26 12.978 39.938l76.82 40.76c24.492 12.998 41.29 36.114 46.080 63.426l15.024 85.655c2.832 16.136 17.748 26.976 33.974 24.684l86.105-12.18c27.45-3.886 54.632 4.948 74.562 24.226l62.504 60.464c11.772 11.388 30.218 11.388 41.994 0l62.502-60.464c19.93-19.28 47.108-28.112 74.562-24.226l86.105 12.18c16.214 2.294 31.144-8.548 33.974-24.684l15.024-85.657c4.792-27.312 21.588-50.43 46.082-63.424l76.82-40.76c14.472-7.678 20.172-25.22 12.978-39.938l-38.192-78.128c-12.176-24.91-12.176-53.486 0-78.396l38.192-78.128c7.196-14.722 1.496-32.266-12.976-39.944zM727.768 663.77c-11.53 11.532-30.23 11.532-41.762 0l-389.776-389.778c-11.532-11.532-11.532-30.23 0-41.762 5.766-5.766 13.324-8.65 20.88-8.65s15.116 2.882 20.88 8.65l389.776 389.776c11.536 11.534 11.536 30.23 0.002 41.764zM393.88 713.769c-59.704 0-108.277-48.574-108.277-108.277s48.574-108.277 108.277-108.277 108.277 48.574 108.277 108.277-48.574 108.277-108.277 108.277zM393.88 556.276c-27.138 0-49.216 22.078-49.216 49.218 0 27.138 22.078 49.216 49.216 49.216s49.218-22.078 49.218-49.216c-0.002-27.14-22.080-49.218-49.218-49.218zM630.118 398.783c-59.704 0-108.277-48.574-108.277-108.277s48.574-108.277 108.277-108.277c59.704 0 108.277 48.574 108.277 108.277s-48.574 108.277-108.277 108.277zM630.118 241.29c-27.138 0-49.218 22.078-49.218 49.216s22.078 49.216 49.218 49.216c27.138 0 49.216-22.078 49.216-49.216s-22.078-49.216-49.216-49.216z" />
|
49 |
+
<glyph unicode="" glyph-name="coupon-9" d="M1024 448c0 14.106-6.418 27.122-17.61 35.708l-32.682 25.078 25.078 32.682c8.588 11.19 11.418 25.424 7.768 39.050-3.652 13.626-13.22 24.536-26.252 29.932l-38.058 15.764 15.764 38.058c5.398 13.032 4.45 27.514-2.604 39.73s-19.12 20.278-33.106 22.12l-40.838 5.376 5.376 40.842c1.842 13.984-2.822 27.726-12.796 37.7s-23.718 14.638-37.702 12.798l-40.842-5.376-5.376 40.84c-1.842 13.986-9.904 26.052-22.122 33.106-12.214 7.052-26.696 8-39.726 2.602l-38.058-15.764-15.764 38.058c-5.398 13.032-16.31 22.6-29.936 26.25-13.624 3.652-27.856 0.82-39.046-7.768l-32.682-25.078-25.076 32.68c-8.588 11.194-21.604 17.612-35.71 17.612s-27.122-6.418-35.708-17.61l-25.076-32.68-32.68 25.076c-11.19 8.588-25.422 11.42-39.048 7.768-13.626-3.65-24.536-13.218-29.936-26.25l-15.764-38.058-38.058 15.764c-13.034 5.4-27.516 4.45-39.73-2.604-12.216-7.052-20.278-19.12-22.12-33.104l-5.376-40.842-40.84 5.378c-13.984 1.84-27.728-2.824-37.702-12.798s-14.638-23.716-12.796-37.702l5.376-40.84-40.84-5.376c-13.986-1.84-26.050-9.904-33.104-22.12-7.052-12.216-8.002-26.696-2.604-39.73l15.764-38.058-38.058-15.764c-13.032-5.398-22.6-16.308-26.25-29.932-3.652-13.626-0.82-27.86 7.766-39.050l25.078-32.682-32.68-25.076c-11.196-8.588-17.614-21.604-17.614-35.71s6.418-27.122 17.61-35.71l32.68-25.076-25.078-32.682c-8.586-11.19-11.418-25.424-7.766-39.050 3.65-13.626 13.218-24.536 26.25-29.932l38.058-15.764-15.764-38.058c-5.398-13.032-4.45-27.512 2.604-39.728s19.12-20.278 33.104-22.12l40.842-5.376-5.378-40.84c-1.84-13.986 2.824-27.728 12.798-37.702s23.716-14.634 37.702-12.798l40.84 5.376 5.376-40.84c1.842-13.986 9.904-26.052 22.122-33.106 12.216-7.052 26.698-8 39.728-2.604l38.058 15.764 15.764-38.056c5.398-13.032 16.308-22.6 29.932-26.25 13.624-3.652 27.858-0.82 39.050 7.766l32.682 25.078 25.076-32.68c8.588-11.194 21.604-17.612 35.71-17.612s27.122 6.418 35.708 17.61l25.078 32.68 32.68-25.078c11.19-8.586 25.42-11.418 39.050-7.766 13.626 3.65 24.536 13.218 29.932 26.25l15.764 38.058 38.058-15.764c13.034-5.398 27.514-4.45 39.726 2.602 12.216 7.052 20.28 19.12 22.122 33.106l5.376 40.84 40.842-5.376c13.982-1.834 27.726 2.824 37.704 12.798 9.972 9.974 14.636 23.716 12.794 37.702l-5.376 40.84 40.842 5.376c13.984 1.842 26.048 9.904 33.102 22.12s8.002 26.696 2.604 39.73l-15.764 38.056 38.058 15.764c13.032 5.398 22.6 16.308 26.252 29.932 3.65 13.626 0.82 27.86-7.768 39.050l-25.078 32.682 32.682 25.076c11.194 8.59 17.612 21.606 17.612 35.712zM988.128 436.092l-44.582-34.208c-3.156-2.422-5.22-5.998-5.74-9.942s0.548-7.934 2.97-11.090l34.208-44.582c2.864-3.732 3.808-8.478 2.59-13.022-1.216-4.544-4.408-8.182-8.754-9.982l-51.916-21.504c-7.654-3.17-11.29-11.946-8.118-19.598l21.504-51.916c1.798-4.346 1.482-9.176-0.87-13.25s-6.376-6.762-11.038-7.376l-55.714-7.334c-8.212-1.082-13.994-8.616-12.912-16.83l7.334-55.712c0.614-4.664-0.942-9.246-4.268-12.572s-7.898-4.886-12.574-4.268l-55.712 7.334c-3.938 0.516-7.932-0.55-11.088-2.972s-5.22-5.998-5.74-9.942l-7.334-55.712c-0.616-4.664-3.302-8.688-7.376-11.040-4.072-2.35-8.904-2.668-13.248-0.868l-51.916 21.504c-7.654 3.17-16.428-0.466-19.598-8.118l-21.504-51.916c-1.8-4.346-5.44-7.536-9.982-8.754-4.54-1.218-9.29-0.276-13.024 2.59l-44.58 34.208c-3.154 2.42-7.14 3.488-11.088 2.972-3.946-0.52-7.522-2.584-9.944-5.74l-34.208-44.582c-2.862-3.73-7.2-5.87-11.906-5.87s-9.044 2.14-11.908 5.872c0 0-34.208 44.582-34.208 44.582-2.422 3.156-5.998 5.22-9.942 5.74-0.654 0.086-1.306 0.128-1.958 0.128-3.284 0-6.498-1.080-9.132-3.1l-44.582-34.208c-3.732-2.864-8.48-3.81-13.022-2.59-4.544 1.216-8.182 4.408-9.982 8.754l-21.504 51.916c-3.17 7.654-11.948 11.29-19.598 8.118l-51.916-21.504c-4.346-1.798-9.176-1.484-13.248 0.868-4.074 2.352-6.762 6.376-7.376 11.040l-7.334 55.712c-0.52 3.944-2.584 7.52-5.74 9.942-3.156 2.42-7.144 3.492-11.090 2.972l-55.712-7.334c-4.654-0.62-9.246 0.94-12.572 4.268-3.326 3.326-4.882 7.908-4.268 12.572l7.334 55.712c1.082 8.214-4.702 15.748-12.914 16.83l-55.712 7.334c-4.664 0.614-8.688 3.302-11.040 7.376s-2.668 8.902-0.868 13.248l21.504 51.916c3.17 7.654-0.464 16.428-8.118 19.598l-51.916 21.504c-4.346 1.8-7.538 5.438-8.754 9.982-1.218 4.544-0.274 9.29 2.59 13.022l34.208 44.582c2.422 3.156 3.49 7.146 2.972 11.090-0.52 3.944-2.584 7.52-5.74 9.942l-44.582 34.208c-3.732 2.864-5.872 7.204-5.872 11.908s2.14 9.044 5.874 11.908l44.582 34.208c3.156 2.422 5.22 5.998 5.74 9.942 0.518 3.944-0.55 7.934-2.972 11.090l-34.208 44.582c-2.864 3.732-3.808 8.478-2.59 13.022 1.216 4.544 4.408 8.182 8.754 9.982l51.916 21.504c3.676 1.522 6.596 4.442 8.118 8.118s1.522 7.804 0 11.48l-21.504 51.916c-1.8 4.346-1.484 9.174 0.868 13.25 2.352 4.074 6.376 6.762 11.040 7.376l55.712 7.334c8.212 1.082 13.996 8.616 12.914 16.83l-7.334 55.712c-0.614 4.664 0.94 9.246 4.266 12.572s7.912 4.878 12.572 4.268l55.712-7.334c8.23-1.074 15.75 4.702 16.83 12.914l7.334 55.712c0.614 4.664 3.302 8.686 7.376 11.040 4.078 2.352 8.904 2.666 13.25 0.868l51.916-21.504c7.654-3.168 16.428 0.464 19.598 8.118l21.504 51.916c1.8 4.346 5.438 7.538 9.982 8.754 4.548 1.218 9.292 0.272 13.022-2.59l44.58-34.208c6.572-5.042 15.99-3.802 21.032 2.768l34.208 44.582c2.864 3.73 7.204 5.87 11.908 5.87s9.046-2.14 11.91-5.872l34.208-44.582c2.422-3.156 5.998-5.222 9.944-5.742 3.936-0.516 7.932 0.55 11.088 2.972l44.582 34.208c3.73 2.864 8.472 3.806 13.022 2.59 4.544-1.218 8.184-4.41 9.984-8.754l21.504-51.916c3.17-7.652 11.942-11.288 19.598-8.118l51.916 21.504c4.346 1.8 9.178 1.484 13.248-0.868 4.074-2.352 6.762-6.376 7.376-11.040l7.334-55.712c1.078-8.212 8.612-13.992 16.828-12.914l55.714 7.334c4.652 0.62 9.244-0.94 12.572-4.268 3.326-3.326 4.88-7.908 4.268-12.572l-7.334-55.714c-1.082-8.214 4.7-15.75 12.914-16.83l55.71-7.334c4.664-0.614 8.688-3.302 11.040-7.376s2.668-8.904 0.87-13.25l-21.504-51.916c-3.17-7.654 0.462-16.428 8.118-19.598l51.916-21.504c4.346-1.8 7.538-5.438 8.754-9.982 1.218-4.544 0.274-9.29-2.59-13.022l-34.208-44.582c-2.422-3.156-3.49-7.146-2.97-11.090s2.584-7.52 5.74-9.942l44.582-34.208c3.726-2.858 5.866-7.198 5.866-11.902s-2.14-9.044-5.872-11.908zM522.608 416.18c-5.86 5.858-15.356 5.856-21.214 0l-176.070-176.070c-5.848-5.848-15.364-5.848-21.214 0-5.848 5.848-5.848 15.366 0 21.214l394.568 394.566c2.832 2.834 6.598 4.394 10.606 4.394 4.006 0 7.774-1.56 10.606-4.394 5.85-5.848 5.85-15.366 0-21.214l-176.070-176.070c-5.858-5.858-5.858-15.356 0-21.212 5.86-5.858 15.356-5.858 21.214 0l176.070 176.070c17.542 17.546 17.542 46.094-0.002 63.64-8.5 8.5-19.798 13.18-31.818 13.18-12.022 0-23.32-4.682-31.82-13.18l-394.566-394.566c-17.546-17.544-17.546-46.094 0-63.64 8.772-8.774 20.296-13.16 31.82-13.16s23.046 4.386 31.82 13.16l176.070 176.070c5.856 5.856 5.856 15.354 0 21.212zM660.492 434.508c-74.44 0-135-60.56-135-135s60.56-135 135-135 135 60.56 135 135-60.56 135-135 135zM660.492 194.508c-57.896 0-105 47.102-105 105s47.104 105 105 105 105-47.102 105-105-47.104-105-105-105zM660.492 374.508c-41.356 0-75-33.644-75-75s33.644-75 75-75 75 33.644 75 75-33.644 75-75 75zM660.492 254.508c-24.812 0-45 20.186-45 45s20.188 45 45 45 45-20.186 45-45-20.188-45-45-45zM498.508 596.492c0 74.44-60.56 135-135 135s-135-60.56-135-135 60.56-135 135-135 135 60.56 135 135zM258.508 596.492c0 57.898 47.102 105 105 105s105-47.102 105-105-47.102-105-105-105-105 47.102-105 105zM438.508 596.492c0 41.356-33.644 75-75 75s-75-33.644-75-75 33.644-75 75-75 75 33.644 75 75zM318.508 596.492c0 24.814 20.186 45 45 45s45-20.186 45-45-20.186-45-45-45-45 20.186-45 45z" />
|
50 |
+
<glyph unicode="" glyph-name="cart" d="M384 32c0-53.019-42.981-96-96-96s-96 42.981-96 96c0 53.019 42.981 96 96 96s96-42.981 96-96zM1024 32c0-53.019-42.981-96-96-96s-96 42.981-96 96c0 53.019 42.981 96 96 96s96-42.981 96-96zM1024 448v384h-768c0 35.346-28.654 64-64 64h-192v-64h128l48.074-412.054c-29.294-23.458-48.074-59.5-48.074-99.946 0-70.696 57.308-128 128-128h768v64h-768c-35.346 0-64 28.654-64 64 0 0.218 0.014 0.436 0.016 0.656l831.984 127.344z" />
|
51 |
+
<glyph unicode="" glyph-name="spinner" d="M384 832c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM655.53 719.53c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM832 448c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM719.53 176.47c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM448.002 64c0 0 0 0 0 0 0 35.346 28.654 64 64 64s64-28.654 64-64c0 0 0 0 0 0 0-35.346-28.654-64-64-64s-64 28.654-64 64zM176.472 176.47c0 0 0 0 0 0 0 35.346 28.654 64 64 64s64-28.654 64-64c0 0 0 0 0 0 0-35.346-28.654-64-64-64s-64 28.654-64 64zM144.472 719.53c0 0 0 0 0 0 0 53.019 42.981 96 96 96s96-42.981 96-96c0 0 0 0 0 0 0-53.019-42.981-96-96-96s-96 42.981-96 96zM56 448c0 39.765 32.235 72 72 72s72-32.235 72-72c0-39.765-32.235-72-72-72s-72 32.235-72 72z" />
|
52 |
+
<glyph unicode="" glyph-name="spinner2" d="M1024 448c-1.278 66.862-15.784 133.516-42.576 194.462-26.704 61-65.462 116.258-113.042 161.92-47.552 45.696-103.944 81.82-164.984 105.652-61.004 23.924-126.596 35.352-191.398 33.966-64.81-1.282-129.332-15.374-188.334-41.356-59.048-25.896-112.542-63.47-156.734-109.576-44.224-46.082-79.16-100.708-102.186-159.798-23.114-59.062-34.128-122.52-32.746-185.27 1.286-62.76 14.964-125.148 40.134-182.206 25.088-57.1 61.476-108.828 106.11-151.548 44.61-42.754 97.472-76.504 154.614-98.72 57.118-22.304 118.446-32.902 179.142-31.526 60.708 1.29 120.962 14.554 176.076 38.914 55.15 24.282 105.116 59.48 146.366 102.644 41.282 43.14 73.844 94.236 95.254 149.43 13.034 33.458 21.88 68.4 26.542 103.798 1.246-0.072 2.498-0.12 3.762-0.12 35.346 0 64 28.652 64 64 0 1.796-0.094 3.572-0.238 5.332h0.238zM922.306 278.052c-23.472-53.202-57.484-101.4-99.178-141.18-41.67-39.81-91-71.186-144.244-91.79-53.228-20.678-110.29-30.452-166.884-29.082-56.604 1.298-112.596 13.736-163.82 36.474-51.25 22.666-97.684 55.49-135.994 95.712-38.338 40.198-68.528 87.764-88.322 139.058-19.87 51.284-29.228 106.214-27.864 160.756 1.302 54.552 13.328 108.412 35.254 157.69 21.858 49.3 53.498 93.97 92.246 130.81 38.73 36.868 84.53 65.87 133.874 84.856 49.338 19.060 102.136 28.006 154.626 26.644 52.5-1.306 104.228-12.918 151.562-34.034 47.352-21.050 90.256-51.502 125.624-88.782 35.396-37.258 63.21-81.294 81.39-128.688 18.248-47.392 26.782-98.058 25.424-148.496h0.238c-0.144-1.76-0.238-3.536-0.238-5.332 0-33.012 24.992-60.174 57.086-63.624-6.224-34.822-16.53-68.818-30.78-100.992z" />
|
53 |
+
<glyph unicode="" glyph-name="spinner4" d="M192 448c0 12.18 0.704 24.196 2.030 36.022l-184.98 60.104c-5.916-31.14-9.050-63.264-9.050-96.126 0-147.23 62.166-279.922 161.654-373.324l114.284 157.296c-52.124 56.926-83.938 132.758-83.938 216.028zM832 448c0-83.268-31.812-159.102-83.938-216.028l114.284-157.296c99.488 93.402 161.654 226.094 161.654 373.324 0 32.862-3.132 64.986-9.048 96.126l-184.98-60.104c1.324-11.828 2.028-23.842 2.028-36.022zM576 761.592c91.934-18.662 169.544-76.742 214.45-155.826l184.978 60.102c-73.196 155.42-222.24 268.060-399.428 290.156v-194.432zM233.55 605.768c44.906 79.084 122.516 137.164 214.45 155.826v194.43c-177.188-22.096-326.23-134.736-399.426-290.154l184.976-60.102zM644.556 156.672c-40.39-18.408-85.272-28.672-132.556-28.672s-92.166 10.264-132.554 28.67l-114.292-157.31c73.206-40.366 157.336-63.36 246.846-63.36s173.64 22.994 246.848 63.36l-114.292 157.312z" />
|
54 |
+
<glyph unicode="" glyph-name="spinner8" d="M512-64c-136.76 0-265.334 53.258-362.040 149.96-96.702 96.706-149.96 225.28-149.96 362.040 0 96.838 27.182 191.134 78.606 272.692 50 79.296 120.664 143.372 204.356 185.3l43-85.832c-68.038-34.084-125.492-86.186-166.15-150.67-41.746-66.208-63.812-142.798-63.812-221.49 0-229.382 186.618-416 416-416s416 186.618 416 416c0 78.692-22.066 155.282-63.81 221.49-40.66 64.484-98.114 116.584-166.15 150.67l43 85.832c83.692-41.928 154.358-106.004 204.356-185.3 51.422-81.558 78.604-175.854 78.604-272.692 0-136.76-53.258-265.334-149.96-362.040-96.706-96.702-225.28-149.96-362.040-149.96z" />
|
55 |
+
<glyph unicode="" glyph-name="spinner11" d="M1024 576h-384l143.53 143.53c-72.53 72.526-168.96 112.47-271.53 112.47s-199-39.944-271.53-112.47c-72.526-72.53-112.47-168.96-112.47-271.53s39.944-199 112.47-271.53c72.53-72.526 168.96-112.47 271.53-112.47s199 39.944 271.528 112.472c6.056 6.054 11.86 12.292 17.456 18.668l96.32-84.282c-93.846-107.166-231.664-174.858-385.304-174.858-282.77 0-512 229.23-512 512s229.23 512 512 512c141.386 0 269.368-57.326 362.016-149.984l149.984 149.984v-384z" />
|
56 |
+
<glyph unicode="" glyph-name="trash2" d="M192-64h640l64 704h-768zM640 832v128h-256v-128h-320v-192l64 64h768l64-64v192h-320zM576 832h-128v64h128v-64z" />
|
57 |
+
<glyph unicode="" glyph-name="checkmark" d="M864 832l-480-480-224 224-160-160 384-384 640 640z" />
|
58 |
+
</font></defs></svg>
|
assets/css/fonts/Woo-Side-Cart.ttf
ADDED
Binary file
|
assets/css/fonts/Woo-Side-Cart.woff
ADDED
Binary file
|
assets/css/xoo-wsc-fonts.css
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@font-face {
|
2 |
+
font-family: 'Woo-Side-Cart';
|
3 |
+
src: url('fonts/Woo-Side-Cart.eot?le17z4');
|
4 |
+
src: url('fonts/Woo-Side-Cart.eot?le17z4#iefix') format('embedded-opentype'),
|
5 |
+
url('fonts/Woo-Side-Cart.woff?le17z4') format('woff'),
|
6 |
+
url('fonts/Woo-Side-Cart.ttf?le17z4') format('truetype'),
|
7 |
+
url('fonts/Woo-Side-Cart.svg?le17z4#Woo-Side-Cart') format('svg');
|
8 |
+
font-weight: normal;
|
9 |
+
font-style: normal;
|
10 |
+
font-display: block;
|
11 |
+
}
|
12 |
+
|
13 |
+
[class^="xoo-wsc-icon-"], [class*=" xoo-wsc-icon-"] {
|
14 |
+
/* use !important to prevent issues with browser extensions that change fonts */
|
15 |
+
font-family: 'Woo-Side-Cart' !important;
|
16 |
+
speak: never;
|
17 |
+
font-style: normal;
|
18 |
+
font-weight: normal;
|
19 |
+
font-variant: normal;
|
20 |
+
text-transform: none;
|
21 |
+
line-height: 1;
|
22 |
+
|
23 |
+
/* Better Font Rendering =========== */
|
24 |
+
-webkit-font-smoothing: antialiased;
|
25 |
+
-moz-osx-font-smoothing: grayscale;
|
26 |
+
}
|
27 |
+
|
28 |
+
.xoo-wsc-icon-coupon-7:before {
|
29 |
+
content: "\e925";
|
30 |
+
}
|
31 |
+
.xoo-wsc-icon-coupon-8:before {
|
32 |
+
content: "\e926";
|
33 |
+
}
|
34 |
+
.xoo-wsc-icon-coupon-9:before {
|
35 |
+
content: "\e927";
|
36 |
+
}
|
37 |
+
.xoo-wsc-icon-coupon-1:before {
|
38 |
+
content: "\e91d";
|
39 |
+
}
|
40 |
+
.xoo-wsc-icon-coupon-2:before {
|
41 |
+
content: "\e91e";
|
42 |
+
}
|
43 |
+
.xoo-wsc-icon-coupon-3:before {
|
44 |
+
content: "\e91f";
|
45 |
+
}
|
46 |
+
.xoo-wsc-icon-coupon-5:before {
|
47 |
+
content: "\e920";
|
48 |
+
}
|
49 |
+
.xoo-wsc-icon-coupon-6:before {
|
50 |
+
content: "\e921";
|
51 |
+
}
|
52 |
+
.xoo-wsc-icon-coupon:before {
|
53 |
+
content: "\e922";
|
54 |
+
}
|
55 |
+
.xoo-wsc-icon-coupon-4:before {
|
56 |
+
content: "\e923";
|
57 |
+
}
|
58 |
+
.xoo-wsc-icon-bag1:before {
|
59 |
+
content: "\e90c";
|
60 |
+
}
|
61 |
+
.xoo-wsc-icon-bag2:before {
|
62 |
+
content: "\e910";
|
63 |
+
}
|
64 |
+
.xoo-wsc-icon-cart1:before {
|
65 |
+
content: "\e911";
|
66 |
+
}
|
67 |
+
.xoo-wsc-icon-cart2:before {
|
68 |
+
content: "\e912";
|
69 |
+
}
|
70 |
+
.xoo-wsc-icon-arrow-long-right:before {
|
71 |
+
content: "\e900";
|
72 |
+
}
|
73 |
+
.xoo-wsc-icon-basket5:before {
|
74 |
+
content: "\e901";
|
75 |
+
}
|
76 |
+
.xoo-wsc-icon-basket4:before {
|
77 |
+
content: "\e902";
|
78 |
+
}
|
79 |
+
.xoo-wsc-icon-basket6:before {
|
80 |
+
content: "\e903";
|
81 |
+
}
|
82 |
+
.xoo-wsc-icon-basket1:before {
|
83 |
+
content: "\e904";
|
84 |
+
}
|
85 |
+
.xoo-wsc-icon-basket2:before {
|
86 |
+
content: "\e905";
|
87 |
+
}
|
88 |
+
.xoo-wsc-icon-basket3:before {
|
89 |
+
content: "\e906";
|
90 |
+
}
|
91 |
+
.xoo-wsc-icon-trash1:before {
|
92 |
+
content: "\e907";
|
93 |
+
}
|
94 |
+
.xoo-wsc-icon-trash:before {
|
95 |
+
content: "\e908";
|
96 |
+
}
|
97 |
+
.xoo-wsc-icon-cross:before {
|
98 |
+
content: "\e909";
|
99 |
+
}
|
100 |
+
.xoo-wsc-icon-check_circle:before {
|
101 |
+
content: "\e90a";
|
102 |
+
}
|
103 |
+
.xoo-wsc-icon-spinner:before {
|
104 |
+
content: "\e97a";
|
105 |
+
}
|
106 |
+
.xoo-wsc-icon-spinner2:before {
|
107 |
+
content: "\e97b";
|
108 |
+
}
|
109 |
+
.xoo-wsc-icon-trash2:before {
|
110 |
+
content: "\e9ad";
|
111 |
+
}
|
112 |
+
.xoo-wsc-icon-checkmark:before {
|
113 |
+
content: "\ea10";
|
114 |
+
}
|
115 |
+
.xoo-wsc-icon-discout:before {
|
116 |
+
content: "\e924";
|
117 |
+
}
|
118 |
+
.xoo-wsc-icon-chevron-thin-left:before {
|
119 |
+
content: "\e919";
|
120 |
+
}
|
121 |
+
.xoo-wsc-icon-chevron-left:before {
|
122 |
+
content: "\e91a";
|
123 |
+
}
|
124 |
+
.xoo-wsc-icon-arrow-thin-left:before {
|
125 |
+
content: "\e91b";
|
126 |
+
}
|
127 |
+
.xoo-wsc-icon-arrow-left:before {
|
128 |
+
content: "\e91c";
|
129 |
+
}
|
130 |
+
.xoo-wsc-icon-arrow-thin-right:before {
|
131 |
+
content: "\e90d";
|
132 |
+
}
|
133 |
+
.xoo-wsc-icon-del4:before {
|
134 |
+
content: "\e913";
|
135 |
+
}
|
136 |
+
.xoo-wsc-icon-pencil:before {
|
137 |
+
content: "\e90b";
|
138 |
+
}
|
139 |
+
.xoo-wsc-icon-cart:before {
|
140 |
+
content: "\e93a";
|
141 |
+
}
|
142 |
+
.xoo-wsc-icon-spinner4:before {
|
143 |
+
content: "\e97d";
|
144 |
+
}
|
145 |
+
.xoo-wsc-icon-spinner8:before {
|
146 |
+
content: "\e981";
|
147 |
+
}
|
148 |
+
.xoo-wsc-icon-spinner11:before {
|
149 |
+
content: "\e984";
|
150 |
+
}
|
151 |
+
.xoo-wsc-icon-shopping-bag:before {
|
152 |
+
content: "\e918";
|
153 |
+
}
|
154 |
+
.xoo-wsc-icon-trash3:before {
|
155 |
+
content: "\e914";
|
156 |
+
}
|
157 |
+
.xoo-wsc-icon-del1:before {
|
158 |
+
content: "\e915";
|
159 |
+
}
|
160 |
+
.xoo-wsc-icon-del2:before {
|
161 |
+
content: "\e916";
|
162 |
+
}
|
163 |
+
.xoo-wsc-icon-del3:before {
|
164 |
+
content: "\e917";
|
165 |
+
}
|
166 |
+
.xoo-wsc-icon-shopping-bag1:before {
|
167 |
+
content: "\e90e";
|
168 |
+
}
|
169 |
+
.xoo-wsc-icon-shopping-cart:before {
|
170 |
+
content: "\e90f";
|
171 |
+
}
|
assets/css/xoo-wsc-style.css
ADDED
@@ -0,0 +1,852 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.xoo-wsc-container, .xoo-wsc-slider {
|
2 |
+
position: fixed;
|
3 |
+
background-color: #fff;
|
4 |
+
z-index: 999999;
|
5 |
+
display: flex;
|
6 |
+
flex-direction: column;
|
7 |
+
width: 90%;
|
8 |
+
transition: 0.5s;
|
9 |
+
}
|
10 |
+
|
11 |
+
.xoo-wsc-modal * {
|
12 |
+
box-sizing: border-box;
|
13 |
+
}
|
14 |
+
|
15 |
+
.xoo-wsc-cart-active .xoo-wsc-opac {
|
16 |
+
position: fixed;
|
17 |
+
top: 0;
|
18 |
+
left: 0;
|
19 |
+
right: 0;
|
20 |
+
bottom: 0;
|
21 |
+
background-color: #000;
|
22 |
+
z-index: 999998;
|
23 |
+
opacity: 0.7;
|
24 |
+
}
|
25 |
+
|
26 |
+
.xoo-wsc-body {
|
27 |
+
flex-grow: 1;
|
28 |
+
overflow: auto;
|
29 |
+
}
|
30 |
+
|
31 |
+
.xoo-wsc-loading .xoo-wsc-loader{
|
32 |
+
display: block;
|
33 |
+
}
|
34 |
+
|
35 |
+
span.xoo-wsc-loader {
|
36 |
+
display: none;
|
37 |
+
position: absolute;
|
38 |
+
left: 0;
|
39 |
+
right: 0;
|
40 |
+
top: 0;
|
41 |
+
bottom: 0;
|
42 |
+
opacity: 0.5;
|
43 |
+
background-color: #eee;
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
body.xoo-wsc-cart-active, html.xoo-wsc-cart-active{
|
48 |
+
overflow: hidden!important;
|
49 |
+
}
|
50 |
+
|
51 |
+
.xoo-wsc-basket {
|
52 |
+
padding: 10px 12px;
|
53 |
+
margin: 10px;
|
54 |
+
z-index: 9999999;
|
55 |
+
cursor: pointer;
|
56 |
+
position: fixed;
|
57 |
+
transition: 0.5s;
|
58 |
+
display: none;
|
59 |
+
}
|
60 |
+
|
61 |
+
.xoo-wsc-items-count{
|
62 |
+
border-radius: 50%;
|
63 |
+
position: absolute;
|
64 |
+
font-size: 13px;
|
65 |
+
width: 28px;
|
66 |
+
height: 28px;
|
67 |
+
line-height: 28px;
|
68 |
+
text-align: center;
|
69 |
+
overflow: hidden;
|
70 |
+
}
|
71 |
+
|
72 |
+
.xoo-wsc-bki{
|
73 |
+
position: relative;
|
74 |
+
top: 2px;
|
75 |
+
}
|
76 |
+
|
77 |
+
.xoo-wsc-fly-animating{
|
78 |
+
opacity: 1;
|
79 |
+
position: absolute!important;
|
80 |
+
height: 150px;
|
81 |
+
width: 150px;
|
82 |
+
z-index: 100;
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
.xoo-wsc-sc-cont .xoo-wsc-cart-trigger {
|
87 |
+
display: flex;
|
88 |
+
position: relative;
|
89 |
+
cursor: pointer;
|
90 |
+
align-items: center;
|
91 |
+
justify-content: center;
|
92 |
+
}
|
93 |
+
|
94 |
+
.xoo-wsc-sc-bki{
|
95 |
+
font-size: 30px;
|
96 |
+
}
|
97 |
+
|
98 |
+
span.xoo-wsc-sc-count {
|
99 |
+
border-radius: 50%;
|
100 |
+
height: 18px;
|
101 |
+
line-height: 18px;
|
102 |
+
width: 18px;
|
103 |
+
display: inline-block;
|
104 |
+
text-align: center;
|
105 |
+
font-size: 13px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.xoo-wsc-sc-cont .xoo-wsc-cart-trigger > * {
|
109 |
+
margin-right: 3px;
|
110 |
+
}
|
111 |
+
|
112 |
+
|
113 |
+
/* Notices */
|
114 |
+
.xoo-wsc-notice-container {
|
115 |
+
z-index: 2;
|
116 |
+
position: absolute;
|
117 |
+
top: 0;
|
118 |
+
left: 0;
|
119 |
+
right: 0;
|
120 |
+
display: none;
|
121 |
+
}
|
122 |
+
|
123 |
+
ul.xoo-wsc-notices {
|
124 |
+
margin: 0;
|
125 |
+
list-style-type: none;
|
126 |
+
padding: 0;
|
127 |
+
}
|
128 |
+
|
129 |
+
.xoo-wsc-notice-success {
|
130 |
+
background-color: #DFF0D8;
|
131 |
+
color: #3C763D;
|
132 |
+
}
|
133 |
+
.xoo-wsc-notice-error {
|
134 |
+
color: #a94442;
|
135 |
+
background-color: #f2dede;
|
136 |
+
}
|
137 |
+
|
138 |
+
ul.xoo-wsc-notices li {
|
139 |
+
padding: 15px 20px;
|
140 |
+
list-style-type: none;
|
141 |
+
}
|
142 |
+
|
143 |
+
ul.xoo-wsc-notices li span {
|
144 |
+
margin-right: 6px;
|
145 |
+
}
|
146 |
+
|
147 |
+
span.xoo-wsc-undo-item {
|
148 |
+
float: right;
|
149 |
+
text-decoration: underline;
|
150 |
+
cursor: pointer;
|
151 |
+
}
|
152 |
+
|
153 |
+
|
154 |
+
.xoo-wsc-notices a.button.wc-forward {
|
155 |
+
display: none;
|
156 |
+
}
|
157 |
+
|
158 |
+
/* Basket */
|
159 |
+
.xoo-wscb-icon {
|
160 |
+
font-size: 37px;
|
161 |
+
}
|
162 |
+
|
163 |
+
.xoo-wscb-count {
|
164 |
+
position: absolute;
|
165 |
+
z-index: 1;
|
166 |
+
background-color: transparent;
|
167 |
+
font-size: 15px;
|
168 |
+
height: 45px;
|
169 |
+
line-height: 45px;
|
170 |
+
text-align: center;
|
171 |
+
left: 0;
|
172 |
+
right: 0;
|
173 |
+
}
|
174 |
+
|
175 |
+
/* Header */
|
176 |
+
.xoo-wsc-header {
|
177 |
+
padding: 15px;
|
178 |
+
color: #000;
|
179 |
+
}
|
180 |
+
|
181 |
+
span.xoo-wsch-close {
|
182 |
+
position: absolute;
|
183 |
+
cursor: pointer;
|
184 |
+
}
|
185 |
+
|
186 |
+
span.xoo-wsch-text {
|
187 |
+
margin-left: 8px;
|
188 |
+
}
|
189 |
+
|
190 |
+
.xoo-wsch-top {
|
191 |
+
align-items: center;
|
192 |
+
}
|
193 |
+
|
194 |
+
.xoo-wsch-top .xoo-wsch-basket {
|
195 |
+
display: table;
|
196 |
+
position: relative;
|
197 |
+
}
|
198 |
+
|
199 |
+
.xoo-wsch-top {
|
200 |
+
display: flex;
|
201 |
+
margin: 0 auto;
|
202 |
+
}
|
203 |
+
|
204 |
+
.xoo-wsc-sb-bar {
|
205 |
+
height: 8px;
|
206 |
+
width: 90%;
|
207 |
+
background-color: #eeee;
|
208 |
+
border-radius: 7px;
|
209 |
+
display: table;
|
210 |
+
margin: 0 auto;
|
211 |
+
margin-top: 10px;
|
212 |
+
}
|
213 |
+
|
214 |
+
.xoo-wsc-sb-bar > span {
|
215 |
+
display: block;
|
216 |
+
z-index: 1;
|
217 |
+
height: inherit;
|
218 |
+
}
|
219 |
+
|
220 |
+
.xoo-wsc-ship-bar-cont {
|
221 |
+
width: 100%;
|
222 |
+
text-align: center;
|
223 |
+
margin-top: 10px;
|
224 |
+
}
|
225 |
+
|
226 |
+
/****** BODY ***********/
|
227 |
+
|
228 |
+
/*** Product ***/
|
229 |
+
.xoo-wsc-product {
|
230 |
+
display: flex;
|
231 |
+
border-bottom: 1px solid #eee;
|
232 |
+
}
|
233 |
+
|
234 |
+
.xoo-wsc-img-col {
|
235 |
+
align-self: center;
|
236 |
+
}
|
237 |
+
|
238 |
+
.xoo-wsc-sum-col {
|
239 |
+
flex-grow: 1;
|
240 |
+
padding-left: 15px;
|
241 |
+
display: flex;
|
242 |
+
flex-direction: column;
|
243 |
+
}
|
244 |
+
|
245 |
+
.xoo-wsc-img-col img {
|
246 |
+
width: 100%;
|
247 |
+
height: auto;
|
248 |
+
}
|
249 |
+
|
250 |
+
.xoo-wsc-sm-left {
|
251 |
+
flex-grow: 1;
|
252 |
+
display: flex;
|
253 |
+
justify-content: space-between;
|
254 |
+
flex-direction: column;
|
255 |
+
min-width: 0;
|
256 |
+
}
|
257 |
+
|
258 |
+
.xoo-wsc-sm-right {
|
259 |
+
align-items: flex-end;
|
260 |
+
padding-left: 10px;
|
261 |
+
display: flex;
|
262 |
+
flex-direction: column;
|
263 |
+
justify-content: space-between;
|
264 |
+
max-width: 30px;
|
265 |
+
}
|
266 |
+
|
267 |
+
span.xoo-wsc-pname, span.xoo-wsc-pname a {
|
268 |
+
font-weight: 600;
|
269 |
+
}
|
270 |
+
|
271 |
+
span.xoo-wsc-smr-del {
|
272 |
+
cursor: pointer;
|
273 |
+
margin-top: 5px;
|
274 |
+
}
|
275 |
+
|
276 |
+
.xoo-wsc-sm-info {
|
277 |
+
display: flex;
|
278 |
+
min-width: 0;
|
279 |
+
}
|
280 |
+
|
281 |
+
.xoo-wsc-sm-sales {
|
282 |
+
text-transform: uppercase;
|
283 |
+
border: 1px solid #333;
|
284 |
+
padding: 2px 10px;
|
285 |
+
display: block;
|
286 |
+
margin-bottom: 5px;
|
287 |
+
border-radius: 10px;
|
288 |
+
font-size: 10px;
|
289 |
+
}
|
290 |
+
|
291 |
+
.xoo-wsc-sm-left > *:not(:last-child) {
|
292 |
+
padding-bottom: 4px;
|
293 |
+
}
|
294 |
+
|
295 |
+
/* Qty Box */
|
296 |
+
.xoo-wsc-qty-box {
|
297 |
+
margin-top: 5px;
|
298 |
+
display: flex;
|
299 |
+
justify-content: center;
|
300 |
+
align-items: center;
|
301 |
+
max-width: 90px;
|
302 |
+
width: 100%;
|
303 |
+
flex-direction: row;
|
304 |
+
}
|
305 |
+
|
306 |
+
input[type="number"].xoo-wsc-qty {
|
307 |
+
font-size: 14px;
|
308 |
+
width: 100%;
|
309 |
+
flex-grow: 1;
|
310 |
+
padding: 6px;
|
311 |
+
text-align: center;
|
312 |
+
border: 0;
|
313 |
+
box-shadow: none;
|
314 |
+
background-color: transparent;
|
315 |
+
height: 28px;
|
316 |
+
line-height: 28px;
|
317 |
+
min-width: 1%;
|
318 |
+
}
|
319 |
+
|
320 |
+
.xoo-wsc-qtb-square input[type="number"].xoo-wsc-qty{
|
321 |
+
border-top-width: 0;
|
322 |
+
border-bottom-width: 0;
|
323 |
+
}
|
324 |
+
|
325 |
+
span.xoo-wsc-chng {
|
326 |
+
min-width: 18px;
|
327 |
+
align-self: stretch;
|
328 |
+
display: flex;
|
329 |
+
flex-direction: column;
|
330 |
+
justify-content: center;
|
331 |
+
align-items: center;
|
332 |
+
cursor: pointer;
|
333 |
+
font-weight: 600;
|
334 |
+
user-select: none;
|
335 |
+
}
|
336 |
+
|
337 |
+
|
338 |
+
.xoo-wsc-qtb-circle .xoo-wsc-chng {
|
339 |
+
border-radius: 50%;
|
340 |
+
height: 70%;
|
341 |
+
align-self: center;
|
342 |
+
}
|
343 |
+
|
344 |
+
.xoo-wsc-qtb-circle input[type="number"].xoo-wsc-qty {
|
345 |
+
margin: 0 5px;
|
346 |
+
}
|
347 |
+
|
348 |
+
input.xoo-wsc-qty::-webkit-outer-spin-button,
|
349 |
+
input.xoo-wsc-qty::-webkit-inner-spin-button {
|
350 |
+
-webkit-appearance: none;
|
351 |
+
margin: 0;
|
352 |
+
}
|
353 |
+
|
354 |
+
input.xoo-wsc-qty[type=number] {
|
355 |
+
-moz-appearance: textfield;
|
356 |
+
}
|
357 |
+
|
358 |
+
.xoo-wsc-qty-price span {
|
359 |
+
display: inline-block;
|
360 |
+
}
|
361 |
+
|
362 |
+
/* Variation */
|
363 |
+
.xoo-wsc-product dl.variation dd, .xoo-wsc-product dl.variation dt {
|
364 |
+
margin: 0 4px 0 0;
|
365 |
+
display: inline-block;
|
366 |
+
float: left;
|
367 |
+
font-style: italic;
|
368 |
+
}
|
369 |
+
|
370 |
+
.xoo-wsc-product dl.variation dt {
|
371 |
+
clear: left;
|
372 |
+
}
|
373 |
+
|
374 |
+
.xoo-wsc-product dl.variation, .xoo-wsc-product dl.variation p {
|
375 |
+
margin: 0;
|
376 |
+
font-size: 13px;
|
377 |
+
}
|
378 |
+
|
379 |
+
/** Slider **/
|
380 |
+
|
381 |
+
.xoo-wsc-sl-content {
|
382 |
+
display: none;
|
383 |
+
overflow: auto;
|
384 |
+
flex-direction: column;
|
385 |
+
}
|
386 |
+
|
387 |
+
.xoo-wsc-sl-content[style*='block'] {
|
388 |
+
display: flex !important;
|
389 |
+
}
|
390 |
+
|
391 |
+
.xoo-wsc-sl-heading {
|
392 |
+
display: flex;
|
393 |
+
font-size: 20px;
|
394 |
+
font-weight: 600;
|
395 |
+
padding: 20px;
|
396 |
+
align-items: center;
|
397 |
+
}
|
398 |
+
|
399 |
+
.xoo-wsc-slc-active.xoo-wsc-sl-content{
|
400 |
+
display: block;
|
401 |
+
}
|
402 |
+
|
403 |
+
.xoo-wsc-sl-body {
|
404 |
+
padding: 10px 20px;
|
405 |
+
flex-grow: 1;
|
406 |
+
overflow: auto;
|
407 |
+
}
|
408 |
+
|
409 |
+
span.xoo-wsc-slider-close {
|
410 |
+
margin: 0 10px;
|
411 |
+
cursor: pointer;
|
412 |
+
}
|
413 |
+
|
414 |
+
/** SLider Shipping */
|
415 |
+
|
416 |
+
ul.xoo-wsc-shipping-methods {
|
417 |
+
list-style-type: none;
|
418 |
+
margin: 0 auto 20px;
|
419 |
+
padding: 0;
|
420 |
+
display: table;
|
421 |
+
}
|
422 |
+
|
423 |
+
|
424 |
+
input.xoo-wsc-shipping-method {
|
425 |
+
margin-right: 5px;
|
426 |
+
}
|
427 |
+
|
428 |
+
ul.xoo-wsc-shipping-methods li {
|
429 |
+
list-style-type: none;
|
430 |
+
margin: 0 0 7px 0;
|
431 |
+
padding: 0;
|
432 |
+
}
|
433 |
+
|
434 |
+
ul.xoo-wsc-shipping-methods li label {
|
435 |
+
cursor: pointer;
|
436 |
+
}
|
437 |
+
|
438 |
+
.xoo-wsc-shipping-destination span:nth-child(1) {
|
439 |
+
color: #777;
|
440 |
+
font-weight: 600;
|
441 |
+
margin-right: 8px;
|
442 |
+
font-size: 16px;
|
443 |
+
}
|
444 |
+
|
445 |
+
.xoo-wsc-shipping-destination {
|
446 |
+
display: table;
|
447 |
+
margin: 0 auto;
|
448 |
+
margin-bottom: 20px;
|
449 |
+
font-size: 17px;
|
450 |
+
}
|
451 |
+
|
452 |
+
.select2-dropdown {
|
453 |
+
z-index: 999999;
|
454 |
+
}
|
455 |
+
|
456 |
+
.xoo-wsc-slider section.shipping-calculator-form {
|
457 |
+
display: block!important;
|
458 |
+
margin: 0;
|
459 |
+
padding: 0;
|
460 |
+
}
|
461 |
+
|
462 |
+
.xoo-wsc-slider a.shipping-calculator-button {
|
463 |
+
display: none;
|
464 |
+
}
|
465 |
+
.woocommerce-checkout .xoo-wsc-sl-content.xoo-wsc-sl-shipping, .woocommerce-checkout .xoo-wsc-ft-amt-label .xoo-wsc-toggle-slider span {
|
466 |
+
display: none!important;
|
467 |
+
}
|
468 |
+
|
469 |
+
|
470 |
+
.woocommerce-checkout .xoo-wsc-ft-amt{
|
471 |
+
pointer-events: none;
|
472 |
+
}
|
473 |
+
|
474 |
+
.xoo-wsc-slider button[name="calc_shipping"] {
|
475 |
+
display: table;
|
476 |
+
margin: 0 auto;
|
477 |
+
}
|
478 |
+
|
479 |
+
.xoo-wsc-slider section.shipping-calculator-form > p{
|
480 |
+
margin: 0 0 30px 0;
|
481 |
+
padding: 0;
|
482 |
+
}
|
483 |
+
|
484 |
+
.xoo-wsc-slider section.shipping-calculator-form input, .xoo-wsc-slider section.shipping-calculator-form select {
|
485 |
+
width: 100%;
|
486 |
+
}
|
487 |
+
|
488 |
+
.xoo-wsc-slider .woocommerce-shipping-calculator {
|
489 |
+
padding: 0;
|
490 |
+
margin: 0;
|
491 |
+
}
|
492 |
+
|
493 |
+
/** SLIDER Coupon **/
|
494 |
+
.xoo-wsc-coupon-row > span {
|
495 |
+
display: block;
|
496 |
+
margin-bottom: 9px;
|
497 |
+
}
|
498 |
+
|
499 |
+
span.xoo-wsc-cr-code {
|
500 |
+
display: inline-block;
|
501 |
+
text-transform: uppercase;
|
502 |
+
border: 1px solid;
|
503 |
+
padding: 1px 20px;
|
504 |
+
}
|
505 |
+
|
506 |
+
.xoo-wsc-coupon-row {
|
507 |
+
padding: 0 15px 30px;
|
508 |
+
border-bottom: 1px dashed #afafaf;
|
509 |
+
margin-bottom: 30px;
|
510 |
+
}
|
511 |
+
|
512 |
+
span.xoo-wsc-cr-off {
|
513 |
+
color: #4CAF50;
|
514 |
+
font-weight: 600;
|
515 |
+
margin-bottom: 0;
|
516 |
+
}
|
517 |
+
|
518 |
+
form.xoo-wsc-sl-apply-coupon {
|
519 |
+
display: flex;
|
520 |
+
width: 100%;
|
521 |
+
justify-content: center;
|
522 |
+
align-items: stretch;
|
523 |
+
margin: 20px 0;
|
524 |
+
flex-wrap: wrap;
|
525 |
+
}
|
526 |
+
|
527 |
+
.xoo-wsc-sl-applied > div {
|
528 |
+
display: flex;
|
529 |
+
text-transform: uppercase;
|
530 |
+
justify-content: space-between;
|
531 |
+
align-items: center;
|
532 |
+
flex-wrap: wrap;
|
533 |
+
}
|
534 |
+
|
535 |
+
span.xoo-wsc-remove-coupon {
|
536 |
+
text-transform: uppercase;
|
537 |
+
cursor: pointer;
|
538 |
+
font-size: 10px;
|
539 |
+
margin-left: 2px;
|
540 |
+
}
|
541 |
+
|
542 |
+
.xoo-wsc-sl-applied {
|
543 |
+
padding: 0 10px;
|
544 |
+
font-size: 14px;
|
545 |
+
margin-bottom: 20px;
|
546 |
+
}
|
547 |
+
|
548 |
+
.xoo-wsc-sl-applied > div .xoo-wsc-slc-saved {
|
549 |
+
color: #4CAF50;
|
550 |
+
font-weight: 600;
|
551 |
+
}
|
552 |
+
|
553 |
+
span.xoo-wsc-slc-remove {
|
554 |
+
font-weight: 600;
|
555 |
+
}
|
556 |
+
|
557 |
+
span.xoo-wsc-clist-label {
|
558 |
+
text-transform: uppercase;
|
559 |
+
color: #777;
|
560 |
+
font-weight: bold;
|
561 |
+
text-align: center;
|
562 |
+
font-size: 12px;
|
563 |
+
padding: 0 20px;
|
564 |
+
display: inline-block;
|
565 |
+
margin: 20px 0;
|
566 |
+
text-align: center;
|
567 |
+
}
|
568 |
+
|
569 |
+
.xoo-wsc-clist-section {
|
570 |
+
border: 1px solid #eee;
|
571 |
+
margin-bottom: 35px;
|
572 |
+
font-size: 13px;
|
573 |
+
padding: 0 25px;
|
574 |
+
}
|
575 |
+
|
576 |
+
.xoo-wsc-coupon-row:last-child {
|
577 |
+
border-bottom: 0;
|
578 |
+
margin-bottom: 0;
|
579 |
+
}
|
580 |
+
|
581 |
+
.xoo-wsc-coupon-row > span:last-child {
|
582 |
+
margin-bottom: 0;
|
583 |
+
}
|
584 |
+
|
585 |
+
span.xoo-wsc-slc-remove .xoo-wsc-remove-coupon {
|
586 |
+
display: block;
|
587 |
+
text-align: right;
|
588 |
+
}
|
589 |
+
|
590 |
+
|
591 |
+
/** Footer */
|
592 |
+
.xoo-wsc-ftx-row {
|
593 |
+
padding: 8px 0;
|
594 |
+
border-top: 1px solid #f3f3f3;
|
595 |
+
font-size: 14px;
|
596 |
+
display: flex;
|
597 |
+
align-items: center;
|
598 |
+
border-bottom: 1px solid #f3f3f3;
|
599 |
+
}
|
600 |
+
|
601 |
+
span.xoo-wsc-ftx-icon {
|
602 |
+
margin-right: 5px;
|
603 |
+
font-size: 17px;
|
604 |
+
}
|
605 |
+
|
606 |
+
|
607 |
+
.xoo-wsc-ftx-coups > div {
|
608 |
+
flex-grow: 1;
|
609 |
+
}
|
610 |
+
|
611 |
+
.xoo-wsc-ftx-coups {
|
612 |
+
display: flex;
|
613 |
+
align-items: center;
|
614 |
+
justify-content: space-between;
|
615 |
+
flex-grow: 1;
|
616 |
+
margin-left: 7px;
|
617 |
+
}
|
618 |
+
|
619 |
+
.xoo-wsc-remove-coupon {
|
620 |
+
display: inline-flex;
|
621 |
+
align-items: center;
|
622 |
+
text-transform: uppercase;
|
623 |
+
cursor: pointer;
|
624 |
+
margin-right: 3px;
|
625 |
+
}
|
626 |
+
|
627 |
+
.xoo-wsc-remove-coupon span {
|
628 |
+
color: red;
|
629 |
+
margin-left: 2px;
|
630 |
+
}
|
631 |
+
|
632 |
+
|
633 |
+
.xoo-wsc-ft-buttons-cont {
|
634 |
+
display: grid;
|
635 |
+
text-align: center;
|
636 |
+
grid-column-gap: 10px;
|
637 |
+
grid-row-gap: 10px;
|
638 |
+
}
|
639 |
+
|
640 |
+
a.xoo-wsc-ft-btn {
|
641 |
+
display: flex;
|
642 |
+
align-items: center;
|
643 |
+
justify-content: center;
|
644 |
+
}
|
645 |
+
|
646 |
+
a.xoo-wsc-ft-btn:not(.btn):not(.button) {
|
647 |
+
padding: 10px;
|
648 |
+
}
|
649 |
+
|
650 |
+
.xoo-wsc-ft-buttons-cont a.xoo-wsc-ft-btn:only-child {
|
651 |
+
grid-column: 1/-1;
|
652 |
+
}
|
653 |
+
|
654 |
+
|
655 |
+
/** FOOTER Totals **/
|
656 |
+
.xoo-wsc-ft-totals {
|
657 |
+
width: 100%;
|
658 |
+
padding: 10px 0;
|
659 |
+
}
|
660 |
+
|
661 |
+
.xoo-wsc-ft-amt {
|
662 |
+
padding: 3px;
|
663 |
+
display: flex;
|
664 |
+
justify-content: space-between;
|
665 |
+
}
|
666 |
+
|
667 |
+
.xoo-wsc-ft-amt-value .xoo-wsc-toggle-slider {
|
668 |
+
cursor: pointer;
|
669 |
+
margin-left: 5px;
|
670 |
+
}
|
671 |
+
|
672 |
+
span.xoo-wsc-ft-amt-label {
|
673 |
+
font-weight: 600;
|
674 |
+
}
|
675 |
+
|
676 |
+
.xoo-wsc-toggle-slider {
|
677 |
+
cursor: pointer;
|
678 |
+
}
|
679 |
+
|
680 |
+
.xoo-wsc-ft-amt-shipping .xoo-wsc-toggle-slider span {
|
681 |
+
margin-left: 5px;
|
682 |
+
}
|
683 |
+
|
684 |
+
.xoo-wsc-ft-amt-label {
|
685 |
+
flex-grow: 1;
|
686 |
+
padding-right: 10px;
|
687 |
+
}
|
688 |
+
|
689 |
+
.xoo-wsc-ft-amt-value {
|
690 |
+
text-align: right;
|
691 |
+
}
|
692 |
+
|
693 |
+
.xoo-wsc-ft-amt.less {
|
694 |
+
color: #4CAF50;
|
695 |
+
}
|
696 |
+
|
697 |
+
.xoo-wsc-ft-amt-total {
|
698 |
+
border-top: 1px dashed #9E9E9E;
|
699 |
+
margin-top: 5px;
|
700 |
+
padding-top: 5px;
|
701 |
+
}
|
702 |
+
|
703 |
+
/** SUGGESTED PRODUCTS **/
|
704 |
+
.xoo-wsc-sp-product {
|
705 |
+
padding: 0 15px;
|
706 |
+
}
|
707 |
+
|
708 |
+
.xoo-wsc-sp-container {
|
709 |
+
margin: 10px 0;
|
710 |
+
}
|
711 |
+
|
712 |
+
|
713 |
+
.xoo-wsc-sp-left-col img {
|
714 |
+
width: 100%;
|
715 |
+
height: auto;
|
716 |
+
}
|
717 |
+
|
718 |
+
.xoo-wsc-sp-product {
|
719 |
+
display: flex;
|
720 |
+
align-items: center;
|
721 |
+
padding: 10px 20px;
|
722 |
+
align-self: stretch;
|
723 |
+
}
|
724 |
+
|
725 |
+
.xoo-wsc-sp-right-col {
|
726 |
+
padding-left: 20px;
|
727 |
+
position: relative;
|
728 |
+
display: flex;
|
729 |
+
flex-direction: column;
|
730 |
+
justify-content: space-between;
|
731 |
+
flex-grow: 1;
|
732 |
+
justify-content: center;
|
733 |
+
}
|
734 |
+
|
735 |
+
.xoo-wsc-sp-right-col > span {
|
736 |
+
display: block;
|
737 |
+
}
|
738 |
+
|
739 |
+
span.xoo-wsc-sp-atc a.button {
|
740 |
+
text-transform: uppercase;
|
741 |
+
font-size: 12px;
|
742 |
+
}
|
743 |
+
|
744 |
+
span.xoo-wsc-sp-atc a.button span {
|
745 |
+
margin-right: 5px;
|
746 |
+
}
|
747 |
+
|
748 |
+
.xoo-wsc-sp-wide .xoo-wsc-sp-rc-bottom {
|
749 |
+
display: flex;
|
750 |
+
flex-wrap: wrap;
|
751 |
+
justify-content: space-between;
|
752 |
+
align-items: center;
|
753 |
+
}
|
754 |
+
|
755 |
+
.xoo-wsc-sp-container .lSAction > .lSPrev {
|
756 |
+
background-image: url(../images/arrow-left.png);
|
757 |
+
background-position: center center;
|
758 |
+
left: 0;
|
759 |
+
}
|
760 |
+
|
761 |
+
.xoo-wsc-sp-container .lSAction > .lSNext {
|
762 |
+
background-image: url(../images/arrow-right.png);
|
763 |
+
background-position: center center;
|
764 |
+
right: 0;
|
765 |
+
}
|
766 |
+
|
767 |
+
.xoo-wsc-sp-container .lSAction > a {
|
768 |
+
background-size: 50%;
|
769 |
+
background-repeat: no-repeat;
|
770 |
+
max-width: 22px;
|
771 |
+
}
|
772 |
+
|
773 |
+
.xoo-wsc-sp-narrow .xoo-wsc-sp-rc-bottom {
|
774 |
+
display: flex;
|
775 |
+
flex-direction: column;
|
776 |
+
justify-content: space-around;
|
777 |
+
flex-grow: 1;
|
778 |
+
}
|
779 |
+
|
780 |
+
.xoo-wsc-sp-container ul.lSPager.lSpg {
|
781 |
+
display: none;
|
782 |
+
}
|
783 |
+
|
784 |
+
.xoo-wsc-sp-rc-top {
|
785 |
+
padding-bottom: 6px;
|
786 |
+
}
|
787 |
+
|
788 |
+
.xoo-wsc-payment-btns {
|
789 |
+
display: flex;
|
790 |
+
align-items: center;
|
791 |
+
justify-content: center;
|
792 |
+
}
|
793 |
+
|
794 |
+
|
795 |
+
.xoo-wsc-payment-btns p {
|
796 |
+
padding: 0!important;
|
797 |
+
margin: 0!important;
|
798 |
+
display: block;
|
799 |
+
}
|
800 |
+
|
801 |
+
.xoo-wsc-payment-btns > * {
|
802 |
+
flex-grow: 1;
|
803 |
+
margin-top: 8px!important;
|
804 |
+
}
|
805 |
+
|
806 |
+
.xoo-wsc-payment-btns .widget_shopping_cart {
|
807 |
+
margin: 0;
|
808 |
+
padding: 0;
|
809 |
+
}
|
810 |
+
|
811 |
+
/* Bundled product */
|
812 |
+
|
813 |
+
.xoo-wsc-product.xoo-wsc-is-parent {
|
814 |
+
border-bottom: 0;
|
815 |
+
padding-bottom: 0;
|
816 |
+
}
|
817 |
+
|
818 |
+
.xoo-wsc-product.xoo-wsc-is-child img {
|
819 |
+
max-width: 50px;
|
820 |
+
margin-left: auto;
|
821 |
+
float: right;
|
822 |
+
}
|
823 |
+
|
824 |
+
.xoo-wsc-product.xoo-wsc-is-child {
|
825 |
+
padding-top: 5px;
|
826 |
+
}
|
827 |
+
|
828 |
+
.xoo-wsc-empty-cart {
|
829 |
+
padding: 30px;
|
830 |
+
display: flex;
|
831 |
+
flex-direction: column;
|
832 |
+
align-items: center;
|
833 |
+
}
|
834 |
+
|
835 |
+
.xoo-wsc-empty-cart > * {
|
836 |
+
margin-bottom: 20px;
|
837 |
+
}
|
838 |
+
|
839 |
+
/** Free **/
|
840 |
+
span.xoo-wsc-ft-amt-label:after {
|
841 |
+
content: ":";
|
842 |
+
}
|
843 |
+
|
844 |
+
.xoo-wsc-ft-amt {
|
845 |
+
display: table;
|
846 |
+
margin: 0 auto;
|
847 |
+
font-weight: 600;
|
848 |
+
}
|
849 |
+
|
850 |
+
span.xoo-wsc-ft-amt-label {
|
851 |
+
padding-right: 5px;
|
852 |
+
}
|
assets/images/arrow-left.png
ADDED
Binary file
|
assets/images/arrow-right.png
ADDED
Binary file
|
assets/js/xoo-wsc-main.js
ADDED
@@ -0,0 +1,932 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($){
|
2 |
+
|
3 |
+
var isCartPage = xoo_wsc_params.isCart == '1',
|
4 |
+
isCheckoutPage = xoo_wsc_params.isCheckout == '1';
|
5 |
+
|
6 |
+
var get_wcurl = function( endpoint ) {
|
7 |
+
return xoo_wsc_params.wc_ajax_url.toString().replace(
|
8 |
+
'%%endpoint%%',
|
9 |
+
endpoint
|
10 |
+
);
|
11 |
+
};
|
12 |
+
|
13 |
+
|
14 |
+
class Notice{
|
15 |
+
|
16 |
+
constructor( $modal ){
|
17 |
+
this.$modal = $modal;
|
18 |
+
this.timeout = null;
|
19 |
+
}
|
20 |
+
|
21 |
+
add( notice, type = 'success', clearPrevious = true ){
|
22 |
+
|
23 |
+
var $noticeCont = this.$modal.find('.xoo-wsc-notice-container');
|
24 |
+
|
25 |
+
if( clearPrevious ){
|
26 |
+
$noticeCont.html('');
|
27 |
+
}
|
28 |
+
|
29 |
+
var noticeHTML = type === 'success' ? xoo_wsc_params.html.successNotice.toString().replace( '%s%', notice ) : xoo_wsc_params.html.errorNotice.toString().replace( '%s%', notice );
|
30 |
+
|
31 |
+
$noticeCont.html( noticeHTML );
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
showNotification(){
|
36 |
+
|
37 |
+
var $noticeCont = this.$modal.find('.xoo-wsc-notice-container');
|
38 |
+
|
39 |
+
if( !$noticeCont.length || $noticeCont.children().length === 0 ) return;
|
40 |
+
|
41 |
+
$noticeCont.slideDown();
|
42 |
+
|
43 |
+
clearTimeout(this.timeout);
|
44 |
+
|
45 |
+
this.timeout = setTimeout(function(){
|
46 |
+
$noticeCont.slideUp('slow',function(){
|
47 |
+
//$noticeCont.html('');
|
48 |
+
});
|
49 |
+
},xoo_wsc_params.notificationTime )
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
hideNotification(){
|
54 |
+
this.$modal.find('.xoo-wsc-notice-container').hide();
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
class Container{
|
60 |
+
|
61 |
+
constructor( $modal, container ){
|
62 |
+
this.$modal = $modal;
|
63 |
+
this.container = container || 'cart';
|
64 |
+
this.notice = new Notice( this.$modal );
|
65 |
+
}
|
66 |
+
|
67 |
+
eventHandlers(){
|
68 |
+
$(document.body).on( 'wc_fragments_refreshed updated_checkout', this.onCartUpdate.bind(this) );
|
69 |
+
}
|
70 |
+
|
71 |
+
onCartUpdate(){
|
72 |
+
this.unblock();
|
73 |
+
this.notice.showNotification();
|
74 |
+
}
|
75 |
+
|
76 |
+
setAjaxData( data, noticeSection ){
|
77 |
+
|
78 |
+
var ajaxData = {
|
79 |
+
container: this.container,
|
80 |
+
noticeSection: noticeSection || this.noticeSection || this.container,
|
81 |
+
isCheckout: isCheckoutPage,
|
82 |
+
isCart: isCartPage
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
if( typeof data === 'object' ){
|
87 |
+
|
88 |
+
$.extend( ajaxData, data );
|
89 |
+
|
90 |
+
}
|
91 |
+
else{
|
92 |
+
|
93 |
+
var serializedData = data;
|
94 |
+
|
95 |
+
$.each( ajaxData, function( key, value ){
|
96 |
+
serializedData += ( '&'+key+'='+value );
|
97 |
+
} )
|
98 |
+
|
99 |
+
ajaxData = serializedData;
|
100 |
+
|
101 |
+
}
|
102 |
+
|
103 |
+
return ajaxData;
|
104 |
+
}
|
105 |
+
|
106 |
+
|
107 |
+
toggle( type ){
|
108 |
+
|
109 |
+
var $activeEls = this.$modal.add( 'body' ).add('html'),
|
110 |
+
activeClass = 'xoo-wsc-'+ this.container +'-active';
|
111 |
+
|
112 |
+
if( type === 'show' ){
|
113 |
+
$activeEls.addClass(activeClass);
|
114 |
+
}
|
115 |
+
else if( type === 'hide' ){
|
116 |
+
$activeEls.removeClass(activeClass);
|
117 |
+
}
|
118 |
+
else{
|
119 |
+
$activeEls.toggleClass(activeClass);
|
120 |
+
}
|
121 |
+
|
122 |
+
$(document.body).trigger( 'xoo_wsc_' + this.container + '_toggled', [ type ] );
|
123 |
+
|
124 |
+
this.notice.hideNotification();
|
125 |
+
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
block(){
|
130 |
+
this.$modal.addClass('xoo-wsc-loading');
|
131 |
+
}
|
132 |
+
|
133 |
+
unblock(){
|
134 |
+
this.$modal.removeClass('xoo-wsc-loading');
|
135 |
+
}
|
136 |
+
|
137 |
+
|
138 |
+
refreshMyFragments(){
|
139 |
+
|
140 |
+
if( xoo_wsc_params.refreshCart === "yes" && typeof wc_cart_fragments_params !== 'undefined' ){
|
141 |
+
$( document.body ).trigger( 'wc_fragment_refresh' );
|
142 |
+
return;
|
143 |
+
}
|
144 |
+
|
145 |
+
this.block();
|
146 |
+
|
147 |
+
$.ajax({
|
148 |
+
url: get_wcurl( 'xoo_wsc_refresh_fragments' ),
|
149 |
+
type: 'POST',
|
150 |
+
context: this,
|
151 |
+
data: {},
|
152 |
+
success: function( response ){
|
153 |
+
this.updateFragments(response);
|
154 |
+
},
|
155 |
+
complete: function(){
|
156 |
+
this.unblock();
|
157 |
+
}
|
158 |
+
})
|
159 |
+
|
160 |
+
}
|
161 |
+
|
162 |
+
|
163 |
+
updateCartCheckoutPage(){
|
164 |
+
|
165 |
+
//Refresh checkout page
|
166 |
+
if( isCheckoutPage ){
|
167 |
+
if( $( 'form.checkout' ).length === 0 ){
|
168 |
+
location.reload();
|
169 |
+
return;
|
170 |
+
}
|
171 |
+
$(document.body).trigger("update_checkout");
|
172 |
+
}
|
173 |
+
|
174 |
+
//Refresh Cart page
|
175 |
+
if( isCartPage ){
|
176 |
+
$(document.body).trigger("wc_update_cart");
|
177 |
+
}
|
178 |
+
|
179 |
+
}
|
180 |
+
|
181 |
+
updateFragments( response ){
|
182 |
+
|
183 |
+
console.log('updated');
|
184 |
+
|
185 |
+
if( response.fragments ){
|
186 |
+
|
187 |
+
$( document.body ).trigger( 'xoo_wsc_before_loading_fragments', [ response ] );
|
188 |
+
|
189 |
+
this.block();
|
190 |
+
|
191 |
+
//Set fragments
|
192 |
+
$.each( response.fragments, function( key, value ) {
|
193 |
+
$( key ).replaceWith( value );
|
194 |
+
});
|
195 |
+
|
196 |
+
if( typeof wc_cart_fragments_params !== 'undefined' && ( 'sessionStorage' in window && window.sessionStorage !== null ) ){
|
197 |
+
|
198 |
+
sessionStorage.setItem( wc_cart_fragments_params.fragment_name, JSON.stringify( response.fragments ) );
|
199 |
+
localStorage.setItem( wc_cart_fragments_params.cart_hash_key, response.cart_hash );
|
200 |
+
sessionStorage.setItem( wc_cart_fragments_params.cart_hash_key, response.cart_hash );
|
201 |
+
|
202 |
+
if ( response.cart_hash ) {
|
203 |
+
sessionStorage.setItem( 'wc_cart_created', ( new Date() ).getTime() );
|
204 |
+
}
|
205 |
+
|
206 |
+
}
|
207 |
+
|
208 |
+
$( document.body ).trigger( 'wc_fragments_refreshed' );
|
209 |
+
|
210 |
+
this.unblock();
|
211 |
+
|
212 |
+
}
|
213 |
+
|
214 |
+
if( xoo_wsc_params.refreshCart === "yes" && typeof wc_cart_fragments_params !== 'undefined' ){
|
215 |
+
this.block();
|
216 |
+
$( document.body ).trigger( 'wc_fragment_refresh' );
|
217 |
+
return;
|
218 |
+
}
|
219 |
+
|
220 |
+
}
|
221 |
+
|
222 |
+
}
|
223 |
+
|
224 |
+
|
225 |
+
class Cart extends Container{
|
226 |
+
|
227 |
+
constructor( $modal ){
|
228 |
+
|
229 |
+
super( $modal, 'cart' );
|
230 |
+
|
231 |
+
this.baseQty = 1;
|
232 |
+
this.qtyUpdateDelay = null;
|
233 |
+
|
234 |
+
this.refreshFragmentsOnPageLoad();
|
235 |
+
this.eventHandlers();
|
236 |
+
this.initSlider();
|
237 |
+
|
238 |
+
}
|
239 |
+
|
240 |
+
|
241 |
+
refreshFragmentsOnPageLoad(){
|
242 |
+
setTimeout(function(){
|
243 |
+
this.refreshMyFragments();
|
244 |
+
}.bind(this), xoo_wsc_params.fetchDelay )
|
245 |
+
}
|
246 |
+
|
247 |
+
eventHandlers(){
|
248 |
+
|
249 |
+
super.eventHandlers();
|
250 |
+
|
251 |
+
this.$modal.on( 'click', '.xoo-wsc-chng', this.toggleQty.bind(this) );
|
252 |
+
this.$modal.on( 'change', '.xoo-wsc-qty', this.changeInputQty.bind(this) );
|
253 |
+
this.$modal.on( 'click', '.xoo-wsc-undo-item', this.undoItem.bind(this) );
|
254 |
+
this.$modal.on( 'focusin', '.xoo-wsc-qty', this.saveQtyFocus.bind(this) );
|
255 |
+
this.$modal.on( 'click', '.xoo-wsc-smr-del', this.deleteIconClick.bind(this) );
|
256 |
+
this.$modal.on( 'click', '.xoo-wsch-close, .xoo-wsc-opac, .xoo-wsc-cart-close', this.closeCartOnClick.bind(this) );
|
257 |
+
this.$modal.on( 'click', '.xoo-wsc-basket', this.toggle.bind(this) );
|
258 |
+
|
259 |
+
$(document.body).on( 'xoo_wsc_cart_updated', this.updateCartCheckoutPage.bind(this) );
|
260 |
+
$(document.body).on( 'click', 'a.added_to_cart, .xoo-wsc-cart-trigger', this.openCart.bind(this) );
|
261 |
+
$(document.body).on( 'added_to_cart', this.addedToCart.bind(this) );
|
262 |
+
|
263 |
+
if( xoo_wsc_params.autoOpenCart === 'yes' && xoo_wsc_params.addedToCart === 'yes'){
|
264 |
+
this.openCart();
|
265 |
+
}
|
266 |
+
|
267 |
+
if( xoo_wsc_params.ajaxAddToCart === 'yes' ){
|
268 |
+
$(document.body).on( 'submit', 'form.cart', this.addToCartFormSubmit.bind(this) );
|
269 |
+
}
|
270 |
+
|
271 |
+
if( typeof wc_cart_fragments_params === 'undefined' ){
|
272 |
+
$( window ).on( 'pageshow' , this.onPageShow );
|
273 |
+
}
|
274 |
+
|
275 |
+
|
276 |
+
if( isCheckoutPage || isCartPage ){
|
277 |
+
$(document.body).on( 'updated_shipping_method', this.refreshMyFragments.bind(this) );
|
278 |
+
}
|
279 |
+
|
280 |
+
//Animate shipping bar
|
281 |
+
$(document.body).on( 'xoo_wsc_before_loading_fragments', this.storeShippingBarWidth.bind(this) );
|
282 |
+
|
283 |
+
}
|
284 |
+
|
285 |
+
|
286 |
+
openCart(e){
|
287 |
+
if( e ){
|
288 |
+
e.preventDefault();
|
289 |
+
}
|
290 |
+
this.toggle('show');
|
291 |
+
}
|
292 |
+
|
293 |
+
addToCartFormSubmit(e){
|
294 |
+
|
295 |
+
var $form = $(e.currentTarget);
|
296 |
+
|
297 |
+
if( $form.closest('.product').hasClass('product-type-external') ) return;
|
298 |
+
|
299 |
+
e.preventDefault();
|
300 |
+
|
301 |
+
var $button = $form.find( 'button[type="submit"]'),
|
302 |
+
productData = $form.serializeArray(),
|
303 |
+
hasProductId = false;
|
304 |
+
|
305 |
+
//Check for woocommerce custom quantity code
|
306 |
+
//https://docs.woocommerce.com/document/override-loop-template-and-show-quantities-next-to-add-to-cart-buttons/
|
307 |
+
$.each( productData, function( key, form_item ){
|
308 |
+
if( form_item.name === 'productID' || form_item.name === 'add-to-cart' ){
|
309 |
+
if( form_item.value ){
|
310 |
+
hasProductId = true;
|
311 |
+
return false;
|
312 |
+
}
|
313 |
+
}
|
314 |
+
})
|
315 |
+
|
316 |
+
//If no product id found , look for the form action URL
|
317 |
+
if( !hasProductId ){
|
318 |
+
var is_url = $form.attr('action').match(/add-to-cart=([0-9]+)/),
|
319 |
+
productID = is_url ? is_url[1] : false;
|
320 |
+
}
|
321 |
+
|
322 |
+
// if button as name add-to-cart get it and add to form
|
323 |
+
if( $button.attr('name') && $button.attr('name') == 'add-to-cart' && $button.attr('value') ){
|
324 |
+
var productID = $button.attr('value');
|
325 |
+
}
|
326 |
+
|
327 |
+
if( productID ){
|
328 |
+
productData.push({name: 'add-to-cart', value: productID});
|
329 |
+
}
|
330 |
+
|
331 |
+
productData.push({name: 'action', value: 'xoo_wsc_add_to_cart'});
|
332 |
+
|
333 |
+
this.addToCartAjax( $button, productData );//Ajax add to cart
|
334 |
+
}
|
335 |
+
|
336 |
+
|
337 |
+
addToCartAjax( $button, productData ){
|
338 |
+
|
339 |
+
this.block();
|
340 |
+
|
341 |
+
$button.addClass('loading');
|
342 |
+
|
343 |
+
// Trigger event.
|
344 |
+
$( document.body ).trigger( 'adding_to_cart', [ $button, productData ] );
|
345 |
+
|
346 |
+
$.ajax({
|
347 |
+
url: get_wcurl( 'xoo_wsc_add_to_cart' ),
|
348 |
+
type: 'POST',
|
349 |
+
context: this,
|
350 |
+
data: $.param(productData),
|
351 |
+
success: function(response){
|
352 |
+
|
353 |
+
if(response.fragments){
|
354 |
+
// Trigger event so themes can refresh other areas.
|
355 |
+
$( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $button ] );
|
356 |
+
}else{
|
357 |
+
window.location.reload();
|
358 |
+
}
|
359 |
+
|
360 |
+
},
|
361 |
+
complete: function(){
|
362 |
+
this.unblock();
|
363 |
+
$button
|
364 |
+
.removeClass('loading')
|
365 |
+
.addClass('added');
|
366 |
+
}
|
367 |
+
})
|
368 |
+
}
|
369 |
+
|
370 |
+
addedToCart( e, response, hash, $button ){
|
371 |
+
|
372 |
+
this.updateFragments( { fragments: response } );
|
373 |
+
|
374 |
+
this.onCartUpdate();
|
375 |
+
|
376 |
+
var _this = this;
|
377 |
+
|
378 |
+
this.flyToCart( $button, function(){
|
379 |
+
if( xoo_wsc_params.autoOpenCart === "yes" ){
|
380 |
+
setTimeout(function(){
|
381 |
+
_this.openCart();
|
382 |
+
},20 )
|
383 |
+
}
|
384 |
+
} );
|
385 |
+
}
|
386 |
+
|
387 |
+
|
388 |
+
flyToCart( $atcEL, callback ){
|
389 |
+
|
390 |
+
var $basket = this.$modal.find('.xoo-wsc-basket').length ? this.$modal.find('.xoo-wsc-basket') : $(document.body).find('.xoo-wsc-sc-cont');
|
391 |
+
|
392 |
+
if( !$basket.length || xoo_wsc_params.flyToCart !== 'yes' ){
|
393 |
+
callback();
|
394 |
+
return;
|
395 |
+
}
|
396 |
+
|
397 |
+
var customDragImgClass = '',
|
398 |
+
$dragIMG = null,
|
399 |
+
$product = $atcEL.parents('.product');
|
400 |
+
|
401 |
+
|
402 |
+
//If has product container
|
403 |
+
if( $product.length ){
|
404 |
+
|
405 |
+
var $productGallery = $product.find('.woocommerce-product-gallery');
|
406 |
+
|
407 |
+
if( customDragImgClass && $product.find( customDragImgClass ).length ){
|
408 |
+
$dragIMG = $product.find( customDragImgClass );
|
409 |
+
}
|
410 |
+
else if( $product.find( 'img[data-xooWscFly="fly"]' ).length ){
|
411 |
+
if( $productGallery.length ){
|
412 |
+
$dragIMG = $productGallery.find( '.flex-active-slide img[data-xooWscFly="fly"]' ).length ? $productGallery.find( '.flex-active-slide img[data-xooWscFly="fly"]' ) : $productGallery.find( 'img[data-xooWscFly="fly"]' )
|
413 |
+
}
|
414 |
+
else{
|
415 |
+
$dragIMG = $product.find( 'img[data-xooWscFly="fly"]' );
|
416 |
+
}
|
417 |
+
}
|
418 |
+
else if( $productGallery.length ){
|
419 |
+
$dragIMG = $productGallery;
|
420 |
+
}
|
421 |
+
else{
|
422 |
+
$dragIMG = $product;
|
423 |
+
}
|
424 |
+
|
425 |
+
}
|
426 |
+
else if( customDragImgClass ){
|
427 |
+
var moveUp = 4;
|
428 |
+
for ( var i = moveUp; i >= 0; i-- ) {
|
429 |
+
var $foundImg = $atcEL.parent().find( customDragImgClass );
|
430 |
+
if( $foundImg.length ){
|
431 |
+
$dragIMG = $foundImg;
|
432 |
+
return false;
|
433 |
+
}
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
|
438 |
+
if( !$dragIMG || !$dragIMG.length ){
|
439 |
+
callback();
|
440 |
+
return;
|
441 |
+
}
|
442 |
+
|
443 |
+
var $imgclone = $dragIMG
|
444 |
+
.clone()
|
445 |
+
.offset({
|
446 |
+
top: $dragIMG.offset().top,
|
447 |
+
left: $dragIMG.offset().left
|
448 |
+
})
|
449 |
+
.addClass( 'xoo-wsc-fly-animating' )
|
450 |
+
.appendTo( $('body') )
|
451 |
+
.animate({
|
452 |
+
'top': $basket.offset().top - 10,
|
453 |
+
'left': $basket.offset().left - 10,
|
454 |
+
'width': 75,
|
455 |
+
'height': 75
|
456 |
+
}, 1000, 'easeInOutExpo' );
|
457 |
+
|
458 |
+
setTimeout(function () {
|
459 |
+
callback()
|
460 |
+
}, 1500 );
|
461 |
+
|
462 |
+
$imgclone.animate({
|
463 |
+
'width': 0,
|
464 |
+
'height': 0
|
465 |
+
}, function () {
|
466 |
+
$(this).detach();
|
467 |
+
});
|
468 |
+
|
469 |
+
}
|
470 |
+
|
471 |
+
|
472 |
+
toggleQty(e){
|
473 |
+
|
474 |
+
var $toggler = $(e.currentTarget),
|
475 |
+
$input = $toggler.siblings('.xoo-wsc-qty');
|
476 |
+
|
477 |
+
if( !$input.length ) return;
|
478 |
+
|
479 |
+
var baseQty = this.baseQty = parseFloat( $input.val() ),
|
480 |
+
step = parseFloat( $input.attr('step') ),
|
481 |
+
action = $toggler.hasClass( 'xoo-wsc-plus' ) ? 'add' : 'less',
|
482 |
+
newQty = action === 'add' ? baseQty + step : baseQty - step;
|
483 |
+
|
484 |
+
|
485 |
+
$input.val(newQty).trigger('change');
|
486 |
+
|
487 |
+
}
|
488 |
+
|
489 |
+
changeInputQty(e){
|
490 |
+
|
491 |
+
this.notice.hideNotification();
|
492 |
+
|
493 |
+
var $_this = this,
|
494 |
+
$input = $(e.currentTarget),
|
495 |
+
newQty = parseFloat( $input.val() ),
|
496 |
+
step = parseFloat( $input.attr('step') ),
|
497 |
+
min = parseFloat( $input.attr('min') ),
|
498 |
+
max = parseFloat( $input.attr('max') ),
|
499 |
+
invalid = false,
|
500 |
+
message = false;
|
501 |
+
|
502 |
+
|
503 |
+
//Validation
|
504 |
+
|
505 |
+
if( isNaN( newQty ) || newQty < 0 || newQty < min ){
|
506 |
+
invalid = true;
|
507 |
+
}
|
508 |
+
else if( newQty > max ){
|
509 |
+
invalid = true;
|
510 |
+
message = xoo_wsc_params.strings.maxQtyError.replace( '%s%', max );
|
511 |
+
}
|
512 |
+
else if( ( newQty % step ) !== 0 ){
|
513 |
+
invalid = true;
|
514 |
+
message = xoo_wsc_params.strings.stepQtyError.replace( '%s%', step );
|
515 |
+
}
|
516 |
+
|
517 |
+
//Set back to default quantity
|
518 |
+
if( invalid ){
|
519 |
+
$input.val( this.baseQty );
|
520 |
+
if( message ){
|
521 |
+
this.notice.add( message, 'error' );
|
522 |
+
this.notice.showNotification();
|
523 |
+
}
|
524 |
+
return;
|
525 |
+
}
|
526 |
+
|
527 |
+
//Update
|
528 |
+
$input.val( newQty );
|
529 |
+
|
530 |
+
clearTimeout( this.qtyUpdateDelay );
|
531 |
+
|
532 |
+
this.qtyUpdateDelay = setTimeout(function(){
|
533 |
+
$_this.updateItemQty( $input.parents('.xoo-wsc-product').data('key'), newQty )
|
534 |
+
}, xoo_wsc_params.qtyUpdateDelay );
|
535 |
+
|
536 |
+
|
537 |
+
}
|
538 |
+
|
539 |
+
updateItemQty( cart_key, qty ){
|
540 |
+
|
541 |
+
if( !cart_key || qty === undefined ) return;
|
542 |
+
|
543 |
+
this.block();
|
544 |
+
|
545 |
+
var formData = {
|
546 |
+
cart_key: cart_key,
|
547 |
+
qty: qty
|
548 |
+
}
|
549 |
+
|
550 |
+
$.ajax({
|
551 |
+
url: get_wcurl( 'xoo_wsc_update_item_quantity' ),
|
552 |
+
type: 'POST',
|
553 |
+
context: this,
|
554 |
+
data: this.setAjaxData(formData),
|
555 |
+
success: function(response){
|
556 |
+
this.updateFragments( response );
|
557 |
+
$(document.body).trigger( 'xoo_wsc_quantity_updated', [response] );
|
558 |
+
$(document.body).trigger( 'xoo_wsc_cart_updated', [response] );
|
559 |
+
this.unblock();
|
560 |
+
}
|
561 |
+
|
562 |
+
})
|
563 |
+
}
|
564 |
+
|
565 |
+
|
566 |
+
closeCartOnClick(e){
|
567 |
+
e.preventDefault();
|
568 |
+
this.toggle( 'hide' );
|
569 |
+
}
|
570 |
+
|
571 |
+
|
572 |
+
saveQtyFocus(e){
|
573 |
+
this.baseQty = $(e.currentTarget).val();
|
574 |
+
}
|
575 |
+
|
576 |
+
|
577 |
+
onPageShow(e){
|
578 |
+
if ( e.originalEvent.persisted ) {
|
579 |
+
this.refreshMyFragments();
|
580 |
+
$( document.body ).trigger( 'wc_fragment_refresh' );
|
581 |
+
}
|
582 |
+
}
|
583 |
+
|
584 |
+
deleteIconClick(e){
|
585 |
+
this.updateItemQty( $( e.currentTarget ).parents('.xoo-wsc-product').data('key'), 0 );
|
586 |
+
}
|
587 |
+
|
588 |
+
undoItem(e){
|
589 |
+
|
590 |
+
var $undo = $(e.currentTarget),
|
591 |
+
formData = {
|
592 |
+
cart_key: $undo.data('key')
|
593 |
+
}
|
594 |
+
|
595 |
+
this.block();
|
596 |
+
|
597 |
+
$.ajax({
|
598 |
+
url: get_wcurl('xoo_wsc_undo_item'),
|
599 |
+
type: 'POST',
|
600 |
+
context: this,
|
601 |
+
data: this.setAjaxData(formData),
|
602 |
+
success: function(response){
|
603 |
+
this.updateFragments( response );
|
604 |
+
$(document.body).trigger( 'xoo_wsc_item_restored', [response] );
|
605 |
+
$(document.body).trigger( 'xoo_wsc_cart_updated', [response] );
|
606 |
+
this.unblock();
|
607 |
+
}
|
608 |
+
|
609 |
+
})
|
610 |
+
}
|
611 |
+
|
612 |
+
storeShippingBarWidth( e ){
|
613 |
+
var $bar = $(document.body).find( '.xoo-wsc-sb-bar > span' );
|
614 |
+
if( !$bar.length ) return;
|
615 |
+
this.shippingBarWidth = $bar.prop('style').width;
|
616 |
+
}
|
617 |
+
|
618 |
+
onCartUpdate(){
|
619 |
+
super.onCartUpdate();
|
620 |
+
this.animateShippingBar();
|
621 |
+
this.initSlider();
|
622 |
+
this.showBasket();
|
623 |
+
}
|
624 |
+
|
625 |
+
showBasket(){
|
626 |
+
|
627 |
+
var $basket = $('.xoo-wsc-basket'),
|
628 |
+
show = xoo_wsc_params.showBasket;
|
629 |
+
|
630 |
+
if( show === "always_show" ){
|
631 |
+
$basket.show();
|
632 |
+
}
|
633 |
+
else if( show === "hide_empty" ){
|
634 |
+
if( this.$modal.find('.xoo-wsc-product').length ){
|
635 |
+
$basket.show();
|
636 |
+
}
|
637 |
+
else{
|
638 |
+
$basket.hide();
|
639 |
+
}
|
640 |
+
}
|
641 |
+
else{
|
642 |
+
$basket.hide();
|
643 |
+
}
|
644 |
+
}
|
645 |
+
|
646 |
+
animateShippingBar(){
|
647 |
+
if( isCartPage || isCheckoutPage ) return;
|
648 |
+
var $bar = $(document.body).find( '.xoo-wsc-sb-bar > span' );
|
649 |
+
if( !$bar.length || !this.shippingBarWidth ) return;
|
650 |
+
var newWidth = $bar.prop('style').width;
|
651 |
+
$bar
|
652 |
+
.width( this.shippingBarWidth )
|
653 |
+
.animate({ width: newWidth }, 400, 'linear')
|
654 |
+
}
|
655 |
+
|
656 |
+
|
657 |
+
initSlider(){
|
658 |
+
|
659 |
+
if( !$.isFunction( $.fn.lightSlider ) ) return;
|
660 |
+
|
661 |
+
$('ul.xoo-wsc-sp-slider').lightSlider({
|
662 |
+
item: 1,
|
663 |
+
});
|
664 |
+
|
665 |
+
}
|
666 |
+
|
667 |
+
}
|
668 |
+
|
669 |
+
|
670 |
+
|
671 |
+
class Slider extends Container{
|
672 |
+
|
673 |
+
constructor( $modal ){
|
674 |
+
|
675 |
+
super( $modal, 'slider' );
|
676 |
+
|
677 |
+
if( xoo_wsc_params.sliderAutoClose ) this.noticeSection = 'cart';
|
678 |
+
|
679 |
+
this.eventHandlers();
|
680 |
+
|
681 |
+
this.shipping = xoo_wsc_params.shippingEnabled ? Shipping.init( this ) : null;
|
682 |
+
}
|
683 |
+
|
684 |
+
eventHandlers(){
|
685 |
+
|
686 |
+
super.eventHandlers();
|
687 |
+
|
688 |
+
|
689 |
+
$( document.body ).on( 'click', '.xoo-wsc-toggle-slider', this.triggerSlider.bind(this) );
|
690 |
+
$( document.body ).on( 'xoo_wsc_cart_toggled', this.closeSliderOnCartClose.bind(this) );
|
691 |
+
|
692 |
+
if( xoo_wsc_params.sliderAutoClose ){
|
693 |
+
$( document.body ).on( 'xoo_wsc_coupon_applied xoo_wsc_shipping_calculated updated_shipping_method xoo_wsc_coupon_removed', this.closeSlider.bind(this) );
|
694 |
+
}
|
695 |
+
|
696 |
+
this.$modal.on( 'submit', 'form.xoo-wsc-sl-apply-coupon', this.submitCouponForm.bind(this) );
|
697 |
+
this.$modal.on( 'click', '.xoo-wsc-coupon-apply-btn', this.applyCouponFromBtn.bind(this) );
|
698 |
+
$(document.body).on( 'click', '.xoo-wsc-remove-coupon', this.removeCoupon.bind(this) );
|
699 |
+
}
|
700 |
+
|
701 |
+
|
702 |
+
removeCoupon(e){
|
703 |
+
|
704 |
+
e.preventDefault();
|
705 |
+
|
706 |
+
var $removeEl = $(e.currentTarget),
|
707 |
+
coupon = $removeEl.data('code'),
|
708 |
+
formData = {
|
709 |
+
coupon: coupon,
|
710 |
+
};
|
711 |
+
|
712 |
+
this.block();
|
713 |
+
|
714 |
+
$.ajax( {
|
715 |
+
url: get_wcurl( 'xoo_wsc_remove_coupon' ),
|
716 |
+
type: 'POST',
|
717 |
+
context: this,
|
718 |
+
data: this.setAjaxData( formData, cart.$modal.find( $removeEl ).length ? 'cart' : 'slider' ),
|
719 |
+
success: function( response ) {
|
720 |
+
this.updateFragments(response);
|
721 |
+
},
|
722 |
+
complete: function() {
|
723 |
+
this.unblock();
|
724 |
+
this.updateCartCheckoutPage();
|
725 |
+
$( document.body ).trigger( 'xoo_wsc_coupon_removed' );
|
726 |
+
}
|
727 |
+
} );
|
728 |
+
}
|
729 |
+
|
730 |
+
onCartUpdate(){
|
731 |
+
super.onCartUpdate();
|
732 |
+
this.toggleContent();
|
733 |
+
}
|
734 |
+
|
735 |
+
closeSlider(){
|
736 |
+
this.toggle('hide');
|
737 |
+
}
|
738 |
+
|
739 |
+
|
740 |
+
applyCouponFromBtn(e){
|
741 |
+
this.applyCoupon( $(e.currentTarget).val() );
|
742 |
+
}
|
743 |
+
|
744 |
+
submitCouponForm(e){
|
745 |
+
|
746 |
+
e.preventDefault();
|
747 |
+
|
748 |
+
var $form = $(e.currentTarget);
|
749 |
+
|
750 |
+
this.applyCoupon( $form.find('input[name="xoo-wsc-slcf-input"]').val() );
|
751 |
+
|
752 |
+
}
|
753 |
+
|
754 |
+
|
755 |
+
closeSliderOnCartClose(e){
|
756 |
+
|
757 |
+
var $this = $(e.currentTarget);
|
758 |
+
|
759 |
+
if( !cart.$modal.hasClass('xoo-wsc-cart-active') ){
|
760 |
+
this.toggle('hide');
|
761 |
+
}
|
762 |
+
|
763 |
+
}
|
764 |
+
|
765 |
+
|
766 |
+
triggerSlider(e){
|
767 |
+
|
768 |
+
var $toggler = $(e.currentTarget),
|
769 |
+
slider = $toggler.data('slider');
|
770 |
+
|
771 |
+
if( slider === 'shipping' && isCheckoutPage ){
|
772 |
+
this.notice.add( xoo_wsc_params.strings.calculateCheckout, 'error' );
|
773 |
+
this.notice.showNotification();
|
774 |
+
return;
|
775 |
+
}
|
776 |
+
|
777 |
+
|
778 |
+
this.$modal.attr( 'data-slider', slider );
|
779 |
+
|
780 |
+
this.toggle();
|
781 |
+
|
782 |
+
this.toggleContent();
|
783 |
+
}
|
784 |
+
|
785 |
+
|
786 |
+
toggleContent(){
|
787 |
+
|
788 |
+
var activeSlider = '';
|
789 |
+
|
790 |
+
$('.xoo-wsc-sl-content').hide();
|
791 |
+
|
792 |
+
var activeSlider = this.$modal.attr('data-slider'),
|
793 |
+
$toggleEl = $('.xoo-wsc-sl-content[data-slider="'+activeSlider+'"]');
|
794 |
+
|
795 |
+
if( $toggleEl.length ) $toggleEl.show();
|
796 |
+
|
797 |
+
$( document.body ).trigger( 'xoo_wsc_slider_data_toggled', [activeSlider] );
|
798 |
+
}
|
799 |
+
|
800 |
+
|
801 |
+
applyCoupon( coupon ){
|
802 |
+
|
803 |
+
if( !coupon ){
|
804 |
+
this.notice.add( xoo_wsc_params.strings.couponEmpty, 'error' );
|
805 |
+
this.notice.showNotification();
|
806 |
+
return;
|
807 |
+
}
|
808 |
+
|
809 |
+
this.block();
|
810 |
+
|
811 |
+
var formData = {
|
812 |
+
'action': 'xoo_wsc_apply_coupon'
|
813 |
+
}
|
814 |
+
|
815 |
+
$.ajax( {
|
816 |
+
url: get_wcurl('xoo_wsc_apply_coupon'),
|
817 |
+
type: 'POST',
|
818 |
+
context: this,
|
819 |
+
data: this.setAjaxData( formData ),
|
820 |
+
success: function( response ) {
|
821 |
+
this.updateFragments(response);
|
822 |
+
},
|
823 |
+
complete: function() {
|
824 |
+
this.unblock();
|
825 |
+
this.updateCartCheckoutPage();
|
826 |
+
$( document.body ).trigger( 'xoo_wsc_coupon_applied' );
|
827 |
+
}
|
828 |
+
} );
|
829 |
+
|
830 |
+
}
|
831 |
+
|
832 |
+
}
|
833 |
+
|
834 |
+
|
835 |
+
|
836 |
+
var Shipping = {
|
837 |
+
|
838 |
+
init: function( slider ){
|
839 |
+
slider.$modal.on( 'change', 'input.xoo-wsc-shipping-method', this.shippingMethodChange );
|
840 |
+
slider.$modal.on( 'submit', 'form.woocommerce-shipping-calculator', this.shippingCalculatorSubmit );
|
841 |
+
slider.$modal.on( 'click', '.shipping-calculator-button', this.toggleCalculator );
|
842 |
+
$(document.body).on( 'wc_fragments_refreshed wc_fragments_loaded xoo_wsc_slider_data_toggled', this.initSelect2 );
|
843 |
+
},
|
844 |
+
|
845 |
+
toggleCalculator: function(e){
|
846 |
+
|
847 |
+
e.preventDefault();
|
848 |
+
e.stopImmediatePropagation();
|
849 |
+
|
850 |
+
$(this).siblings('.shipping-calculator-form').slideToggle();
|
851 |
+
$( document.body ).trigger( 'country_to_state_changed' );
|
852 |
+
},
|
853 |
+
|
854 |
+
shippingCalculatorSubmit: function(e){
|
855 |
+
|
856 |
+
e.preventDefault();
|
857 |
+
e.stopImmediatePropagation();
|
858 |
+
|
859 |
+
var $form = $(this);
|
860 |
+
|
861 |
+
slider.block();
|
862 |
+
|
863 |
+
// Provide the submit button value because wc-form-handler expects it.
|
864 |
+
$( '<input />' )
|
865 |
+
.attr( 'type', 'hidden' )
|
866 |
+
.attr( 'name', 'calc_shipping' )
|
867 |
+
.attr( 'value', 'x' )
|
868 |
+
.appendTo( $form );
|
869 |
+
|
870 |
+
var formData = $form.serialize();
|
871 |
+
|
872 |
+
// Make call to actual form post URL.
|
873 |
+
$.ajax( {
|
874 |
+
url: get_wcurl( 'xoo_wsc_calculate_shipping' ),
|
875 |
+
type: 'POST',
|
876 |
+
context: this,
|
877 |
+
data: slider.setAjaxData(formData),
|
878 |
+
success: function( response ) {
|
879 |
+
slider.updateFragments(response);
|
880 |
+
},
|
881 |
+
complete: function() {
|
882 |
+
slider.unblock();
|
883 |
+
slider.updateCartCheckoutPage();
|
884 |
+
$( document.body ).trigger( 'xoo_wsc_shipping_calculated' );
|
885 |
+
}
|
886 |
+
} );
|
887 |
+
|
888 |
+
},
|
889 |
+
|
890 |
+
shippingMethodChange: function(e){
|
891 |
+
|
892 |
+
e.preventDefault();
|
893 |
+
e.stopImmediatePropagation();
|
894 |
+
|
895 |
+
var shipping_methods = {};
|
896 |
+
|
897 |
+
slider.block();
|
898 |
+
|
899 |
+
$( 'select.shipping_method, :input[name^=xoo-wsc-shipping_method][type=radio]:checked, :input[name^=shipping_method][type=hidden]' ).each( function() {
|
900 |
+
shipping_methods[ $( this ).data( 'index' ) ] = $( this ).val();
|
901 |
+
} );
|
902 |
+
|
903 |
+
var formData = {
|
904 |
+
shipping_method: shipping_methods
|
905 |
+
}
|
906 |
+
|
907 |
+
$.ajax( {
|
908 |
+
type: 'POST',
|
909 |
+
url: get_wcurl( 'xoo_wsc_update_shipping_method' ),
|
910 |
+
data: slider.setAjaxData( formData ),
|
911 |
+
success: function( response ) {
|
912 |
+
slider.updateFragments(response);
|
913 |
+
},
|
914 |
+
complete: function() {
|
915 |
+
slider.unblock();
|
916 |
+
slider.updateCartCheckoutPage();
|
917 |
+
$( document.body ).trigger( 'updated_shipping_method' );
|
918 |
+
}
|
919 |
+
} );
|
920 |
+
|
921 |
+
},
|
922 |
+
|
923 |
+
initSelect2: function(e){
|
924 |
+
$( document.body ).trigger( 'country_to_state_changed' );
|
925 |
+
},
|
926 |
+
}
|
927 |
+
|
928 |
+
|
929 |
+
var cart = new Cart( $('.xoo-wsc-modal') ),
|
930 |
+
slider = new Slider( $('.xoo-wsc-slider-modal') );
|
931 |
+
|
932 |
+
})
|
includes/class-xoo-wsc-activator.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Fired during plugin activation.
|
4 |
-
*
|
5 |
-
* This class defines all code necessary to run during the plugin's activation.
|
6 |
-
*
|
7 |
-
* @since 1.0.0
|
8 |
-
* @package Side Cart WooCommerce
|
9 |
-
*/
|
10 |
-
class xoo_wsc_Activator {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Disable woocommerce ajax add to cart option.
|
14 |
-
*
|
15 |
-
* Store user setting for "Enable ajax add to cart" in an option & disable ajax add to cart.
|
16 |
-
*
|
17 |
-
* @since 1.0.0
|
18 |
-
*/
|
19 |
-
public static function activate() {
|
20 |
-
update_option('woocommerce_enable_ajax_add_to_cart','yes');
|
21 |
-
}
|
22 |
-
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-xoo-wsc-cart.php
ADDED
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly
|
5 |
+
}
|
6 |
+
|
7 |
+
|
8 |
+
class Xoo_Wsc_Cart{
|
9 |
+
|
10 |
+
protected static $_instance = null;
|
11 |
+
|
12 |
+
public $notices = array();
|
13 |
+
public $glSettings;
|
14 |
+
public $coupons = array();
|
15 |
+
public $addedToCart = false;
|
16 |
+
public $bundleItems = array();
|
17 |
+
|
18 |
+
|
19 |
+
public static function get_instance(){
|
20 |
+
if ( is_null( self::$_instance ) ) {
|
21 |
+
self::$_instance = new self();
|
22 |
+
}
|
23 |
+
return self::$_instance;
|
24 |
+
}
|
25 |
+
|
26 |
+
|
27 |
+
public function __construct(){
|
28 |
+
$this->glSettings = xoo_wsc_helper()->get_general_option();
|
29 |
+
$this->hooks();
|
30 |
+
}
|
31 |
+
|
32 |
+
public function hooks(){
|
33 |
+
add_action( 'wc_ajax_xoo_wsc_update_item_quantity', array( $this, 'update_item_quantity' ) );
|
34 |
+
|
35 |
+
add_action( 'wc_ajax_xoo_wsc_refresh_fragments', array( $this, 'get_refreshed_fragments' ) );
|
36 |
+
|
37 |
+
add_filter( 'woocommerce_add_to_cart_fragments', array( $this, 'set_ajax_fragments' ) );
|
38 |
+
|
39 |
+
add_filter( 'woocommerce_update_order_review_fragments', array( $this, 'set_ajax_fragments' ) );
|
40 |
+
|
41 |
+
|
42 |
+
add_action( 'wc_ajax_xoo_wsc_add_to_cart', array( $this, 'add_to_cart' ) );
|
43 |
+
|
44 |
+
add_action( 'woocommerce_add_to_cart', array( $this, 'added_to_cart' ), 10, 6 );
|
45 |
+
|
46 |
+
add_filter( 'pre_option_woocommerce_cart_redirect_after_add', array( $this, 'prevent_cart_redirect' ), 20 );
|
47 |
+
|
48 |
+
}
|
49 |
+
|
50 |
+
public function prevent_cart_redirect( $value ){
|
51 |
+
if( $this->glSettings['m-ajax-atc'] === "yes" ) return 'no';
|
52 |
+
return $value;
|
53 |
+
}
|
54 |
+
|
55 |
+
/* Add to cart is performed by woocommerce as 'add-to-cart' is passed */
|
56 |
+
public function add_to_cart(){
|
57 |
+
|
58 |
+
if( !isset( $_POST['add-to-cart'] ) ) return;
|
59 |
+
|
60 |
+
if( empty( wc_get_notices( 'error' ) ) ){
|
61 |
+
// trigger action for added to cart in ajax
|
62 |
+
do_action( 'woocommerce_ajax_added_to_cart', intval( $_POST['add-to-cart'] ) );
|
63 |
+
}
|
64 |
+
|
65 |
+
$this->get_refreshed_fragments();
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
|
70 |
+
public function added_to_cart( $cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data ){
|
71 |
+
//$this->set_notice( __( 'Item added to cart', 'side-cart-woocommerce' ), 'sucess' );
|
72 |
+
$this->addedToCart = 'yes';
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
public function set_notice( $notice, $type = 'success' ){
|
77 |
+
$this->notices[] = xoo_wsc_notice_html( $notice, $type );
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
public function print_notices_html( $section = 'cart', $wc_cart_notices = true ){
|
83 |
+
|
84 |
+
if( isset( $_POST['noticeSection'] ) && $_POST['noticeSection'] !== $section ) return;
|
85 |
+
|
86 |
+
if( $wc_cart_notices ){
|
87 |
+
|
88 |
+
do_action( 'woocommerce_check_cart_items' );
|
89 |
+
|
90 |
+
//Add WC notices
|
91 |
+
$wc_notices = wc_get_notices( 'error' );
|
92 |
+
|
93 |
+
foreach ( $wc_notices as $wc_notice ) {
|
94 |
+
$this->set_notice( $wc_notice['notice'], 'error' );
|
95 |
+
}
|
96 |
+
|
97 |
+
wc_clear_notices();
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
+
$notices = apply_filters( 'xoo_wsc_notices_before_print', $this->notices, $section );
|
102 |
+
|
103 |
+
$notices_html = sprintf( '<div class="xoo-wsc-notice-container" data-section="%1$s"><ul class="xoo-wsc-notices">%2$s</ul></div>', $section, implode( '' , $notices ) );
|
104 |
+
|
105 |
+
echo apply_filters( 'xoo_wsc_print_notices_html', $notices_html, $notices, $section );
|
106 |
+
|
107 |
+
$this->notices = array();
|
108 |
+
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
public function update_item_quantity(){
|
115 |
+
|
116 |
+
|
117 |
+
$cart_key = sanitize_text_field( $_POST['cart_key'] );
|
118 |
+
$new_qty = (float) $_POST['qty'];
|
119 |
+
|
120 |
+
if( !is_numeric( $new_qty ) || $new_qty < 0 || !$cart_key ){
|
121 |
+
//$this->set_notice( __( 'Something went wrong', 'side-cart-woocommerce' ) );
|
122 |
+
}
|
123 |
+
|
124 |
+
$validated = apply_filters( 'xoo_wsc_update_quantity', true, $cart_key, $new_qty );
|
125 |
+
|
126 |
+
if( $validated && !empty( WC()->cart->get_cart_item( $cart_key ) ) ){
|
127 |
+
|
128 |
+
$updated = $new_qty == 0 ? WC()->cart->remove_cart_item( $cart_key ) : WC()->cart->set_quantity( $cart_key, $new_qty );
|
129 |
+
|
130 |
+
if( $updated ){
|
131 |
+
|
132 |
+
if( $new_qty == 0 ){
|
133 |
+
|
134 |
+
$notice = __( 'Item removed', 'side-cart-woocommerce' );
|
135 |
+
|
136 |
+
$notice .= '<span class="xoo-wsc-undo-item" data-key="'.$cart_key.'">'.__('Undo?','side-cart-woocommerce').'</span>';
|
137 |
+
|
138 |
+
}
|
139 |
+
else{
|
140 |
+
$notice = __( 'Item updated', 'side-cart-woocommerce' );
|
141 |
+
}
|
142 |
+
|
143 |
+
//$this->set_notice( $notice, 'success' );
|
144 |
+
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
|
149 |
+
$this->get_refreshed_fragments();
|
150 |
+
|
151 |
+
die();
|
152 |
+
}
|
153 |
+
|
154 |
+
|
155 |
+
public function set_ajax_fragments($fragments){
|
156 |
+
|
157 |
+
WC()->cart->calculate_totals();
|
158 |
+
|
159 |
+
ob_start();
|
160 |
+
xoo_wsc_helper()->get_template( 'xoo-wsc-container.php' );
|
161 |
+
$container = ob_get_clean();
|
162 |
+
|
163 |
+
ob_start();
|
164 |
+
xoo_wsc_helper()->get_template( 'xoo-wsc-slider.php' );
|
165 |
+
$slider = ob_get_clean();
|
166 |
+
|
167 |
+
$fragments['div.xoo-wsc-container'] = $container; //Cart content
|
168 |
+
$fragments['div.xoo-wsc-slider'] = $slider;// Slider
|
169 |
+
|
170 |
+
return $fragments;
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
public function get_refreshed_fragments(){
|
175 |
+
WC_AJAX::get_refreshed_fragments();
|
176 |
+
}
|
177 |
+
|
178 |
+
|
179 |
+
public function get_cart_count(){
|
180 |
+
if( $this->glSettings['m-bk-count'] === 'items' ){
|
181 |
+
return count( WC()->cart->get_cart() );
|
182 |
+
}
|
183 |
+
else{
|
184 |
+
return WC()->cart->get_cart_contents_count();
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
public function get_totals(){
|
190 |
+
|
191 |
+
$totals = array();
|
192 |
+
|
193 |
+
if( WC()->cart->is_empty() ) return $totals;
|
194 |
+
|
195 |
+
$showSubtotal = in_array( 'subtotal', xoo_wsc_helper()->get_general_option('scf-show') );
|
196 |
+
|
197 |
+
if( $showSubtotal ){
|
198 |
+
$totals['subtotal'] = array(
|
199 |
+
'label' => xoo_wsc_helper()->get_general_option('sct-subtotal'),
|
200 |
+
'value' => WC()->cart->get_cart_subtotal(),
|
201 |
+
);
|
202 |
+
}
|
203 |
+
|
204 |
+
return apply_filters( 'xoo_wsc_cart_totals', $totals );
|
205 |
+
|
206 |
+
}
|
207 |
+
|
208 |
+
|
209 |
+
public function get_bundle_items(){
|
210 |
+
|
211 |
+
if( !empty( $this->bundleItems ) ){
|
212 |
+
return $this->bundleItems;
|
213 |
+
}
|
214 |
+
|
215 |
+
$data = array(
|
216 |
+
|
217 |
+
'bundled_items' => array(
|
218 |
+
'key' => 'bundled_items',
|
219 |
+
'type' => 'parent',
|
220 |
+
'delete' => true,
|
221 |
+
'qtyUpdate' => true,
|
222 |
+
'image' => true,
|
223 |
+
'link' => true
|
224 |
+
),
|
225 |
+
|
226 |
+
'bundled_by' => array(
|
227 |
+
'key' => 'bundled_by',
|
228 |
+
'type' => 'child',
|
229 |
+
'delete' => false,
|
230 |
+
'qtyUpdate' => false,
|
231 |
+
'image' => true,
|
232 |
+
'link' => true
|
233 |
+
),
|
234 |
+
|
235 |
+
|
236 |
+
'mnm_contents' => array(
|
237 |
+
'key' => 'mnm_contents',
|
238 |
+
'type' => 'parent',
|
239 |
+
'delete' => true,
|
240 |
+
'qtyUpdate' => true,
|
241 |
+
'image' => true,
|
242 |
+
'link' => true
|
243 |
+
),
|
244 |
+
|
245 |
+
|
246 |
+
'mnm_container' => array(
|
247 |
+
'key' => 'mnm_container',
|
248 |
+
'type' => 'child',
|
249 |
+
'delete' => false,
|
250 |
+
'qtyUpdate' => false,
|
251 |
+
'image' => true,
|
252 |
+
'link' => true
|
253 |
+
),
|
254 |
+
|
255 |
+
'composite_children' => array(
|
256 |
+
'key' => 'composite_children',
|
257 |
+
'type' => 'parent',
|
258 |
+
'delete' => true,
|
259 |
+
'qtyUpdate' => true,
|
260 |
+
'image' => true,
|
261 |
+
'link' => true
|
262 |
+
),
|
263 |
+
|
264 |
+
|
265 |
+
'composite_parent' => array(
|
266 |
+
'key' => 'composite_parent',
|
267 |
+
'type' => 'child',
|
268 |
+
'delete' => false,
|
269 |
+
'qtyUpdate' => false,
|
270 |
+
'image' => true,
|
271 |
+
'link' => true
|
272 |
+
),
|
273 |
+
|
274 |
+
'woosb_ids' => array(
|
275 |
+
'key' => 'woosb_ids',
|
276 |
+
'type' => 'parent',
|
277 |
+
'delete' => true,
|
278 |
+
'qtyUpdate' => true,
|
279 |
+
'image' => true,
|
280 |
+
'link' => true
|
281 |
+
),
|
282 |
+
|
283 |
+
'woosb_parent_id' => array(
|
284 |
+
'key' => 'woosb_parent_id',
|
285 |
+
'type' => 'child',
|
286 |
+
'delete' => false,
|
287 |
+
'qtyUpdate' => false,
|
288 |
+
'image' => true,
|
289 |
+
'link' => true
|
290 |
+
),
|
291 |
+
|
292 |
+
);
|
293 |
+
|
294 |
+
$this->bundleItems = apply_filters( 'xoo_wsc_product_bundle_items', $data );
|
295 |
+
|
296 |
+
return $this->bundleItems;
|
297 |
+
|
298 |
+
}
|
299 |
+
|
300 |
+
|
301 |
+
public function is_bundle_item( $cart_item ){
|
302 |
+
|
303 |
+
$bundleItems = $this->get_bundle_items();
|
304 |
+
$isBundle = array_intersect_key( $bundleItems , $cart_item );
|
305 |
+
return !empty( $isBundle ) ? array_values( array_intersect_key( $bundleItems , $cart_item ) )[0] : $isBundle;
|
306 |
+
|
307 |
+
}
|
308 |
+
|
309 |
+
}
|
310 |
+
|
311 |
+
function xoo_wsc_cart(){
|
312 |
+
return Xoo_Wsc_Cart::get_instance();
|
313 |
+
}
|
314 |
+
xoo_wsc_cart();
|
includes/class-xoo-wsc-deactivator.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Fired during plugin deactivation.
|
4 |
-
*
|
5 |
-
* This class defines all code necessary to run during the plugin's deactivation.
|
6 |
-
*
|
7 |
-
* @since 1.0.0
|
8 |
-
* @package Side Cart WooCommerce
|
9 |
-
*/
|
10 |
-
class xoo_wsc_Deactivator {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Reset option "Enable ajax add to cart" option to default user choice
|
14 |
-
*
|
15 |
-
* @since 1.0.0
|
16 |
-
*/
|
17 |
-
public static function deactivate() {
|
18 |
-
}
|
19 |
-
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-xoo-wsc-frontend.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly
|
5 |
+
}
|
6 |
+
|
7 |
+
|
8 |
+
class Xoo_Wsc_Frontend{
|
9 |
+
|
10 |
+
protected static $_instance = null;
|
11 |
+
public $glSettings;
|
12 |
+
public $template_args = array();
|
13 |
+
|
14 |
+
public static function get_instance(){
|
15 |
+
if ( is_null( self::$_instance ) ) {
|
16 |
+
self::$_instance = new self();
|
17 |
+
}
|
18 |
+
return self::$_instance;
|
19 |
+
}
|
20 |
+
|
21 |
+
public function __construct(){
|
22 |
+
$this->glSettings = xoo_wsc_helper()->get_general_option();
|
23 |
+
$this->hooks();
|
24 |
+
}
|
25 |
+
|
26 |
+
public function hooks(){
|
27 |
+
|
28 |
+
add_action( 'wp_enqueue_scripts' ,array( $this,'enqueue_styles' ) );
|
29 |
+
add_action( 'wp_enqueue_scripts' , array( $this,'enqueue_scripts' ), 15 );
|
30 |
+
add_action( 'wp_footer', array( $this, 'cart_markup' ) );
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
//Enqueue stylesheets
|
35 |
+
public function enqueue_styles(){
|
36 |
+
|
37 |
+
if( !xoo_wsc()->isSideCartPage() ) return;
|
38 |
+
|
39 |
+
//Fonts
|
40 |
+
wp_enqueue_style( 'xoo-wsc-fonts', XOO_WSC_URL.'/assets/css/xoo-wsc-fonts.css', array(), XOO_WSC_VERSION );
|
41 |
+
|
42 |
+
wp_enqueue_style( 'xoo-wsc-style', XOO_WSC_URL.'/assets/css/xoo-wsc-style.css', array(), XOO_WSC_VERSION );
|
43 |
+
|
44 |
+
|
45 |
+
$inline_style = xoo_wsc_helper()->get_template(
|
46 |
+
'global/inline-style.php',
|
47 |
+
array(
|
48 |
+
'gl' => xoo_wsc_helper()->get_general_option(),
|
49 |
+
'sy' => xoo_wsc_helper()->get_style_option(),
|
50 |
+
),
|
51 |
+
'',
|
52 |
+
true
|
53 |
+
);
|
54 |
+
|
55 |
+
$customCSS = xoo_wsc_helper()->get_advanced_option('m-custom-css');
|
56 |
+
|
57 |
+
wp_add_inline_style( 'xoo-wsc-style', $inline_style . $customCSS );
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
//Enqueue javascript
|
62 |
+
public function enqueue_scripts(){
|
63 |
+
|
64 |
+
if( !xoo_wsc()->isSideCartPage() ) return;
|
65 |
+
|
66 |
+
$glSettings = $this->glSettings;
|
67 |
+
|
68 |
+
wp_enqueue_script( 'xoo-wsc-main-js', XOO_WSC_URL.'/assets/js/xoo-wsc-main.js', array('jquery'), XOO_WSC_VERSION, true ); // Main JS
|
69 |
+
|
70 |
+
$noticeMarkup = '<ul class="xoo-wsc-notices">%s</ul>';
|
71 |
+
|
72 |
+
wp_localize_script( 'xoo-wsc-main-js', 'xoo_wsc_params', array(
|
73 |
+
'adminurl' => admin_url().'admin-ajax.php',
|
74 |
+
'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" ),
|
75 |
+
'qtyUpdateDelay' => (int) $glSettings['scb-update-delay'],
|
76 |
+
'notificationTime' => (int) $glSettings['sch-notify-time'],
|
77 |
+
'html' => array(
|
78 |
+
'successNotice' => sprintf( $noticeMarkup, xoo_wsc_notice_html( '%s%', 'success' ) ),
|
79 |
+
'errorNotice' => sprintf( $noticeMarkup, xoo_wsc_notice_html( '%s%', 'error' ) ),
|
80 |
+
),
|
81 |
+
'strings' => array(
|
82 |
+
'maxQtyError' => __( 'Only %s% in stock', 'side-cart-woocommerce' ),
|
83 |
+
'stepQtyError' => __( 'Quantity can only be purchased in multiple of %s%', 'side-cart-woocommerce' ),
|
84 |
+
'calculateCheckout' => __( 'Please use checkout form to calculate shipping', 'side-cart-woocommerce' ),
|
85 |
+
'couponEmpty' => __( 'Please enter promo code', 'side-cart-woocommerce' )
|
86 |
+
),
|
87 |
+
'isCheckout' => is_checkout(),
|
88 |
+
'isCart' => is_cart(),
|
89 |
+
'sliderAutoClose' => true,
|
90 |
+
'shippingEnabled' => in_array( 'shipping' , $glSettings['scf-show'] ),
|
91 |
+
'couponsEnabled' => in_array( 'coupon' , $glSettings['scf-show'] ),
|
92 |
+
'autoOpenCart' => $glSettings['m-auto-open'],
|
93 |
+
'addedToCart' => xoo_wsc_cart()->addedToCart,
|
94 |
+
'ajaxAddToCart' => $glSettings['m-ajax-atc'],
|
95 |
+
'showBasket' => xoo_wsc_helper()->get_style_option('sck-enable'),
|
96 |
+
'flyToCart' => 'no',
|
97 |
+
'productFlyClass' => apply_filters( 'xoo_wsc_product_fly_class', '' ),
|
98 |
+
'refreshCart' => xoo_wsc_helper()->get_advanced_option('m-refresh-cart'),
|
99 |
+
'fetchDelay' => apply_filters( 'xoo_wsc_cart_fetch_delay', 200 )
|
100 |
+
) );
|
101 |
+
}
|
102 |
+
|
103 |
+
|
104 |
+
//Cart markup
|
105 |
+
public function cart_markup(){
|
106 |
+
|
107 |
+
if( !xoo_wsc()->isSideCartPage() ) return;
|
108 |
+
|
109 |
+
xoo_wsc_helper()->get_template( 'xoo-wsc-markup.php' );
|
110 |
+
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
function xoo_wsc_frontend(){
|
117 |
+
return Xoo_Wsc_Frontend::get_instance();
|
118 |
+
}
|
119 |
+
xoo_wsc_frontend();
|
includes/class-xoo-wsc-helper.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Xoo_Wsc_Helper extends Xoo_Helper{
|
4 |
+
|
5 |
+
protected static $_instance = null;
|
6 |
+
|
7 |
+
public static function get_instance( $slug, $path ){
|
8 |
+
if ( is_null( self::$_instance ) ) {
|
9 |
+
self::$_instance = new self( $slug, $path );
|
10 |
+
}
|
11 |
+
return self::$_instance;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function get_general_option( $subkey = '' ){
|
15 |
+
return $this->get_option( 'xoo-wsc-gl-options', $subkey );
|
16 |
+
}
|
17 |
+
|
18 |
+
public function get_style_option( $subkey = '' ){
|
19 |
+
return $this->get_option( 'xoo-wsc-sy-options', $subkey );
|
20 |
+
}
|
21 |
+
|
22 |
+
public function get_advanced_option( $subkey = '' ){
|
23 |
+
return $this->get_option( 'xoo-wsc-av-options', $subkey );
|
24 |
+
}
|
25 |
+
|
26 |
+
}
|
27 |
+
|
28 |
+
function xoo_wsc_helper(){
|
29 |
+
return Xoo_Wsc_Helper::get_instance( 'side-cart-woocommerce', XOO_WSC_PATH );
|
30 |
+
}
|
31 |
+
xoo_wsc_helper();
|
32 |
+
|
33 |
+
?>
|
includes/class-xoo-wsc-i18n.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Define the internationalization functionality.
|
4 |
-
*
|
5 |
-
* Loads and defines the internationalization files for this plugin
|
6 |
-
* so that it is ready for translation.
|
7 |
-
*
|
8 |
-
* @since 1.0.0
|
9 |
-
* @package WooCommerce Side Cart
|
10 |
-
*/
|
11 |
-
class xoo_wsc_i18n {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Load the plugin text domain for translation.
|
15 |
-
*
|
16 |
-
* @since 1.0.0
|
17 |
-
*/
|
18 |
-
public function load_plugin_textdomain() {
|
19 |
-
$domain = 'side-cart-woocommerce';
|
20 |
-
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
|
21 |
-
load_textdomain( $domain, WP_LANG_DIR . '/'.$domain.'-' . $locale . '.mo' ); //wp-content languages
|
22 |
-
load_plugin_textdomain( $domain, FALSE, basename( XOO_WSC_PATH ) . '/languages/' ); // Plugin Languages
|
23 |
-
}
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-xoo-wsc-loader.php
CHANGED
@@ -1,116 +1,144 @@
|
|
1 |
-
<?php
|
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 |
-
* @param
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly
|
5 |
+
}
|
6 |
+
|
7 |
+
|
8 |
+
class Xoo_Wsc_Loader{
|
9 |
+
|
10 |
+
protected static $_instance = null;
|
11 |
+
|
12 |
+
public static function get_instance(){
|
13 |
+
if ( is_null( self::$_instance ) ) {
|
14 |
+
self::$_instance = new self();
|
15 |
+
}
|
16 |
+
return self::$_instance;
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
+
public function __construct(){
|
21 |
+
$this->set_constants();
|
22 |
+
$this->includes();
|
23 |
+
$this->hooks();
|
24 |
+
}
|
25 |
+
|
26 |
+
|
27 |
+
public function set_constants(){
|
28 |
+
|
29 |
+
$this->define( "XOO_WSC_PATH", plugin_dir_path( XOO_WSC_PLUGIN_FILE ) ); // Plugin path
|
30 |
+
$this->define( "XOO_WSC_PLUGIN_BASENAME", plugin_basename( XOO_WSC_PLUGIN_FILE ) );
|
31 |
+
$this->define( "XOO_WSC_URL", untrailingslashit( plugins_url( '/', XOO_WSC_PLUGIN_FILE ) ) ); // plugin url
|
32 |
+
$this->define( "XOO_WSC_VERSION", "2.1" ); //Plugin version
|
33 |
+
$this->define( "XOO_WSC_LITE", true );
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
public function define( $constant_name, $constant_value ){
|
38 |
+
if( !defined( $constant_name ) ){
|
39 |
+
define( $constant_name, $constant_value );
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* File Includes
|
45 |
+
*/
|
46 |
+
public function includes(){
|
47 |
+
|
48 |
+
//xootix framework
|
49 |
+
require_once XOO_WSC_PATH.'/includes/xoo-framework/xoo-framework.php';
|
50 |
+
require_once XOO_WSC_PATH.'/includes/class-xoo-wsc-helper.php';
|
51 |
+
require_once XOO_WSC_PATH.'/includes/xoo-wsc-functions.php';
|
52 |
+
require_once XOO_WSC_PATH.'/includes/class-xoo-wsc-template-args.php';
|
53 |
+
|
54 |
+
if( $this->is_request( 'frontend' ) ){
|
55 |
+
require_once XOO_WSC_PATH.'/includes/class-xoo-wsc-frontend.php';
|
56 |
+
}
|
57 |
+
|
58 |
+
if( $this->is_request( 'admin' ) ) {
|
59 |
+
require_once XOO_WSC_PATH.'/admin/class-xoo-wsc-admin-settings.php';
|
60 |
+
}
|
61 |
+
|
62 |
+
require_once XOO_WSC_PATH.'/includes/class-xoo-wsc-cart.php';
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Hooks
|
69 |
+
*/
|
70 |
+
public function hooks(){
|
71 |
+
$this->on_install();
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
/**
|
76 |
+
* What type of request is this?
|
77 |
+
*
|
78 |
+
* @param string $type admin, ajax, cron or frontend.
|
79 |
+
* @return bool
|
80 |
+
*/
|
81 |
+
private function is_request( $type ) {
|
82 |
+
switch ( $type ) {
|
83 |
+
case 'admin':
|
84 |
+
return is_admin();
|
85 |
+
case 'ajax':
|
86 |
+
return defined( 'DOING_AJAX' );
|
87 |
+
case 'cron':
|
88 |
+
return defined( 'DOING_CRON' );
|
89 |
+
case 'frontend':
|
90 |
+
return ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' );
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
/**
|
96 |
+
* On install
|
97 |
+
*/
|
98 |
+
public function on_install(){
|
99 |
+
|
100 |
+
$version_option = 'xoo-wsc-version';
|
101 |
+
$db_version = get_option( $version_option );
|
102 |
+
|
103 |
+
//If first time installed
|
104 |
+
if( !$db_version ){
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
if( version_compare( $db_version, XOO_WSC_VERSION, '<') ){
|
109 |
+
|
110 |
+
//Update to current version
|
111 |
+
update_option( $version_option, XOO_WSC_VERSION);
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
public function isSideCartPage(){
|
117 |
+
|
118 |
+
if( isset( $this->isSideCartPage ) ){
|
119 |
+
return $this->isSideCartPage;
|
120 |
+
}
|
121 |
+
|
122 |
+
if( !trim(xoo_wsc_helper()->get_general_option('m-hide-cart')) ){
|
123 |
+
$hidePages = array();
|
124 |
+
}
|
125 |
+
else{
|
126 |
+
$hidePages = array_map( 'trim', explode( ',', xoo_wsc_helper()->get_general_option('m-hide-cart') ) );
|
127 |
+
}
|
128 |
+
|
129 |
+
$this->isSideCartPage = !( !empty( $hidePages ) && ( ( in_array( 'no-woocommerce', $hidePages ) && !is_woocommerce() && !is_cart() && !is_checkout() ) || is_page( $hidePages ) ) || ( is_product() && in_array( get_the_id() , $hidePages ) ) );
|
130 |
+
|
131 |
+
foreach ( $hidePages as $page_id ) {
|
132 |
+
if( is_single( $page_id ) ){
|
133 |
+
$this->isSideCartPage = false;
|
134 |
+
break;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
return apply_filters( 'xoo_wsc_is_sidecart_page', $this->isSideCartPage, $hidePages );
|
140 |
+
}
|
141 |
+
|
142 |
+
}
|
143 |
+
|
144 |
+
?>
|
includes/class-xoo-wsc-template-args.php
ADDED
@@ -0,0 +1,277 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Template Arguments
|
5 |
+
*/
|
6 |
+
class Xoo_Wsc_Template_Args{
|
7 |
+
|
8 |
+
public static $gl;
|
9 |
+
public static $sy;
|
10 |
+
public static $av;
|
11 |
+
|
12 |
+
public static function declare_options(){
|
13 |
+
self::$gl = xoo_wsc_helper()->get_general_option();
|
14 |
+
self::$sy = xoo_wsc_helper()->get_style_option();
|
15 |
+
self::$av = xoo_wsc_helper()->get_advanced_option();
|
16 |
+
}
|
17 |
+
|
18 |
+
|
19 |
+
public static function cart_container(){
|
20 |
+
|
21 |
+
$args = array(
|
22 |
+
'showCount' => self::$sy['sck-show-count'],
|
23 |
+
'basketIcon' => esc_html( self::$sy['sck-basket-icon'] ),
|
24 |
+
'customBasketIcon' => esc_html( self::$sy['sck-cust-icon'] ),
|
25 |
+
);
|
26 |
+
|
27 |
+
|
28 |
+
return apply_filters( 'xoo_wsc_cart_container_args', $args );
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
public static function cart_body(){
|
34 |
+
|
35 |
+
$show = self::$gl['scb-show'];
|
36 |
+
|
37 |
+
$args = array(
|
38 |
+
'show' => $show,
|
39 |
+
'showPLink' => in_array( 'product_link' , $show ),
|
40 |
+
'pnameVariation' => self::$gl['scb-pname-var'],
|
41 |
+
'cartOrder' => self::$gl['m-cart-order'],
|
42 |
+
'cart' => self::$gl['m-cart-order'] === 'desc' ? array_reverse( WC()->cart->get_cart() ) : WC()->cart->get_cart(),
|
43 |
+
'emptyCartImg' => self::$sy['scb-empty-img'],
|
44 |
+
'shopURL' => self::$gl['m-shop-url'],
|
45 |
+
'emptyText' => self::$gl['sct-empty'],
|
46 |
+
'shopBtnText' => self::$gl['sct-shop-btn'],
|
47 |
+
);
|
48 |
+
|
49 |
+
return apply_filters( 'xoo_wsc_cart_body_args', $args );
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
public static function cart_header(){
|
55 |
+
|
56 |
+
$show = self::$gl['sch-show'];
|
57 |
+
|
58 |
+
$args = array(
|
59 |
+
'heading' => trim( esc_html( self::$gl['sct-cart-heading'] ) ),
|
60 |
+
'showNotifications' => in_array( 'notifications' , $show ),
|
61 |
+
'showBasket' => in_array( 'basket' , $show ),
|
62 |
+
'showCloseIcon' => in_array( 'close', $show ),
|
63 |
+
'close_icon' => esc_html( self::$sy['sch-close-icon'] ),
|
64 |
+
);
|
65 |
+
|
66 |
+
return apply_filters( 'xoo_wsc_cart_header_args', $args );
|
67 |
+
}
|
68 |
+
|
69 |
+
|
70 |
+
public static function cart_footer(){
|
71 |
+
|
72 |
+
$show = self::$gl['scf-show'];
|
73 |
+
|
74 |
+
$args = array(
|
75 |
+
'heading' => trim( esc_html( self::$gl['sct-cart-heading'] ) ),
|
76 |
+
'showCoupon' => in_array( 'coupon' , $show ),
|
77 |
+
'couponIcon' => esc_html( self::$sy['scf-coup-icon'] ),
|
78 |
+
'spPosition' => self::$sy['scsp-location'],
|
79 |
+
);
|
80 |
+
|
81 |
+
return apply_filters( 'xoo_wsc_cart_header_args', $args );
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
public static function slider(){
|
87 |
+
|
88 |
+
$show = self::$gl['scf-show'];
|
89 |
+
|
90 |
+
$args = array(
|
91 |
+
'showShipping' => in_array( 'shipping' , $show ),
|
92 |
+
'showCoupon' => in_array( 'coupon' , $show ),
|
93 |
+
'showNotifications' => in_array( 'notifications', self::$gl['sch-show'] ),
|
94 |
+
);
|
95 |
+
|
96 |
+
return apply_filters( 'xoo_wsc_slider_args', $args );
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
public static function cart_shortcode(){
|
102 |
+
|
103 |
+
$args = array(
|
104 |
+
'basketIcon' => esc_html( self::$sy['sck-basket-icon'] ),
|
105 |
+
'customBasketIcon' => esc_html( self::$sy['sck-cust-icon'] )
|
106 |
+
);
|
107 |
+
|
108 |
+
return apply_filters( 'xoo_wsc_slider_args', $args );
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
+
|
113 |
+
public static function product( $_product, $cart_item, $cart_item_key, $cart_item_args = array() ){
|
114 |
+
|
115 |
+
$bundleData = isset( $cart_item_args['bundleData'] ) ? $cart_item_args['bundleData'] : array();
|
116 |
+
|
117 |
+
$productClasses = array(
|
118 |
+
'xoo-wsc-product'
|
119 |
+
);
|
120 |
+
|
121 |
+
|
122 |
+
$show = self::$gl['scb-show'];
|
123 |
+
$showPimage = in_array( 'product_image' , $show );
|
124 |
+
$showPdel = in_array( 'product_del', $show );
|
125 |
+
$showPprice = in_array( 'product_price' , $show );
|
126 |
+
$showSalesCount = in_array( 'total_sales', $show );
|
127 |
+
$updateQty = !$_product->is_sold_individually() && self::$gl['scb-update-qty'] === "yes";
|
128 |
+
|
129 |
+
|
130 |
+
if( !empty( $bundleData ) ){
|
131 |
+
$productClasses[] = 'xoo-wsc-is-'.$bundleData['type'];
|
132 |
+
$productClasses[] = 'xoo-wsc-'.$bundleData['key'];
|
133 |
+
$showPimage = !$bundleData['image'] ? false : $showPimage;
|
134 |
+
$updateQty = $bundleData['qtyUpdate'];
|
135 |
+
$showPprice = $showSalesCount = false;
|
136 |
+
$showPdel = !$bundleData['delete'] ? false : $showPdel;
|
137 |
+
}
|
138 |
+
|
139 |
+
|
140 |
+
$args = array(
|
141 |
+
'showPimage' => $showPimage,
|
142 |
+
'updateQty' => $updateQty,
|
143 |
+
'showSalesCount' => $showSalesCount,
|
144 |
+
'showPprice' => $showPprice,
|
145 |
+
'showPdel' => $showPdel,
|
146 |
+
'productClasses' => $productClasses,
|
147 |
+
'showPname' => in_array( 'product_name' , $show ),
|
148 |
+
'showPtotal' => in_array( 'product_total' , $show ),
|
149 |
+
'showPmeta' => in_array( 'product_meta' , $show ),
|
150 |
+
'close_icon' => esc_html( self::$sy['sch-close-icon'] ),
|
151 |
+
'delete_icon' => esc_html( self::$sy['scb-del-icon'] ),
|
152 |
+
'qtyPriceDisplay' => self::$sy['scbp-qpdisplay'],
|
153 |
+
);
|
154 |
+
|
155 |
+
$args = wp_parse_args( $args, $cart_item_args );
|
156 |
+
|
157 |
+
return apply_filters( 'xoo_wsc_product_args', $args, $_product, $cart_item, $cart_item_key );
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
|
162 |
+
public static function shipping_bar(){
|
163 |
+
|
164 |
+
$show = self::$gl['sch-show'];
|
165 |
+
$data = xoo_wsc_cart()->get_shipping_bar_data();
|
166 |
+
|
167 |
+
$args = array(
|
168 |
+
'showBar' => in_array( 'shipping_bar', $show ),
|
169 |
+
'data' => $data
|
170 |
+
);
|
171 |
+
|
172 |
+
|
173 |
+
if( !empty( $data ) ){
|
174 |
+
$args['text'] = $data['free'] ? self::$gl['sct-sb-free'] : str_replace( '%s', wc_price( $data['amount_left'] ), self::$gl['sct-sb-remaining']);
|
175 |
+
}
|
176 |
+
|
177 |
+
return apply_filters( 'xoo_wsc_shipping_bar_args', $args );
|
178 |
+
|
179 |
+
}
|
180 |
+
|
181 |
+
public static function footer_buttons(){
|
182 |
+
|
183 |
+
$show = self::$gl['scf-show'];
|
184 |
+
$buttonOrder = self::$sy['scf-button-pos'];
|
185 |
+
$checkoutTxt = esc_html( self::$gl['sct-ft-chkbtn'] );
|
186 |
+
$buttonDesign = self::$sy['scf-btns-theme'];
|
187 |
+
$buttonClass = array( 'xoo-wsc-ft-btn' );
|
188 |
+
|
189 |
+
|
190 |
+
if( $buttonDesign === 'theme' ){
|
191 |
+
$buttonClass[] = 'button';
|
192 |
+
$buttonClass[] = 'btn';
|
193 |
+
}
|
194 |
+
|
195 |
+
$buttons = array(
|
196 |
+
'continue' => array(
|
197 |
+
'label' => self::$gl['sct-ft-contbtn'],
|
198 |
+
'url' => self::$gl['scu-continue'],
|
199 |
+
'class' => $buttonClass,
|
200 |
+
),
|
201 |
+
'cart' => array(
|
202 |
+
'label' => self::$gl['sct-ft-cartbtn'],
|
203 |
+
'url' => self::$gl['scu-cart'],
|
204 |
+
'class' => $buttonClass,
|
205 |
+
),
|
206 |
+
'checkout' => array(
|
207 |
+
'label' => self::$gl['sct-ft-chkbtn'],
|
208 |
+
'url' => self::$gl['scu-checkout'],
|
209 |
+
'class' => $buttonClass,
|
210 |
+
)
|
211 |
+
);
|
212 |
+
|
213 |
+
if( $buttons['continue']['url'] === "#" ){
|
214 |
+
$buttons['continue']['class'][] = 'xoo-wsc-cart-close';
|
215 |
+
}
|
216 |
+
|
217 |
+
|
218 |
+
$buttons = array_merge( array_flip( $buttonOrder ), $buttons );
|
219 |
+
|
220 |
+
//Remove cart & checkout button if cart is empty
|
221 |
+
if( WC()->cart->is_empty() ){
|
222 |
+
unset( $buttons['cart'] );
|
223 |
+
unset( $buttons['checkout'] );
|
224 |
+
}
|
225 |
+
|
226 |
+
|
227 |
+
$args = array(
|
228 |
+
'buttons' => $buttons
|
229 |
+
);
|
230 |
+
|
231 |
+
return apply_filters( 'xoo_wsc_footer_buttons_args', $args );
|
232 |
+
}
|
233 |
+
|
234 |
+
public static function footer_extras(){
|
235 |
+
|
236 |
+
$show = self::$gl['scf-show'];
|
237 |
+
|
238 |
+
$args = array(
|
239 |
+
'showCoupon' => in_array( 'coupon' , $show ),
|
240 |
+
'couponIcon' => esc_html( self::$sy['scf-coup-icon'] )
|
241 |
+
);
|
242 |
+
|
243 |
+
return apply_filters( 'xoo_wsc_footer_extras_args', $args );
|
244 |
+
}
|
245 |
+
|
246 |
+
public static function suggested_products(){
|
247 |
+
|
248 |
+
$products = xoo_wsc_cart()->get_suggested_products();
|
249 |
+
$show = self::$gl['scsp-show'];
|
250 |
+
|
251 |
+
$args = array(
|
252 |
+
'disable' => !$products || !$products->have_posts() || self::$gl['scsp-enable'] !== 'yes' || ( wp_is_mobile() && self::$gl['scsp-mob-enable'] !== 'yes' ),
|
253 |
+
'products' => $products,
|
254 |
+
'showPLink' => in_array( 'product_link' , self::$gl['scb-show'] ),
|
255 |
+
'showTitle' => in_array( 'title', $show ),
|
256 |
+
'showImage' => in_array( 'image', $show ),
|
257 |
+
'showDesc' => in_array( 'desc', $show ),
|
258 |
+
'showPrice' => in_array( 'price', $show ),
|
259 |
+
'showATC' => in_array( 'addtocart', $show ),
|
260 |
+
'style' => esc_html( self::$sy['scsp-style'] ),
|
261 |
+
);
|
262 |
+
|
263 |
+
return apply_filters( 'xoo_wsc_suggested_product_args', $args );
|
264 |
+
}
|
265 |
+
|
266 |
+
public static function footer_totals(){
|
267 |
+
|
268 |
+
$args = array(
|
269 |
+
'totals' => xoo_wsc_cart()->get_totals()
|
270 |
+
);
|
271 |
+
|
272 |
+
return apply_filters( 'xoo_wsc_footer_totals_args', $args );
|
273 |
+
}
|
274 |
+
|
275 |
+
}
|
276 |
+
|
277 |
+
Xoo_Wsc_Template_Args::declare_options();
|
includes/class-xoo-wsc.php
DELETED
@@ -1,235 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The core plugin class.
|
4 |
-
*
|
5 |
-
* This is used to define internationalization, admin-specific hooks, and
|
6 |
-
* public-facing site hooks.
|
7 |
-
*
|
8 |
-
* Also maintains the unique identifier of this plugin as well as the current
|
9 |
-
* version of the plugin.
|
10 |
-
*
|
11 |
-
* @since 1.0.0
|
12 |
-
*/
|
13 |
-
class xoo_wsc {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* The loader that's responsible for maintaining and registering all hooks that power
|
17 |
-
* the plugin.
|
18 |
-
*
|
19 |
-
* @since 1.0.0
|
20 |
-
* @access protected
|
21 |
-
* @var $loader Maintains and registers all hooks for the plugin.
|
22 |
-
*/
|
23 |
-
protected $loader;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* The unique identifier of this plugin.
|
27 |
-
*
|
28 |
-
* @since 1.0.0
|
29 |
-
* @access protected
|
30 |
-
* @var string $xoo_wsc The string used to uniquely identify this plugin.
|
31 |
-
*/
|
32 |
-
protected $xoo_wsc;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* The current version of the plugin.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
* @access protected
|
39 |
-
* @var string $version The current version of the plugin.
|
40 |
-
*/
|
41 |
-
protected $version;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Define the core functionality of the plugin.
|
45 |
-
*
|
46 |
-
* Set the plugin name and the plugin version that can be used throughout the plugin.
|
47 |
-
* Load the dependencies, define the locale, and set the hooks for the admin area and
|
48 |
-
* the public-facing side of the site.
|
49 |
-
*
|
50 |
-
* @since 1.0.0
|
51 |
-
*/
|
52 |
-
public function __construct() {
|
53 |
-
|
54 |
-
$this->xoo_wsc = 'xoo-wsc';
|
55 |
-
$this->version = '2.0';
|
56 |
-
|
57 |
-
$this->load_dependencies();
|
58 |
-
$this->set_locale();
|
59 |
-
$this->define_admin_hooks();
|
60 |
-
$this->define_public_hooks();
|
61 |
-
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Load the required dependencies for this plugin.
|
66 |
-
*
|
67 |
-
* Include the following files that make up the plugin:
|
68 |
-
*
|
69 |
-
* - xoo_wsc_Loader. Orchestrates the hooks of the plugin.
|
70 |
-
* - xoo_wsc_i18n. Defines internationalization functionality.
|
71 |
-
* - xoo_wsc_Admin. Defines all hooks for the admin area.
|
72 |
-
* - xoo_wsc_Public. Defines all hooks for the public side of the site.
|
73 |
-
*
|
74 |
-
* Create an instance of the loader which will be used to register the hooks
|
75 |
-
* with WordPress.
|
76 |
-
*
|
77 |
-
* @since 1.0.0
|
78 |
-
* @access private
|
79 |
-
*/
|
80 |
-
private function load_dependencies() {
|
81 |
-
|
82 |
-
/**
|
83 |
-
* The class responsible for orchestrating the actions and filters of the
|
84 |
-
* core plugin.
|
85 |
-
*/
|
86 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-xoo-wsc-loader.php';
|
87 |
-
|
88 |
-
/**
|
89 |
-
* The class responsible for defining internationalization functionality
|
90 |
-
* of the plugin.
|
91 |
-
*/
|
92 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-xoo-wsc-i18n.php';
|
93 |
-
|
94 |
-
/**
|
95 |
-
* The class responsible for defining all actions that occur in the admin area.
|
96 |
-
*/
|
97 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-xoo-wsc-admin.php';
|
98 |
-
|
99 |
-
/**
|
100 |
-
* The class responsible for defining all General Settings.
|
101 |
-
*/
|
102 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/settings/class-xoo-wsc-general-settings.php';
|
103 |
-
|
104 |
-
|
105 |
-
/**
|
106 |
-
* The class responsible for defining all Style Settings.
|
107 |
-
*/
|
108 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/settings/class-xoo-wsc-style-settings.php';
|
109 |
-
|
110 |
-
/**
|
111 |
-
* The class responsible for defining all Advanced Settings.
|
112 |
-
*/
|
113 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/settings/class-xoo-wsc-advanced-settings.php';
|
114 |
-
|
115 |
-
|
116 |
-
/**
|
117 |
-
* The class responsible for defining all actions that occur in the public-facing
|
118 |
-
* side of the site.
|
119 |
-
*/
|
120 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-xoo-wsc-public.php';
|
121 |
-
|
122 |
-
/**
|
123 |
-
* The class responsible for showing side cart data
|
124 |
-
*/
|
125 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-xoo-wsc-cart-data.php';
|
126 |
-
|
127 |
-
$this->loader = new xoo_wsc_Loader();
|
128 |
-
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Define the locale for this plugin for internationalization.
|
133 |
-
*
|
134 |
-
* Uses the xoo_wsc_i18n class in order to set the domain and to register the hook
|
135 |
-
* with WordPress.
|
136 |
-
*
|
137 |
-
* @since 1.0.0
|
138 |
-
* @access private
|
139 |
-
*/
|
140 |
-
private function set_locale() {
|
141 |
-
|
142 |
-
$plugin_i18n = new xoo_wsc_i18n();
|
143 |
-
$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain',100);
|
144 |
-
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Register all of the hooks related to the admin area functionality
|
149 |
-
* of the plugin.
|
150 |
-
*
|
151 |
-
* @since 1.0.0
|
152 |
-
* @access private
|
153 |
-
*/
|
154 |
-
private function define_admin_hooks() {
|
155 |
-
|
156 |
-
$plugin_admin = new xoo_wsc_Admin( $this->get_xoo_wsc(), $this->get_version() );
|
157 |
-
$settings_init_general = new xoo_wsc_General_Settings( $this->get_xoo_wsc() ); // Initialize General Settings
|
158 |
-
$settings_init_style = new xoo_wsc_Style_Settings( $this->get_xoo_wsc() ); // Initialize Style Settings
|
159 |
-
$settings_init_advanced = new xoo_wsc_Advanced_Settings( $this->get_xoo_wsc() ); // Initialize Advanced Settings
|
160 |
-
|
161 |
-
|
162 |
-
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
|
163 |
-
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
164 |
-
$this->loader->add_action( 'admin_menu', $plugin_admin, 'admin_menu' );
|
165 |
-
$this->loader->add_action( 'admin_init', $settings_init_general, 'settings_api_init' );
|
166 |
-
$this->loader->add_action( 'admin_init', $settings_init_style, 'settings_api_init' );
|
167 |
-
$this->loader->add_action( 'admin_init', $settings_init_advanced, 'settings_api_init' );
|
168 |
-
|
169 |
-
}
|
170 |
-
|
171 |
-
/**
|
172 |
-
* Register all of the hooks related to the public-facing functionality
|
173 |
-
* of the plugin.
|
174 |
-
*
|
175 |
-
* @since 1.0.0
|
176 |
-
* @access private
|
177 |
-
*/
|
178 |
-
private function define_public_hooks() {
|
179 |
-
|
180 |
-
$plugin_public = new xoo_wsc_Public( $this->get_xoo_wsc(), $this->get_version() );
|
181 |
-
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
|
182 |
-
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts', 9999 );
|
183 |
-
$this->loader->add_action( 'wp_print_scripts', $plugin_public, 'enqueue_cart_fragment_script', 99999999 );
|
184 |
-
$this->loader->add_filter( 'pre_option_woocommerce_cart_redirect_after_add', $plugin_public, 'prevent_cart_redirect',10,1);
|
185 |
-
if(!is_admin() || wp_doing_ajax()){
|
186 |
-
$get_cart = new xoo_wsc_Cart_Data($this->get_xoo_wsc());
|
187 |
-
$this->loader->add_action('wp_footer',$get_cart,'get_cart_markup');
|
188 |
-
$this->loader->add_action('xoo_wsc_cart_content',$get_cart,'get_cart_content');
|
189 |
-
$this->loader->add_action('wc_ajax_xoo_wsc_add_to_cart',$get_cart,'xoo_wsc_add_to_cart_ajax');
|
190 |
-
$this->loader->add_action('wc_ajax_xoo_wsc_update_cart',$get_cart,'update_cart_ajax');
|
191 |
-
$this->loader->add_filter('woocommerce_add_to_cart_fragments',$get_cart,'set_ajax_fragments',10,1);
|
192 |
-
}
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* Run the loader to execute all of the hooks with WordPress.
|
197 |
-
*
|
198 |
-
* @since 1.0.0
|
199 |
-
*/
|
200 |
-
public function run() {
|
201 |
-
$this->loader->run();
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* The name of the plugin used to uniquely identify it within the context of
|
206 |
-
* WordPress and to define internationalization functionality.
|
207 |
-
*
|
208 |
-
* @since 1.0.0
|
209 |
-
* @return string The name of the plugin.
|
210 |
-
*/
|
211 |
-
public function get_xoo_wsc() {
|
212 |
-
return $this->xoo_wsc;
|
213 |
-
}
|
214 |
-
|
215 |
-
/**
|
216 |
-
* The reference to the class that orchestrates the hooks with the plugin.
|
217 |
-
*
|
218 |
-
* @since 1.0.0
|
219 |
-
* @return xoo_wsc_Loader Orchestrates the hooks of the plugin.
|
220 |
-
*/
|
221 |
-
public function get_loader() {
|
222 |
-
return $this->loader;
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Retrieve the version number of the plugin.
|
227 |
-
*
|
228 |
-
* @since 1.0.0
|
229 |
-
* @return string The version number of the plugin.
|
230 |
-
*/
|
231 |
-
public function get_version() {
|
232 |
-
return $this->version;
|
233 |
-
}
|
234 |
-
|
235 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/index.php
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php // Silence is golden
|
|
includes/xoo-framework/admin/assets/css/xoo-admin-style.css
ADDED
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.xoo-settings-container {
|
2 |
+
padding: 50px 20px;
|
3 |
+
max-width: 1300px;
|
4 |
+
}
|
5 |
+
|
6 |
+
ul.xoo-sc-tabs {
|
7 |
+
margin: 0;
|
8 |
+
list-style: none;
|
9 |
+
padding: 0;
|
10 |
+
}
|
11 |
+
|
12 |
+
ul.xoo-sc-tabs li {
|
13 |
+
display: inline-block;
|
14 |
+
padding: 10px 20px;
|
15 |
+
background-color: #1d3557;
|
16 |
+
margin: 0 5px 0 0;
|
17 |
+
color: #f0f0f0;
|
18 |
+
font-weight: 500;
|
19 |
+
text-transform: uppercase;
|
20 |
+
width: auto;
|
21 |
+
cursor: pointer;
|
22 |
+
}
|
23 |
+
|
24 |
+
ul.xoo-sc-tabs li.xoo-sct-active {
|
25 |
+
background-color: #2a9d8f;
|
26 |
+
transform: scale(1.05);
|
27 |
+
}
|
28 |
+
|
29 |
+
.xoo-as-slider {
|
30 |
+
position: absolute;
|
31 |
+
cursor: pointer;
|
32 |
+
top: 0;
|
33 |
+
left: 0;
|
34 |
+
right: 0;
|
35 |
+
bottom: 0;
|
36 |
+
background-color: #ccc;
|
37 |
+
-webkit-transition: .4s;
|
38 |
+
transition: .4s;
|
39 |
+
border-radius: 34px;
|
40 |
+
}
|
41 |
+
|
42 |
+
.xoo-as-slider:before {
|
43 |
+
position: absolute;
|
44 |
+
content: "";
|
45 |
+
height: 18px;
|
46 |
+
width: 18px;
|
47 |
+
left: 5px;
|
48 |
+
bottom: 5px;
|
49 |
+
background-color: white;
|
50 |
+
-webkit-transition: .4s;
|
51 |
+
transition: .4s;
|
52 |
+
border-radius: 50%;
|
53 |
+
}
|
54 |
+
|
55 |
+
.xoo-as-switch input:checked + .xoo-as-slider {
|
56 |
+
background-color: #2196F3;
|
57 |
+
}
|
58 |
+
|
59 |
+
.xoo-as-switch input:checked + .xoo-as-slider {
|
60 |
+
background-color: #2196F3;
|
61 |
+
}
|
62 |
+
|
63 |
+
.xoo-as-switch input:focus + .xoo-as-slider {
|
64 |
+
box-shadow: 0 0 1px #2196F3;
|
65 |
+
}
|
66 |
+
|
67 |
+
.xoo-as-switch input:checked + .xoo-as-slider:before {
|
68 |
+
-webkit-transform: translateX(20px);
|
69 |
+
-ms-transform: translateX(20px);
|
70 |
+
transform: translateX(20px);
|
71 |
+
}
|
72 |
+
|
73 |
+
.xoo-as-switch {
|
74 |
+
position: relative;
|
75 |
+
display: inline-block;
|
76 |
+
width: 50px;
|
77 |
+
height: 28px;
|
78 |
+
}
|
79 |
+
|
80 |
+
.xoo-as-switch input {
|
81 |
+
opacity: 0;
|
82 |
+
width: 0;
|
83 |
+
height: 0;
|
84 |
+
}
|
85 |
+
|
86 |
+
.xoo-sc-bottom-btns > * {
|
87 |
+
padding: 13px 10px;
|
88 |
+
color: #fff;
|
89 |
+
border: 0;
|
90 |
+
border-radius: 1px;
|
91 |
+
font-weight: 600;
|
92 |
+
font-size: 14px;
|
93 |
+
cursor: pointer;
|
94 |
+
text-transform: capitalize;
|
95 |
+
text-decoration: none;
|
96 |
+
display: inline-block;
|
97 |
+
}
|
98 |
+
|
99 |
+
.xoo-sc-tab-content {
|
100 |
+
display: none;
|
101 |
+
}
|
102 |
+
|
103 |
+
.xoo-sc-tab-content.xoo-sct-active {
|
104 |
+
display: block;
|
105 |
+
}
|
106 |
+
|
107 |
+
form.xoo-as-form {
|
108 |
+
margin-top: 0;
|
109 |
+
background-color: #fff;
|
110 |
+
padding: 30px 15px;
|
111 |
+
}
|
112 |
+
|
113 |
+
.xoo-as-setting {
|
114 |
+
margin-bottom: 38px;
|
115 |
+
display: flex;
|
116 |
+
}
|
117 |
+
|
118 |
+
|
119 |
+
.xoo-as-label {
|
120 |
+
font-size: 15px;
|
121 |
+
font-weight: 600;
|
122 |
+
margin-right: 50px;
|
123 |
+
width: 200px;
|
124 |
+
min-width: 200px;
|
125 |
+
}
|
126 |
+
|
127 |
+
span.xoo-as-desc {
|
128 |
+
display: block;
|
129 |
+
font-style: italic;
|
130 |
+
color: #333;
|
131 |
+
font-size: 13px;
|
132 |
+
margin-top: 10px;
|
133 |
+
}
|
134 |
+
|
135 |
+
.xoo-as-checkbox .xoo-as-desc {
|
136 |
+
display: inline-block;
|
137 |
+
margin: 0 0 0 10px;
|
138 |
+
}
|
139 |
+
|
140 |
+
|
141 |
+
.xoo-as-checkbox_list .xoo-as-field label {
|
142 |
+
display: block;
|
143 |
+
font-size: 14px;
|
144 |
+
font-weight: 600;
|
145 |
+
margin-bottom: 18px;
|
146 |
+
}
|
147 |
+
|
148 |
+
.xoo-as-checkbox_list .xoo-as-field label input {
|
149 |
+
margin-right: 7px;
|
150 |
+
}
|
151 |
+
|
152 |
+
span.xoo-asc-head {
|
153 |
+
background-color: #457b9d;
|
154 |
+
width: 100%;
|
155 |
+
display: block;
|
156 |
+
margin: 0 -15px 30px;
|
157 |
+
padding: 10px 15px;
|
158 |
+
font-size: 16px;
|
159 |
+
color: #fff;
|
160 |
+
text-transform: uppercase;
|
161 |
+
font-weight: 600;
|
162 |
+
}
|
163 |
+
|
164 |
+
span.xoo-asc-desc {
|
165 |
+
display: block;
|
166 |
+
margin-top: -20px;
|
167 |
+
margin-bottom: 20px;
|
168 |
+
font-style: italic;
|
169 |
+
}
|
170 |
+
|
171 |
+
.xoo-as-has-asset .xoo-as-field label input {
|
172 |
+
opacity: 0;
|
173 |
+
height: 0;
|
174 |
+
width: 0;
|
175 |
+
margin: 0;
|
176 |
+
border: 0;
|
177 |
+
min-width: 0;
|
178 |
+
}
|
179 |
+
|
180 |
+
span.xoo-as-ra-icon {
|
181 |
+
font-size: 20px;
|
182 |
+
}
|
183 |
+
|
184 |
+
.xoo-as-has-asset .xoo-as-field input:checked + .xoo-as-radio-label {
|
185 |
+
background-color: #2196f3;
|
186 |
+
color: #fff;
|
187 |
+
display: inline-block;
|
188 |
+
padding: 5px;
|
189 |
+
border-radius: 5px;
|
190 |
+
}
|
191 |
+
|
192 |
+
.xoo-as-setting.xoo-as-has-asset label {
|
193 |
+
margin-right: 10px;
|
194 |
+
display: inline-block;
|
195 |
+
font-size: 16px;
|
196 |
+
}
|
197 |
+
|
198 |
+
|
199 |
+
ul.xoo-as-sortable-list[data-id="xoo-wsc-sy-options[scf-button-pos]"] {
|
200 |
+
max-width: 300px;
|
201 |
+
}
|
202 |
+
|
203 |
+
ul.xoo-as-sortable-list li {
|
204 |
+
padding: 5px 10px;
|
205 |
+
border: 2px solid #eee;
|
206 |
+
text-align: center;
|
207 |
+
}
|
208 |
+
|
209 |
+
ul.xoo-as-sortable-list {
|
210 |
+
margin: 0;
|
211 |
+
}
|
212 |
+
|
213 |
+
ul.xoo-as-sortable-list li {
|
214 |
+
cursor: move;
|
215 |
+
}
|
216 |
+
|
217 |
+
ul.horizontal.xoo-as-sortable-list li {
|
218 |
+
display: inline-block;
|
219 |
+
margin: 0 20px 0 0;
|
220 |
+
}
|
221 |
+
|
222 |
+
ul.xoo-as-sortable-list {
|
223 |
+
border: 1px solid #eee;
|
224 |
+
padding: 10px;
|
225 |
+
}
|
226 |
+
|
227 |
+
ul.horizontal.xoo-as-sortable-list {
|
228 |
+
display: table;
|
229 |
+
}
|
230 |
+
|
231 |
+
ul.horizontal.xoo-as-sortable-list li:last-child {
|
232 |
+
margin-right: 0;
|
233 |
+
}
|
234 |
+
|
235 |
+
ul.vertical.xoo-as-sortable-list li {
|
236 |
+
margin: 0 0 10px 0;
|
237 |
+
}
|
238 |
+
ul.vertical.xoo-as-sortable-list li:last-child{
|
239 |
+
margin-bottom: 0;
|
240 |
+
}
|
241 |
+
|
242 |
+
.xoo-sc-bottom-btns {
|
243 |
+
width: 100%;
|
244 |
+
display: flex;
|
245 |
+
z-index: 99999;
|
246 |
+
position: sticky;
|
247 |
+
max-width: 500px;
|
248 |
+
float: right;
|
249 |
+
bottom: 0;
|
250 |
+
}
|
251 |
+
|
252 |
+
button.xoo-as-form-save {
|
253 |
+
flex-grow: 1;
|
254 |
+
background-color: #2a9d8f;
|
255 |
+
text-transform: uppercase;
|
256 |
+
}
|
257 |
+
|
258 |
+
.xoo-sc-bottom-btns a {
|
259 |
+
text-align: center;
|
260 |
+
background-color: #1d3557;
|
261 |
+
}
|
262 |
+
|
263 |
+
|
264 |
+
.xoo-as-is-pro:after, .xoo-ass-pro-sec > span:first-child:after {
|
265 |
+
content: "PRO";
|
266 |
+
color: #4CAF50;
|
267 |
+
margin-left: 9px;
|
268 |
+
font-weight: bold;
|
269 |
+
}
|
270 |
+
|
271 |
+
|
272 |
+
.xoo-as-disable-pro .xoo-as-is-pro , .xoo-as-disable-pro .xoo-ass-pro-sec{
|
273 |
+
display: none!important;
|
274 |
+
}
|
275 |
+
|
276 |
+
|
277 |
+
.xoo-settings-container[active-tab="info"] .xoo-sc-bottom-btns {
|
278 |
+
display: none;
|
279 |
+
}
|
280 |
+
|
281 |
+
|
282 |
+
/* Shortcodes */
|
283 |
+
.xoo-sc-container:last-child {
|
284 |
+
border: 0;
|
285 |
+
}
|
286 |
+
|
287 |
+
.xoo-sc-shortcodes {
|
288 |
+
margin: 30px 0;
|
289 |
+
}
|
290 |
+
|
291 |
+
.xoo-sc-container {
|
292 |
+
padding: 30px 0;
|
293 |
+
border-bottom: 1px dashed #000;
|
294 |
+
}
|
295 |
+
|
296 |
+
.xoo-sc-shortcodes h3 {
|
297 |
+
margin: 0;
|
298 |
+
}
|
299 |
+
|
300 |
+
span.xoo-sc-name {
|
301 |
+
font-size: 20px;
|
302 |
+
margin-bottom: 20px;
|
303 |
+
color: #2a9d8f;
|
304 |
+
}
|
305 |
+
|
306 |
+
span.xoo-sc-desc {
|
307 |
+
font-size: 17px;
|
308 |
+
color: #777;
|
309 |
+
text-transform: lowercase;
|
310 |
+
}
|
311 |
+
|
312 |
+
.xoo-sc-container > div:first-child {
|
313 |
+
margin-bottom: 15px;
|
314 |
+
}
|
315 |
+
|
316 |
+
span.xoo-sc-example {
|
317 |
+
font-size: 16px;
|
318 |
+
color: #777;
|
319 |
+
margin-bottom: 20px;
|
320 |
+
display: block;
|
321 |
+
}
|
322 |
+
|
323 |
+
table.xoo-sc-table {
|
324 |
+
width: 100%;
|
325 |
+
text-align: center;
|
326 |
+
padding: 0;
|
327 |
+
border-spacing: 0;
|
328 |
+
overflow: auto;
|
329 |
+
}
|
330 |
+
|
331 |
+
table.xoo-sc-table th {
|
332 |
+
text-transform: uppercase;
|
333 |
+
color: #1d3557;
|
334 |
+
}
|
335 |
+
|
336 |
+
table.xoo-sc-table td, table.xoo-sc-table th {
|
337 |
+
padding: 10px 20px;
|
338 |
+
border: 1px solid #eee;
|
339 |
+
}
|
340 |
+
|
341 |
+
table.xoo-sc-table tr td:first-child {
|
342 |
+
font-weight: 600;
|
343 |
+
font-size: 14px;
|
344 |
+
color: #2a9d8f;
|
345 |
+
}
|
346 |
+
|
347 |
+
|
348 |
+
.xoo-as-field a {
|
349 |
+
margin-right: 20px;
|
350 |
+
}
|
351 |
+
|
352 |
+
@media only screen and (max-width: 772px) {
|
353 |
+
.xoo-as-setting{
|
354 |
+
flex-wrap: wrap;
|
355 |
+
}
|
356 |
+
}
|
includes/xoo-framework/admin/assets/js/xoo-admin-js.js
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($){
|
2 |
+
|
3 |
+
//Form reset
|
4 |
+
$('.xoo-as-form-reset').click(function(e){
|
5 |
+
if( !confirm( 'Are you sure?' ) )
|
6 |
+
e.preventDefault();
|
7 |
+
})
|
8 |
+
|
9 |
+
//Toggle pro
|
10 |
+
$('.xoo-as-pro-toggle').click(function(e){
|
11 |
+
$('.xoo-settings-container').toggleClass('xoo-as-disable-pro');
|
12 |
+
})
|
13 |
+
|
14 |
+
$('.xoo-settings-container').addClass('xoo-as-disable-pro');
|
15 |
+
|
16 |
+
//Switch Tabs
|
17 |
+
$('ul.xoo-sc-tabs li').click(function(){
|
18 |
+
$('ul.xoo-sc-tabs li, .xoo-sc-tab-content').removeClass('xoo-sct-active');
|
19 |
+
$(this).addClass('xoo-sct-active');
|
20 |
+
$(this).parents('.xoo-settings-container').attr('active-tab',$(this).data('tab'));
|
21 |
+
$('.xoo-sc-tab-content[data-tab="'+$(this).data('tab')+'"]').addClass('xoo-sct-active');
|
22 |
+
})
|
23 |
+
|
24 |
+
$('ul.xoo-sc-tabs li:nth-child(1)').trigger('click');
|
25 |
+
|
26 |
+
$('.xoo-as-form').on( 'submit', function(e){
|
27 |
+
|
28 |
+
e.preventDefault();
|
29 |
+
|
30 |
+
$button = $(this).find('.xoo-as-form-save');
|
31 |
+
$button.text( 'Saving....' );
|
32 |
+
|
33 |
+
var data = {
|
34 |
+
'form': $(this).serialize(),
|
35 |
+
'action': 'xoo_admin_settings_save',
|
36 |
+
'xoo_ff_nonce': xoo_admin_params.nonce
|
37 |
+
}
|
38 |
+
|
39 |
+
$.ajax({
|
40 |
+
url: xoo_admin_params.adminurl,
|
41 |
+
type: 'POST',
|
42 |
+
data: data,
|
43 |
+
success: function(response){
|
44 |
+
$button.text('Settings Saved');
|
45 |
+
setTimeout(function(){
|
46 |
+
$button.text( 'Save' )
|
47 |
+
},5000)
|
48 |
+
}
|
49 |
+
});
|
50 |
+
|
51 |
+
})
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
//Media
|
56 |
+
|
57 |
+
function renderMediaUploader(upload_btn) {
|
58 |
+
|
59 |
+
var file_frame, image_data;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* If an instance of file_frame already exists, then we can open it
|
63 |
+
* rather than creating a new instance.
|
64 |
+
*/
|
65 |
+
if ( undefined !== file_frame ) {
|
66 |
+
|
67 |
+
file_frame.open();
|
68 |
+
return;
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* If we're this far, then an instance does not exist, so we need to
|
74 |
+
* create our own.
|
75 |
+
*
|
76 |
+
* Here, use the wp.media library to define the settings of the Media
|
77 |
+
* Uploader. We're opting to use the 'post' frame which is a template
|
78 |
+
* defined in WordPress core and are initializing the file frame
|
79 |
+
* with the 'insert' state.
|
80 |
+
*
|
81 |
+
* We're also not allowing the user to select more than one image.
|
82 |
+
*/
|
83 |
+
file_frame = wp.media.frames.file_frame = wp.media({
|
84 |
+
frame: 'post',
|
85 |
+
state: 'insert',
|
86 |
+
multiple: false
|
87 |
+
});
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Setup an event handler for what to do when an image has been
|
91 |
+
* selected.
|
92 |
+
*
|
93 |
+
* Since we're using the 'view' state when initializing
|
94 |
+
* the file_frame, we need to make sure that the handler is attached
|
95 |
+
* to the insert event.
|
96 |
+
*/
|
97 |
+
file_frame.on( 'insert', function() {
|
98 |
+
|
99 |
+
// Read the JSON data returned from the Media Uploader
|
100 |
+
var json = file_frame.state().get( 'selection' ).first().toJSON();
|
101 |
+
|
102 |
+
upload_btn.siblings('.xoo-upload-url').val(json.url);
|
103 |
+
upload_btn.siblings('.xoo-upload-title').html(json.filename);
|
104 |
+
|
105 |
+
|
106 |
+
});
|
107 |
+
|
108 |
+
// Now display the actual file_frame
|
109 |
+
file_frame.open();
|
110 |
+
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
$( '.xoo-upload-icon' ).on( 'click', function( evt ) {
|
119 |
+
|
120 |
+
// Stop the anchor's default behavior
|
121 |
+
evt.preventDefault();
|
122 |
+
|
123 |
+
// Display the media uploader
|
124 |
+
renderMediaUploader($(this));
|
125 |
+
|
126 |
+
});
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
//Get media uploaded name
|
132 |
+
$('.xoo-upload-url').each(function(){
|
133 |
+
var media_url = $(this).val();
|
134 |
+
if(!media_url) return true; // Skip to next if no value is set
|
135 |
+
|
136 |
+
var index = media_url.lastIndexOf('/') + 1;
|
137 |
+
var media_name = media_url.substr(index);
|
138 |
+
|
139 |
+
$(this).siblings('.xoo-upload-title').html(media_name);
|
140 |
+
})
|
141 |
+
|
142 |
+
|
143 |
+
//Remove uploaded file
|
144 |
+
$('.xoo-remove-media').on('click',function(){
|
145 |
+
$(this).siblings('.xoo-upload-url').val('');
|
146 |
+
$(this).siblings('.xoo-upload-title').html('');
|
147 |
+
})
|
148 |
+
|
149 |
+
|
150 |
+
//Initialize color picker
|
151 |
+
$('.xoo-as-color-input').wpColorPicker();
|
152 |
+
|
153 |
+
//initialize sortable
|
154 |
+
$('.xoo-as-sortable-list').each( function( index, sortEl ){
|
155 |
+
var $sortEl = $(sortEl),
|
156 |
+
sortData = $sortEl.data('sort');
|
157 |
+
$sortEl.sortable( sortData );
|
158 |
+
} );
|
159 |
+
|
160 |
+
|
161 |
+
})
|
includes/xoo-framework/admin/class-xoo-admin-settings.php
ADDED
@@ -0,0 +1,753 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Xoo_Admin{
|
4 |
+
|
5 |
+
public $data = array();
|
6 |
+
|
7 |
+
public $tabs = array();
|
8 |
+
|
9 |
+
public $sections = array();
|
10 |
+
|
11 |
+
public $settings = array();
|
12 |
+
|
13 |
+
public $raw_settings = array();
|
14 |
+
|
15 |
+
public $tabPriority = 10;
|
16 |
+
|
17 |
+
public $helper;
|
18 |
+
|
19 |
+
public $settings_slug = '';
|
20 |
+
|
21 |
+
public $viewsPath = '';
|
22 |
+
|
23 |
+
public $hasPRO = false;
|
24 |
+
|
25 |
+
public $capability = 'manage_options';
|
26 |
+
|
27 |
+
public function __construct( $helper ){
|
28 |
+
$this->helper = $helper;
|
29 |
+
$this->settings_slug = $this->helper->slug . '-settings';
|
30 |
+
|
31 |
+
if( is_dir( $this->helper->path .'/admin/views' ) ){
|
32 |
+
$this->viewsPath = $this->helper->path .'/admin/views';
|
33 |
+
}
|
34 |
+
|
35 |
+
$this->hooks();
|
36 |
+
}
|
37 |
+
|
38 |
+
public function is_settings_page(){
|
39 |
+
return isset( $_GET['page'] ) && $_GET['page'] === $this->settings_slug;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function hooks(){
|
43 |
+
|
44 |
+
add_action( 'wp_ajax_xoo_admin_settings_save', array( $this, 'save_settings' ), 5 );
|
45 |
+
add_action( 'init', array( $this, 'reset_settings' ) );
|
46 |
+
add_action( 'init', array( $this, 'save_default_settings' ) );
|
47 |
+
|
48 |
+
if( $this->is_settings_page() ){
|
49 |
+
|
50 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts') );
|
51 |
+
|
52 |
+
add_action( 'wp_loaded', array( $this, 'set_info_tab' ) );
|
53 |
+
add_action( 'xoo_tab_page_start', array( $this, 'info_tab_data' ), 10, 2 );
|
54 |
+
add_action( 'xoo_tab_page_start', array( $this, 'shortcode_info' ), 20, 2 );
|
55 |
+
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
//Add info tab
|
60 |
+
public function set_info_tab(){
|
61 |
+
$this->register_tab( 'Info', 'info', '' );
|
62 |
+
}
|
63 |
+
|
64 |
+
public function info_tab_data( $tab_id, $tab_data ){
|
65 |
+
if( $tab_id !== 'info' ) return;
|
66 |
+
echo $this->helper->get_outdated_section();
|
67 |
+
?>
|
68 |
+
<p>
|
69 |
+
<h3>How to translate or change text?</h3>
|
70 |
+
<h4>The easiest method is to use a plugin called <a href="https://wordpress.org/plugins/loco-translate/" target="__blank">Loco translate</a>. You can easily change text from your dashboard</h4>
|
71 |
+
</p>
|
72 |
+
<?php
|
73 |
+
}
|
74 |
+
|
75 |
+
public function shortcode_info( $tab_id, $tab_data ){
|
76 |
+
if( $tab_id !== 'info' || !$this->viewsPath || !file_exists( $this->viewsPath.'/settings/shortcode-info.php' ) ) return;
|
77 |
+
$args = array(
|
78 |
+
'shortcodes' => include $this->viewsPath.'/settings/shortcode-info.php'
|
79 |
+
);
|
80 |
+
$this->helper->get_template( '/admin/templates/global/info-shortcode.php', $args, XOO_FW_DIR );
|
81 |
+
}
|
82 |
+
|
83 |
+
public function save_default_settings(){
|
84 |
+
|
85 |
+
if( !current_user_can( $this->capability ) ) return;
|
86 |
+
|
87 |
+
foreach ( $this->settings as $tab_id => $sections ) {
|
88 |
+
|
89 |
+
if( !isset( $this->tabs[ $tab_id ][ 'option_key' ] ) ) continue;
|
90 |
+
|
91 |
+
$option_key = $this->tabs[ $tab_id ][ 'option_key' ];
|
92 |
+
|
93 |
+
$savedOptions = (array) get_option( $option_key, true );
|
94 |
+
|
95 |
+
foreach ( $sections as $settings ) {
|
96 |
+
foreach ( $settings as $setting_id => $setting_data ) {
|
97 |
+
if( isset( $savedOptions[ $setting_id ] ) ) continue;
|
98 |
+
$savedOptions[ $setting_id ] = isset( $setting_data['default'] ) ? $setting_data['default'] : '';
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
update_option( $option_key, $savedOptions );
|
103 |
+
}
|
104 |
+
|
105 |
+
}
|
106 |
+
|
107 |
+
|
108 |
+
public function reset_settings(){
|
109 |
+
|
110 |
+
if( !current_user_can( $this->capability ) ) return;
|
111 |
+
|
112 |
+
if( !isset( $_GET['reset'] ) || !isset( $_GET['page'] ) || $this->settings_slug !== $_GET['page'] ) return;
|
113 |
+
|
114 |
+
|
115 |
+
foreach ( $this->settings as $tab_id => $sections ) {
|
116 |
+
|
117 |
+
if( !isset( $this->tabs[ $tab_id ][ 'option_key' ] ) ) continue;
|
118 |
+
|
119 |
+
update_option( $this->tabs[ $tab_id ][ 'option_key' ], array() );
|
120 |
+
|
121 |
+
}
|
122 |
+
|
123 |
+
wp_safe_redirect( esc_url( remove_query_arg( 'reset' ) ) );
|
124 |
+
|
125 |
+
}
|
126 |
+
|
127 |
+
|
128 |
+
public function save_settings(){
|
129 |
+
|
130 |
+
// Check for nonce security
|
131 |
+
if ( !wp_verify_nonce( $_POST['xoo_ff_nonce'], 'xoo-ff-nonce' ) ) {
|
132 |
+
die('cheating');
|
133 |
+
}
|
134 |
+
|
135 |
+
if( !current_user_can( $this->capability ) ) return;
|
136 |
+
|
137 |
+
$formData = array();
|
138 |
+
$parseFormData = parse_str( $_POST['form'], $formData );
|
139 |
+
|
140 |
+
foreach ( $formData as $option_key => $option_data ) {
|
141 |
+
|
142 |
+
$option_data = stripslashes_deep( $option_data );
|
143 |
+
update_option( $option_key, $option_data );
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
wp_send_json(array(
|
148 |
+
'error' => 0,
|
149 |
+
'notice' => 'Settings Saved',
|
150 |
+
));
|
151 |
+
}
|
152 |
+
|
153 |
+
|
154 |
+
|
155 |
+
|
156 |
+
public function enqueue_scripts() {
|
157 |
+
|
158 |
+
do_action( 'xoo_as_enqueue_scripts', $this->helper->slug );
|
159 |
+
|
160 |
+
wp_enqueue_media(); // media gallery
|
161 |
+
wp_enqueue_style( 'wp-color-picker' );
|
162 |
+
wp_enqueue_style( 'xoo-admin-style', XOO_FW_URL . '/admin/assets/css/xoo-admin-style.css', array(), XOO_FW_VERSION, 'all' );
|
163 |
+
wp_enqueue_script( 'xoo-admin-js', XOO_FW_URL . '/admin/assets/js/xoo-admin-js.js', array( 'jquery','wp-color-picker'), XOO_FW_VERSION, false );
|
164 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
165 |
+
|
166 |
+
wp_localize_script( 'xoo-admin-js', 'xoo_admin_params', array(
|
167 |
+
'adminurl' => admin_url().'admin-ajax.php',
|
168 |
+
'nonce' => wp_create_nonce('xoo-ff-nonce')
|
169 |
+
) );
|
170 |
+
|
171 |
+
}
|
172 |
+
|
173 |
+
public function register_menu_page( $args = array() ){
|
174 |
+
|
175 |
+
$args = wp_parse_args( $args, array(
|
176 |
+
'title' => 'Settings',
|
177 |
+
'menu_title' => 'Settings',
|
178 |
+
'capability' => $this->capability,
|
179 |
+
'slug' => $this->settings_slug,
|
180 |
+
'callback' => array( $this,'settings_page_markup' ),
|
181 |
+
'position' => null,
|
182 |
+
'icon' => '',
|
183 |
+
'has_submenu' => false,
|
184 |
+
) );
|
185 |
+
|
186 |
+
extract( $args );
|
187 |
+
|
188 |
+
add_menu_page(
|
189 |
+
$title,
|
190 |
+
$menu_title,
|
191 |
+
$capability,
|
192 |
+
$slug,
|
193 |
+
$callback,
|
194 |
+
$icon,
|
195 |
+
$position
|
196 |
+
);
|
197 |
+
|
198 |
+
if( $has_submenu ){
|
199 |
+
add_submenu_page(
|
200 |
+
$slug,
|
201 |
+
'Settings',
|
202 |
+
'Settings',
|
203 |
+
$capability,
|
204 |
+
$slug,
|
205 |
+
$callback
|
206 |
+
);
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
public function register_as_submenu_page( $args = array() ){
|
211 |
+
$args = wp_parse_args( $args, array(
|
212 |
+
'parent_slug' => 'settings',
|
213 |
+
'title' => 'Settings',
|
214 |
+
'menu_title' => 'Settings',
|
215 |
+
'capability' => $this->capability,
|
216 |
+
'slug' => $this->settings_slug,
|
217 |
+
'callback' => array( $this,'settings_page_markup' ),
|
218 |
+
'position' => null,
|
219 |
+
) );
|
220 |
+
|
221 |
+
extract( $args );
|
222 |
+
|
223 |
+
add_submenu_page(
|
224 |
+
$parent_slug,
|
225 |
+
$title,
|
226 |
+
$menu_title,
|
227 |
+
$capability,
|
228 |
+
$slug,
|
229 |
+
$callback
|
230 |
+
);
|
231 |
+
|
232 |
+
}
|
233 |
+
|
234 |
+
public function register_tab( $title, $id, $option_key = '', $pro = 'no', $args = array() ){
|
235 |
+
|
236 |
+
$args = wp_parse_args(
|
237 |
+
$args,
|
238 |
+
array(
|
239 |
+
'priority' => ''
|
240 |
+
)
|
241 |
+
);
|
242 |
+
|
243 |
+
$priority = $args['priority'];
|
244 |
+
unset( $args['priority'] );
|
245 |
+
|
246 |
+
$this->tabs[ $id ] = array(
|
247 |
+
'title' => $title,
|
248 |
+
'id' => $id,
|
249 |
+
'option_key' => $option_key,
|
250 |
+
'priority' => $priority,
|
251 |
+
'pro' => $pro,
|
252 |
+
'args' => $args
|
253 |
+
);
|
254 |
+
}
|
255 |
+
|
256 |
+
public function register_section( $title, $id, $tab_id, $desc = '', $pro = 'no', $args = array() ){
|
257 |
+
|
258 |
+
$args = wp_parse_args(
|
259 |
+
$args,
|
260 |
+
array(
|
261 |
+
'priority' => ''
|
262 |
+
)
|
263 |
+
);
|
264 |
+
|
265 |
+
$priority = $args['priority'];
|
266 |
+
unset( $args['priority'] );
|
267 |
+
|
268 |
+
$this->sections[ $tab_id ][ $id ] = array(
|
269 |
+
'title' => $title,
|
270 |
+
'id' => $id,
|
271 |
+
'tab' => $tab_id,
|
272 |
+
'priority' => $priority,
|
273 |
+
'desc' => $desc,
|
274 |
+
'pro' => $pro,
|
275 |
+
'args' => $args
|
276 |
+
);
|
277 |
+
}
|
278 |
+
|
279 |
+
public function register_setting( $callback, $title, $id, $section_id, $tab_id, $default = '', $desc = '', $pro = 'no', $args = array() ){
|
280 |
+
|
281 |
+
if( !isset( $this->tabs[ $tab_id ] ) || !isset( $this->sections[ $tab_id ][ $section_id ] ) ) return;
|
282 |
+
|
283 |
+
if( $pro === "yes" ){
|
284 |
+
$this->hasPRO = true;
|
285 |
+
}
|
286 |
+
|
287 |
+
$args = wp_parse_args(
|
288 |
+
$args,
|
289 |
+
array(
|
290 |
+
'priority' => ''
|
291 |
+
)
|
292 |
+
);
|
293 |
+
|
294 |
+
$priority = $args['priority'];
|
295 |
+
|
296 |
+
unset( $args['priority'] );
|
297 |
+
|
298 |
+
$this->settings[ $tab_id ][ $section_id ][ $id ] = $this->raw_settings[] = array(
|
299 |
+
'callback' => $callback,
|
300 |
+
'title' => $title,
|
301 |
+
'id' => $id,
|
302 |
+
'section_id' => $section_id,
|
303 |
+
'tab_id' => $tab_id,
|
304 |
+
'priority' => $priority ,
|
305 |
+
'default' => $default,
|
306 |
+
'desc' => $desc,
|
307 |
+
'pro' => $pro,
|
308 |
+
'args' => $args
|
309 |
+
);
|
310 |
+
}
|
311 |
+
|
312 |
+
|
313 |
+
protected function sort_by_priority( $data = array() ){
|
314 |
+
|
315 |
+
if( !is_array( $data ) || empty( $data ) ) return $data;
|
316 |
+
|
317 |
+
uasort( $data, function( $a, $b ){
|
318 |
+
|
319 |
+
if( $a['priority'] === $b['priority'] ){
|
320 |
+
return 0;
|
321 |
+
}
|
322 |
+
return $a['priority'] > $b['priority'] ? 1 : -1;
|
323 |
+
});
|
324 |
+
|
325 |
+
return $data;
|
326 |
+
|
327 |
+
}
|
328 |
+
|
329 |
+
|
330 |
+
|
331 |
+
public function sort(){
|
332 |
+
|
333 |
+
//Sort Tabs
|
334 |
+
$this->tabs = $this->sort_by_priority( $this->tabs );
|
335 |
+
|
336 |
+
//Sort Section
|
337 |
+
foreach ( $this->sections as $tab_id => $sections ) {
|
338 |
+
|
339 |
+
$priority = 10;
|
340 |
+
|
341 |
+
foreach ( $sections as $section_id => $section_data ) {
|
342 |
+
if( !$section_data['priority'] ){
|
343 |
+
$this->sections[ $tab_id ][ $section_id ]['priority'] = $priority;
|
344 |
+
$priority += 10;
|
345 |
+
}
|
346 |
+
}
|
347 |
+
|
348 |
+
|
349 |
+
$this->sections[ $tab_id ] = $this->sort_by_priority( $this->sections[ $tab_id ] );
|
350 |
+
}
|
351 |
+
|
352 |
+
|
353 |
+
//Sorting settings by tabs & sections
|
354 |
+
$sorted_settings = array();
|
355 |
+
|
356 |
+
foreach ( $this->tabs as $tab_id => $tab_data ) {
|
357 |
+
|
358 |
+
if( !isset( $this->settings[ $tab_id ] ) ) continue;
|
359 |
+
|
360 |
+
$sorted_settings[ $tab_id ] = $this->settings[ $tab_id ];
|
361 |
+
|
362 |
+
if( !isset( $this->sections[ $tab_id ] ) ) continue;
|
363 |
+
|
364 |
+
foreach ( $this->sections[ $tab_id ] as $section_id => $section_data ) {
|
365 |
+
|
366 |
+
if( !isset( $this->settings[ $tab_id ][ $section_id ] ) ) continue;
|
367 |
+
|
368 |
+
$sorted_settings[ $tab_id ][ $section_id ] = $this->settings[ $tab_id ][ $section_id ];
|
369 |
+
}
|
370 |
+
|
371 |
+
}
|
372 |
+
|
373 |
+
$this->settings = $sorted_settings;
|
374 |
+
|
375 |
+
|
376 |
+
foreach ( $this->settings as $tab_id => $sections ) {
|
377 |
+
|
378 |
+
foreach ( $sections as $section_id => $settings ) {
|
379 |
+
|
380 |
+
$priority = 10;
|
381 |
+
|
382 |
+
foreach ( $settings as $setting_id => $setting_data ) {
|
383 |
+
|
384 |
+
if( !$setting_data['priority'] ){
|
385 |
+
$this->settings[ $tab_id ][ $section_id ][ $setting_id ]['priority'] = $priority;
|
386 |
+
$priority += 10;
|
387 |
+
}
|
388 |
+
}
|
389 |
+
|
390 |
+
$this->settings[ $tab_id ][ $section_id ] = $this->sort_by_priority( $this->settings[ $tab_id ][ $section_id ] );
|
391 |
+
|
392 |
+
}
|
393 |
+
|
394 |
+
}
|
395 |
+
|
396 |
+
}
|
397 |
+
|
398 |
+
|
399 |
+
public function auto_generate_settings(){
|
400 |
+
|
401 |
+
if( !is_dir( $this->viewsPath ) ) return;
|
402 |
+
|
403 |
+
$tabs = (array) include $this->viewsPath.'/tabs.php';
|
404 |
+
$sections = (array) include $this->viewsPath.'/sections.php';
|
405 |
+
|
406 |
+
if( empty( $tabs ) || empty( $sections ) ) return;
|
407 |
+
|
408 |
+
//Register Tabs
|
409 |
+
foreach ( $tabs as $tab_id => $tab_data ) {
|
410 |
+
$this->register_tab(
|
411 |
+
$tab_data['title'],
|
412 |
+
$tab_data['id'],
|
413 |
+
$tab_data['option_key'],
|
414 |
+
isset( $tab_data['pro'] ) ? $tab_data['pro'] : 'no',
|
415 |
+
isset( $tab_data['args'] ) ? $tab_data['args'] : array()
|
416 |
+
);
|
417 |
+
}
|
418 |
+
|
419 |
+
//Register Sections
|
420 |
+
foreach ( $sections as $section_data ) {
|
421 |
+
$this->register_section(
|
422 |
+
$section_data['title'],
|
423 |
+
$section_data['id'],
|
424 |
+
$section_data['tab'],
|
425 |
+
isset( $section_data['desc'] ) ? $section_data['desc'] : '',
|
426 |
+
isset( $section_data['pro'] ) ? $section_data['pro'] : 'no',
|
427 |
+
isset( $section_data['args'] ) ? $section_data['args'] : array()
|
428 |
+
);
|
429 |
+
}
|
430 |
+
|
431 |
+
//Register Settings
|
432 |
+
$settings_folder = $this->viewsPath.'/settings';
|
433 |
+
|
434 |
+
if( !is_dir( $settings_folder ) ) return;
|
435 |
+
|
436 |
+
$settings_files = scandir( $settings_folder );
|
437 |
+
|
438 |
+
foreach ( $settings_files as $setting_file ) {
|
439 |
+
|
440 |
+
$tabID = pathinfo( $setting_file , PATHINFO_FILENAME );
|
441 |
+
if( !isset( $tabs[ $tabID ] ) ) continue;
|
442 |
+
$tab_settings = (array) include $settings_folder .'/'. $setting_file;
|
443 |
+
|
444 |
+
foreach ( $tab_settings as $setting_data ) {
|
445 |
+
$this->register_setting(
|
446 |
+
$setting_data['callback'],
|
447 |
+
$setting_data['title'],
|
448 |
+
$setting_data['id'],
|
449 |
+
$setting_data['section_id'],
|
450 |
+
$tabID,
|
451 |
+
isset( $setting_data['default'] ) ? $setting_data['default'] : '',
|
452 |
+
isset( $setting_data['desc'] ) ? $setting_data['desc'] : '',
|
453 |
+
isset( $setting_data['pro'] ) ? $setting_data['pro'] : 'no',
|
454 |
+
isset( $setting_data['args'] ) ? $setting_data['args'] : array()
|
455 |
+
);
|
456 |
+
}
|
457 |
+
|
458 |
+
}
|
459 |
+
}
|
460 |
+
|
461 |
+
|
462 |
+
public function settings_page_markup(){
|
463 |
+
|
464 |
+
$this->sort();
|
465 |
+
|
466 |
+
$args = array(
|
467 |
+
'adminObj' => $this,
|
468 |
+
'settings' => $this->settings,
|
469 |
+
'tabs' => $this->tabs,
|
470 |
+
'hasPRO' => $this->hasPRO
|
471 |
+
);
|
472 |
+
|
473 |
+
$args = apply_filters( 'xoo_admin_settings_output_args', $args, $this->helper->slug, $this );
|
474 |
+
|
475 |
+
$this->helper->get_template( '/admin/templates/xoo-admin-settings-output.php', $args, XOO_FW_DIR );
|
476 |
+
}
|
477 |
+
|
478 |
+
|
479 |
+
public function get_setting_upload_markup( $id, $value = '' ){
|
480 |
+
$args = array(
|
481 |
+
'id' => $id,
|
482 |
+
'value' => $value
|
483 |
+
);
|
484 |
+
return $this->helper->get_template( '/admin/templates/global/setting-upload.php', $args, XOO_FW_DIR, true );
|
485 |
+
}
|
486 |
+
|
487 |
+
|
488 |
+
public function create_settings_html( $tab_id ){
|
489 |
+
|
490 |
+
if( !isset( $this->settings[ $tab_id ] ) ) return;
|
491 |
+
|
492 |
+
$html = '';
|
493 |
+
|
494 |
+
$tab_settings = $this->settings[ $tab_id ];
|
495 |
+
$option_key = $this->tabs[ $tab_id ]['option_key'];
|
496 |
+
$option_value = (array) get_option( $option_key, true );
|
497 |
+
|
498 |
+
foreach ( $tab_settings as $section_id => $settings ) {
|
499 |
+
|
500 |
+
$section_container = '<div class="%1$s">%2$s</div>';
|
501 |
+
$section_settings = $section_heading = '';
|
502 |
+
$section_data = $this->sections[ $tab_id ][ $section_id ];
|
503 |
+
|
504 |
+
foreach ( $settings as $setting_id => $setting_data ) {
|
505 |
+
$id = $option_key.'['.$setting_id.']';
|
506 |
+
$value = isset( $option_value[ $setting_id ] ) ? $option_value[ $setting_id ] : null;
|
507 |
+
$section_settings .= $this->get_setting_html( $id, $setting_data, $value );
|
508 |
+
}
|
509 |
+
|
510 |
+
if( $section_settings ){
|
511 |
+
|
512 |
+
$section_heading = '<span class="xoo-asc-head xoo-asc-'.$section_id.'">'.$section_data['title'].'</span>';
|
513 |
+
|
514 |
+
if( $section_data['desc'] ){
|
515 |
+
$section_heading .= '<span class="xoo-asc-desc">'.$section_data['desc'].'</span>';
|
516 |
+
}
|
517 |
+
|
518 |
+
}
|
519 |
+
|
520 |
+
$section_class = array(
|
521 |
+
'xoo-ass-'.$tab_id.'-'.$section_id
|
522 |
+
);
|
523 |
+
|
524 |
+
if( $section_data['pro'] === "yes" ){
|
525 |
+
$section_class[] = 'xoo-ass-pro-sec';
|
526 |
+
}
|
527 |
+
|
528 |
+
$html .= sprintf( $section_container, implode( " ", $section_class ) , $section_heading . $section_settings );
|
529 |
+
|
530 |
+
}
|
531 |
+
|
532 |
+
echo $html;
|
533 |
+
|
534 |
+
}
|
535 |
+
|
536 |
+
|
537 |
+
public function get_setting_html( $field_id, $field_args, $value = null ){
|
538 |
+
|
539 |
+
$field_args = wp_parse_args( $field_args, array(
|
540 |
+
'callback' => 'text',
|
541 |
+
'default' => '',
|
542 |
+
'desc' => '',
|
543 |
+
'pro' => 'no',
|
544 |
+
'label_class' => array(),
|
545 |
+
'container_class' => array(),
|
546 |
+
'custom_attributes' => array()
|
547 |
+
) );
|
548 |
+
|
549 |
+
extract( $field_args );
|
550 |
+
|
551 |
+
if ( is_null( $value ) ) {
|
552 |
+
$value = $default;
|
553 |
+
}
|
554 |
+
|
555 |
+
if( $callback === 'sortable' && isset( $args['sort_options'] ) ){
|
556 |
+
$custom_attributes['data-options'] = $args['sort_options'];
|
557 |
+
}
|
558 |
+
|
559 |
+
$custom_attributes_html = array();
|
560 |
+
|
561 |
+
if ( ! empty( $custom_attributes ) && is_array( $custom_attributes ) ) {
|
562 |
+
foreach ( $custom_attributes as $attribute => $attribute_value ) {
|
563 |
+
$attribute_value = is_array( $attribute_value ) ? json_encode( $attribute_value ) : $attribute_value;
|
564 |
+
$custom_attributes_html[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
|
565 |
+
}
|
566 |
+
}
|
567 |
+
|
568 |
+
$custom_attributes = implode( ' ', $custom_attributes_html );
|
569 |
+
|
570 |
+
$container_class = array_merge( $container_class, array(
|
571 |
+
'xoo-as-setting', 'xoo-as-'.$callback
|
572 |
+
) );
|
573 |
+
|
574 |
+
if( $pro === "yes" ){
|
575 |
+
$container_class[] = 'xoo-as-is-pro';
|
576 |
+
}
|
577 |
+
|
578 |
+
if( $callback === 'radio' && isset( $args['options'], $args['has_asset'] ) ){
|
579 |
+
$container_class[] = 'xoo-as-has-asset';
|
580 |
+
}
|
581 |
+
|
582 |
+
$label_class = array_merge( $label_class, array(
|
583 |
+
'xoo-as-label'
|
584 |
+
) );
|
585 |
+
|
586 |
+
|
587 |
+
|
588 |
+
$field_container = '<div class="%1$s">%2$s</div>';
|
589 |
+
|
590 |
+
$field = '';
|
591 |
+
switch ( $callback ) {
|
592 |
+
|
593 |
+
case 'text':
|
594 |
+
case 'number':
|
595 |
+
$field .= '<input type="'.$callback.'" name="'.$field_id.'" value="'.$value.'" '.$custom_attributes.'>';
|
596 |
+
break;
|
597 |
+
|
598 |
+
case 'textarea':
|
599 |
+
$rows = isset( $args['rows'] ) ? $args['rows'] : 4;
|
600 |
+
$cols = isset( $args['cols'] ) ? $args['cols'] : 50;
|
601 |
+
$field .= '<textarea name="'.$field_id.'" rows="'.$rows.'" cols="'.$cols.'">'.$value.'</textarea>';
|
602 |
+
break;
|
603 |
+
|
604 |
+
case 'color':
|
605 |
+
$field .= '<input type="text" name="'.$field_id.'" class="xoo-as-color-input" value="'.$value.'" '.$custom_attributes.'>';
|
606 |
+
break;
|
607 |
+
|
608 |
+
case 'checkbox':
|
609 |
+
$field = '<label class="xoo-as-switch">';
|
610 |
+
$field .= '<input type="hidden" name="'.$field_id.'" value="no">';
|
611 |
+
$field .= '<input name='.$field_id.' type="checkbox" value="yes" '.checked( $value, 'yes', false ).' '.$custom_attributes.'>';
|
612 |
+
$field .= '<span class="xoo-as-slider"></span>';
|
613 |
+
$field .= '</label>';
|
614 |
+
break;
|
615 |
+
|
616 |
+
case 'checkbox_list':
|
617 |
+
|
618 |
+
if( !isset( $args['options'] ) || empty( $args['options'] ) ) break;
|
619 |
+
|
620 |
+
$field .= '<input name="'.$field_id.'" type="hidden" value="">';
|
621 |
+
|
622 |
+
foreach ( $args['options'] as $option_key => $option_label ) {
|
623 |
+
|
624 |
+
$checked = is_array( $value ) && in_array( $option_key, $value ) ? 'checked' : '';
|
625 |
+
$pro_class = is_array( $pro ) && in_array( $option_key, $pro ) ? 'xoo-as-is-pro' : '';
|
626 |
+
|
627 |
+
$checkbox_list = '<label class="%1$s">%2$s</label>';
|
628 |
+
|
629 |
+
$list_html = '<input name="'.$field_id.'[]" type="checkbox" value="'.$option_key.'" '.$checked.'>';
|
630 |
+
$list_html .= '<span>'.$option_label.'</span>';
|
631 |
+
|
632 |
+
$field .= sprintf( $checkbox_list, $pro_class, $list_html );
|
633 |
+
|
634 |
+
}
|
635 |
+
|
636 |
+
break;
|
637 |
+
|
638 |
+
|
639 |
+
case 'select':
|
640 |
+
|
641 |
+
if( !isset( $args['options'] ) || empty( $args['options'] ) ) break;
|
642 |
+
|
643 |
+
$select = '<select name="%1$s" '.$custom_attributes.'>%2$s</select>';
|
644 |
+
$options = '';
|
645 |
+
|
646 |
+
foreach ( $args['options'] as $option_key => $option_label ) {
|
647 |
+
$options .= '<option value="'.$option_key.'" '.selected( $option_key, $value, false ).'>'.$option_label.'</option>';
|
648 |
+
}
|
649 |
+
|
650 |
+
$field .= sprintf( $select, $field_id, $options );
|
651 |
+
|
652 |
+
break;
|
653 |
+
|
654 |
+
|
655 |
+
case 'radio':
|
656 |
+
|
657 |
+
if( !isset( $args['options'] ) || empty( $args['options'] ) ) break;
|
658 |
+
|
659 |
+
$has_asset = isset( $args['has_asset'] );
|
660 |
+
$asset_type = isset( $args['asset_type'] ) ? $args['asset_type'] : 'text';
|
661 |
+
|
662 |
+
foreach ( $args['options'] as $option_key => $option_label ) {
|
663 |
+
|
664 |
+
$radio_list = '<label>%1$s</label>';
|
665 |
+
|
666 |
+
$list_html = '<input name="'.$field_id.'" type="radio" value="'.$option_key.'" '.checked( $value, $option_key, false ).'>';
|
667 |
+
|
668 |
+
$label_container = '<span class="xoo-as-radio-label">%s</span>';
|
669 |
+
$label_html = '';
|
670 |
+
|
671 |
+
if( $has_asset ){
|
672 |
+
|
673 |
+
if( $asset_type === 'icon' ){
|
674 |
+
$label_html .= '<span class="xoo-as-ra-icon '.$option_key.'"></span>';
|
675 |
+
}elseif ( $asset_type === 'image' ) {
|
676 |
+
$label_html .= '<img src="'.$option_key.'">'.$option_label;
|
677 |
+
}
|
678 |
+
else{
|
679 |
+
$label_html .= $option_label;
|
680 |
+
}
|
681 |
+
|
682 |
+
}
|
683 |
+
else{
|
684 |
+
$label_html .= $option_label;
|
685 |
+
}
|
686 |
+
|
687 |
+
$list_html .= sprintf( $label_container, $label_html );
|
688 |
+
|
689 |
+
$field .= sprintf( $radio_list, $list_html );
|
690 |
+
|
691 |
+
}
|
692 |
+
|
693 |
+
break;
|
694 |
+
|
695 |
+
|
696 |
+
case 'links':
|
697 |
+
|
698 |
+
if( !isset( $args['options'] ) || empty( $args['options'] ) ) break;
|
699 |
+
|
700 |
+
foreach ( $args['options'] as $url => $label ) {
|
701 |
+
$field .= sprintf( '<a href="%1$s">%2$s</a>', $url, $label );
|
702 |
+
}
|
703 |
+
|
704 |
+
break;
|
705 |
+
|
706 |
+
|
707 |
+
case 'sortable':
|
708 |
+
|
709 |
+
if( !isset( $args['options'] ) || empty( $args['options'] ) ) break;
|
710 |
+
|
711 |
+
$sort_container = '<ul data-id="%1$s" class="%2$s" '.$custom_attributes.'>%3$s</ul>';
|
712 |
+
$sort_children = '';
|
713 |
+
|
714 |
+
foreach ( $args['options'] as $option_key => $option_label ) {
|
715 |
+
|
716 |
+
$child = '<li>%1$s %2$s</li>';
|
717 |
+
$input = '<input name="'.$field_id.'[]" type="hidden" value="'.$option_key.'">';
|
718 |
+
|
719 |
+
$sort_children .= sprintf( $child, $option_label, $input );
|
720 |
+
|
721 |
+
}
|
722 |
+
|
723 |
+
$display = isset( $args['display'] ) ? $args['display'] : 'vertical';
|
724 |
+
|
725 |
+
$field .= sprintf( $sort_container, $field_id, $display.' xoo-as-sortable-list', $sort_children );
|
726 |
+
|
727 |
+
break;
|
728 |
+
|
729 |
+
case 'upload':
|
730 |
+
$field .= $this->get_setting_upload_markup( $field_id, $value );
|
731 |
+
|
732 |
+
default:
|
733 |
+
# code...
|
734 |
+
break;
|
735 |
+
}
|
736 |
+
|
737 |
+
$field = apply_filters( 'xoo_admin_setting_field_callback_html', $field, $field_id, $value, $args );
|
738 |
+
|
739 |
+
if( $desc ){
|
740 |
+
$field .= '<span class="xoo-as-desc">'.$desc.'</span>';
|
741 |
+
}
|
742 |
+
|
743 |
+
$label = '<div class="xoo-as-label">'.$title.'</div>';
|
744 |
+
$field = $label.'<div class="xoo-as-field">'.$field.'</div>';
|
745 |
+
|
746 |
+
$container_class = implode( ' ' , $container_class );
|
747 |
+
$field = sprintf( $field_container, $container_class, $field );
|
748 |
+
|
749 |
+
return apply_filters( 'xoo_admin_setting_field', $field, $field_id, $value, $args );
|
750 |
+
|
751 |
+
}
|
752 |
+
|
753 |
+
}
|
includes/xoo-framework/admin/templates/global/info-shortcode.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if( empty( $shortcodes ) ) return; ?>
|
2 |
+
|
3 |
+
<div class="xoo-sc-shortcodes">
|
4 |
+
<h3>Shortcodes</h3>
|
5 |
+
<?php foreach ( $shortcodes as $key => $data ): ?>
|
6 |
+
|
7 |
+
<div class="xoo-sc-container">
|
8 |
+
<div>
|
9 |
+
<span class="xoo-sc-name"><?php echo $data['shortcode'] ?></span> - <span class="xoo-sc-desc"><?php echo $data['desc'] ?></span>
|
10 |
+
</div>
|
11 |
+
<span class="xoo-sc-example">Eg: <?php echo $data['example'] ?></span>
|
12 |
+
|
13 |
+
<?php if( isset( $data['atts'] ) ): ?>
|
14 |
+
<table class="xoo-sc-table">
|
15 |
+
|
16 |
+
<tr>
|
17 |
+
<th>Attribute</th>
|
18 |
+
<th>Expected</th>
|
19 |
+
<th>Default</th>
|
20 |
+
<th>Description</th>
|
21 |
+
</tr>
|
22 |
+
|
23 |
+
<?php foreach ( $data['atts'] as $attData){
|
24 |
+
echo '<tr>';
|
25 |
+
foreach ( $attData as $keyTD => $valueTD ) {
|
26 |
+
echo '<td>'.$valueTD.'</td>';
|
27 |
+
}
|
28 |
+
echo '</tr>';
|
29 |
+
} ?>
|
30 |
+
|
31 |
+
|
32 |
+
</table>
|
33 |
+
<?php endif; ?>
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<?php endforeach; ?>
|
37 |
+
</div>
|
includes/xoo-framework/admin/templates/global/setting-upload.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( !isset( $id ) || !isset( $value ) ){
|
4 |
+
echo 'Input Id/ Value not set';
|
5 |
+
return;
|
6 |
+
}
|
7 |
+
|
8 |
+
?>
|
9 |
+
<div class="xoo-as-upload-container">
|
10 |
+
<a class="button-primary xoo-upload-icon">Select</a>
|
11 |
+
<input type="hidden" name="<?php echo $id; ?>" class="xoo-upload-url" value="<?php echo $value; ?>">
|
12 |
+
<a class="button xoo-remove-media">Remove</a>
|
13 |
+
<span class="xoo-upload-title"></span>
|
14 |
+
</div>
|
includes/xoo-framework/admin/templates/xoo-admin-settings-output.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="xoo-settings-container">
|
2 |
+
|
3 |
+
<ul class="xoo-sc-tabs">
|
4 |
+
<?php foreach( $tabs as $tab_id => $tab_data ): ?>
|
5 |
+
<li data-tab="<?php echo $tab_id; ?>" <?php if( $tab_data['pro'] === 'yes' ) echo 'class="xoo-as-is-pro"'; ?>><?php echo $tab_data['title']; ?></li>
|
6 |
+
<?php endforeach; ?>
|
7 |
+
</ul>
|
8 |
+
|
9 |
+
<form class="xoo-as-form">
|
10 |
+
|
11 |
+
<?php foreach( $tabs as $tab_id => $tab_data ): ?>
|
12 |
+
<div class="xoo-sc-tab-content <?php if( $tab_data['pro'] === 'yes' ) echo 'xoo-as-is-pro'; ?>" data-tab="<?php echo $tab_id; ?>">
|
13 |
+
<?php do_action( 'xoo_tab_page_start', $tab_id, $tab_data ); ?>
|
14 |
+
<?php $adminObj->create_settings_html( $tab_id ); ?>
|
15 |
+
<?php do_action( 'xoo_tab_page_end', $tab_id, $tab_data ); ?>
|
16 |
+
</div>
|
17 |
+
<?php endforeach; ?>
|
18 |
+
|
19 |
+
<div class="xoo-sc-bottom-btns">
|
20 |
+
<?php if( $hasPRO ): ?>
|
21 |
+
<a class="xoo-as-pro-toggle">Show/Hide Pro options</a>
|
22 |
+
<?php endif; ?>
|
23 |
+
<button type="submit" class="xoo-as-form-save">Save</button>
|
24 |
+
<a class="xoo-as-form-reset" href="<?php echo esc_url( add_query_arg( 'reset', true ) ) ?>">Reset</a>
|
25 |
+
</div>
|
26 |
+
|
27 |
+
</form>
|
28 |
+
|
29 |
+
</div>
|
includes/xoo-framework/class-xoo-exception.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly
|
5 |
+
}
|
6 |
+
|
7 |
+
class Xoo_Exception extends Exception{
|
8 |
+
|
9 |
+
public $wpErrorCode = null;
|
10 |
+
|
11 |
+
public function __construct($error, $code = 0, Exception $previous = null){
|
12 |
+
|
13 |
+
if(is_wp_error( $error )){
|
14 |
+
$message = $error->get_error_message();
|
15 |
+
$this->wpErrorCode = $error->get_error_code();
|
16 |
+
}else{
|
17 |
+
$message = $error;
|
18 |
+
}
|
19 |
+
|
20 |
+
parent::__construct($message, $code, $previous);
|
21 |
+
|
22 |
+
}
|
23 |
+
|
24 |
+
public function getWpErrorCode(){
|
25 |
+
return $this->wpErrorCode;
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
29 |
+
|
includes/xoo-framework/class-xoo-helper.php
ADDED
@@ -0,0 +1,310 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Xoo_Helper{
|
4 |
+
|
5 |
+
public $slug, $path;
|
6 |
+
public $admin;
|
7 |
+
|
8 |
+
public function __construct( $slug, $path ){
|
9 |
+
$this->slug = $slug;
|
10 |
+
$this->path = $path;
|
11 |
+
$this->set_constants();
|
12 |
+
$this->includes();
|
13 |
+
$this->hooks();
|
14 |
+
}
|
15 |
+
|
16 |
+
|
17 |
+
public function set_constants(){
|
18 |
+
$this->define( 'XOO_FW_URL', untrailingslashit(plugin_dir_url( XOO_FW_DIR .'/'.basename( XOO_FW_DIR ) ) ) );
|
19 |
+
$this->define( 'XOO_FW_VERSION', '1.0' );
|
20 |
+
}
|
21 |
+
|
22 |
+
public function define( $name, $value ){
|
23 |
+
if( !defined( $name ) ){
|
24 |
+
define( $name, $value );
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
public function includes(){
|
29 |
+
require_once __DIR__.'/admin/class-xoo-admin-settings.php';
|
30 |
+
$this->admin = new Xoo_Admin( $this );
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
public function hooks(){
|
35 |
+
add_action( 'plugins_loaded', array( $this, 'internationalize' ), 100 );
|
36 |
+
add_action( 'admin_init', array( $this, 'time_to_update_theme_templates_data' ) );
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
public function get_template( $template_name, $args = array(), $template_path = '', $return = false ){
|
41 |
+
|
42 |
+
$located = $this->locate_template( $template_name, $template_path );
|
43 |
+
|
44 |
+
$located = apply_filters( 'xoo_'.$this->slug.'_get_template', $located, $template_name, $args, $template_path );
|
45 |
+
|
46 |
+
if ( $args && is_array ( $args ) ) {
|
47 |
+
extract ( $args );
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( $return ) {
|
51 |
+
ob_start ();
|
52 |
+
}
|
53 |
+
|
54 |
+
|
55 |
+
// include file located
|
56 |
+
if ( file_exists ( $located ) ) {
|
57 |
+
include ( $located );
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( $return ) {
|
61 |
+
return ob_get_clean ();
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
public function locate_template( $template_name, $template_path ){
|
66 |
+
|
67 |
+
$lookIn = array(
|
68 |
+
'templates/'.$this->slug.'/'.$template_name,
|
69 |
+
'templates/'.$this->slug.'/'.basename( $template_name ),
|
70 |
+
$template_name,
|
71 |
+
);
|
72 |
+
|
73 |
+
// Look within passed path within the theme - this is priority.
|
74 |
+
$template = locate_template( $lookIn );
|
75 |
+
|
76 |
+
//Check woocommerce directory for older version
|
77 |
+
if( !$template && class_exists( 'woocommerce' ) ){
|
78 |
+
if( file_exists( WC()->plugin_path() . '/templates/' . $template_name ) ){
|
79 |
+
$template = WC()->plugin_path() . '/templates/' . $template_name;
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
if ( ! $template ) {
|
85 |
+
if( $template_path ){
|
86 |
+
$template = $template_path.'/'.$template_name;
|
87 |
+
|
88 |
+
}
|
89 |
+
else{
|
90 |
+
$template = $this->path .'/templates/'. $template_name;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
return apply_filters( 'xoo_'.$this->slug.'_template_located', $template, $template_name, $template_path );
|
95 |
+
}
|
96 |
+
|
97 |
+
|
98 |
+
public function get_option( $key, $subkey = '' ){
|
99 |
+
$option = get_option( $key );
|
100 |
+
if( $subkey ){
|
101 |
+
if( !isset( $option[ $subkey ] ) ) return;
|
102 |
+
return !is_array( $option[ $subkey ] ) ? esc_attr( $option[ $subkey ] ) : $option[ $subkey ];
|
103 |
+
}
|
104 |
+
else{
|
105 |
+
return $option;
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
|
110 |
+
public function internationalize(){
|
111 |
+
$locale = apply_filters( 'plugin_locale', get_locale(), $this->slug );
|
112 |
+
load_textdomain( $this->slug, WP_LANG_DIR . '/'.$this->slug.'-' . $locale . '.mo' ); //wp-content languages
|
113 |
+
load_plugin_textdomain( $this->slug, FALSE, $this->path . '/languages/' ); // Plugin Languages
|
114 |
+
}
|
115 |
+
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Retrieve metadata from a file. Based on WP Core's get_file_data function.
|
119 |
+
*/
|
120 |
+
public function get_file_version( $file ) {
|
121 |
+
|
122 |
+
// Avoid notices if file does not exist.
|
123 |
+
if ( ! file_exists( $file ) ) {
|
124 |
+
return '';
|
125 |
+
}
|
126 |
+
|
127 |
+
// We don't need to write to the file, so just open for reading.
|
128 |
+
$fp = fopen( $file, 'r' ); // @codingStandardsIgnoreLine.
|
129 |
+
|
130 |
+
// Pull only the first 8kiB of the file in.
|
131 |
+
$file_data = fread( $fp, 8192 ); // @codingStandardsIgnoreLine.
|
132 |
+
|
133 |
+
// PHP will close file handle, but we are good citizens.
|
134 |
+
fclose( $fp ); // @codingStandardsIgnoreLine.
|
135 |
+
|
136 |
+
// Make sure we catch CR-only line endings.
|
137 |
+
$file_data = str_replace( "\r", "\n", $file_data );
|
138 |
+
$version = '';
|
139 |
+
|
140 |
+
if ( preg_match( '/^[ \t\/*#@]*' . preg_quote( '@version', '/' ) . '(.*)$/mi', $file_data, $match ) && $match[1] ) {
|
141 |
+
$version = _cleanup_header_comment( $match[1] );
|
142 |
+
}
|
143 |
+
|
144 |
+
return $version;
|
145 |
+
}
|
146 |
+
|
147 |
+
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Look for theme templates
|
151 |
+
*
|
152 |
+
* @return array
|
153 |
+
*/
|
154 |
+
public function get_theme_templates( $scan_woocommerce = false ) {
|
155 |
+
$override_data = array();
|
156 |
+
$template_paths = apply_filters( 'xoo_'.$this->slug.'_template_overrides_scan_paths', array( 'templates' => $this->path . '/templates/' ) );
|
157 |
+
$scanned_files = $theme_templates = array();
|
158 |
+
|
159 |
+
foreach ( $template_paths as $lookInDir => $template_path ) {
|
160 |
+
$scanned_files[ $lookInDir ] = $this->scan_template_files( $template_path );
|
161 |
+
}
|
162 |
+
|
163 |
+
foreach ( $scanned_files as $lookInDir => $files ) {
|
164 |
+
foreach ( $files as $file ) {
|
165 |
+
|
166 |
+
$basename = basename( $file );
|
167 |
+
|
168 |
+
if ( file_exists( get_stylesheet_directory() . '/templates/' . $this->slug .'/'. $file ) ) {
|
169 |
+
$theme_file = get_stylesheet_directory() . '/templates/' . $this->slug .'/'. $file;
|
170 |
+
} elseif ( class_exists( 'woocommerce' ) && $scan_woocommerce && file_exists( get_template_directory() . '/' . WC()->template_path() . $file ) ) {
|
171 |
+
$theme_file = get_template_directory() . '/' . WC()->template_path() . $file;
|
172 |
+
} else {
|
173 |
+
$theme_file = false;
|
174 |
+
}
|
175 |
+
|
176 |
+
|
177 |
+
if ( ! empty( $theme_file ) ) {
|
178 |
+
$core_version = $this->get_file_version( $template_paths[ $lookInDir ] .'/'. $file );
|
179 |
+
$theme_version = $this->get_file_version( $theme_file );
|
180 |
+
$theme_templates[] = array(
|
181 |
+
'file' => $theme_file,
|
182 |
+
'name' => str_replace( array( WP_CONTENT_DIR, '\\' ) , array( '', '/' ), $theme_file ),
|
183 |
+
'theme_version' => $theme_version,
|
184 |
+
'core_version' => $core_version,
|
185 |
+
'is_outdated' => version_compare( $core_version , $theme_version, '>' ) ? 'yes' : 'no',
|
186 |
+
'basename' => $basename,
|
187 |
+
);
|
188 |
+
}
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
return $theme_templates;
|
193 |
+
}
|
194 |
+
|
195 |
+
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Scan the template files.
|
199 |
+
*
|
200 |
+
* @param string $template_path Path to the template directory.
|
201 |
+
* @return array
|
202 |
+
*/
|
203 |
+
public function scan_template_files( $template_path ) {
|
204 |
+
$files = @scandir( $template_path ); // @codingStandardsIgnoreLine.
|
205 |
+
$result = array();
|
206 |
+
|
207 |
+
if ( ! empty( $files ) ) {
|
208 |
+
|
209 |
+
foreach ( $files as $key => $value ) {
|
210 |
+
|
211 |
+
if ( ! in_array( $value, array( '.', '..' ), true ) ) {
|
212 |
+
|
213 |
+
if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ) {
|
214 |
+
$sub_files = $this->scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value );
|
215 |
+
foreach ( $sub_files as $sub_file ) {
|
216 |
+
$result[] = $value . DIRECTORY_SEPARATOR . $sub_file;
|
217 |
+
}
|
218 |
+
} else {
|
219 |
+
$result[] = $value;
|
220 |
+
}
|
221 |
+
}
|
222 |
+
}
|
223 |
+
}
|
224 |
+
return $result;
|
225 |
+
}
|
226 |
+
|
227 |
+
|
228 |
+
|
229 |
+
public function get_outdated_section(){
|
230 |
+
|
231 |
+
$odTempData = $this->get_theme_templates_data();
|
232 |
+
ob_start();
|
233 |
+
?>
|
234 |
+
<div class="xoo-outdatedtemplates">
|
235 |
+
<?php if( $odTempData['has_outdated'] === "yes" ): ?>
|
236 |
+
<span>You're using outdated version of templates, please fetch a new copy from the plugin templates folder</span>
|
237 |
+
<ul>
|
238 |
+
<?php
|
239 |
+
foreach ( $odTempData['templates'] as $template_data ){
|
240 |
+
if( $template_data['is_outdated'] !== 'yes' ) continue;
|
241 |
+
echo '<li><span class="dashicons dashicons-warning"></span>'.$template_data['name'].'</li>';
|
242 |
+
}
|
243 |
+
?>
|
244 |
+
</ul>
|
245 |
+
<?php else: ?>
|
246 |
+
<div>Templates Status
|
247 |
+
<span class="dashicons dashicons-yes-alt" style="font-size: 14px;color: #008000;line-height: 1.3;"></span>
|
248 |
+
<a href="https://docs.xootix.com/<?php echo $this->slug; ?>" target="_blank">How to override?</a>
|
249 |
+
</div>
|
250 |
+
<?php endif; ?>
|
251 |
+
<span>Last checked: <?php echo get_date_from_gmt( date( 'Y-m-d H:i:s', $odTempData['last_scanned'] ) ); ?></span>
|
252 |
+
<a href="<?php echo esc_url( add_query_arg( array( 'scan_templates' => 'yes' , 'slug' => $this->slug ) ) ); ?>">Check again</a>
|
253 |
+
</div>
|
254 |
+
<?php
|
255 |
+
return ob_get_clean();
|
256 |
+
}
|
257 |
+
|
258 |
+
|
259 |
+
public function get_theme_templates_data(){
|
260 |
+
|
261 |
+
$data = (array) get_option( 'xoo_'.$this->slug.'_theme_templates_data' );
|
262 |
+
if( empty( $data ) || !isset( $data['last_scanned'] ) ){
|
263 |
+
return $this->update_theme_templates_data();
|
264 |
+
}
|
265 |
+
return $data;
|
266 |
+
}
|
267 |
+
|
268 |
+
|
269 |
+
public function time_to_update_theme_templates_data(){
|
270 |
+
|
271 |
+
$tempData = $this->get_theme_templates_data();
|
272 |
+
|
273 |
+
if( ( ( time() - $tempData['last_scanned'] ) > ( 86400 * 1 ) ) || ( isset( $_GET['scan_templates'] ) && isset( $_GET['slug'] ) && $_GET['slug'] === $this->slug ) ){
|
274 |
+
$this->update_theme_templates_data();
|
275 |
+
wp_safe_redirect( remove_query_arg( array( 'scan_templates', 'slug' ) ) );
|
276 |
+
die();
|
277 |
+
}
|
278 |
+
}
|
279 |
+
|
280 |
+
|
281 |
+
public function update_theme_templates_data(){
|
282 |
+
|
283 |
+
$tempData = array();
|
284 |
+
|
285 |
+
$theme_templates = (array) $this->get_theme_templates( true );
|
286 |
+
|
287 |
+
$has_outdated = 'no';
|
288 |
+
|
289 |
+
foreach ( $theme_templates as $template ) {
|
290 |
+
if( $template['is_outdated'] === "yes" ){
|
291 |
+
$has_outdated = "yes";
|
292 |
+
break;
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
$tempData['has_outdated'] = $has_outdated;
|
297 |
+
$tempData['templates'] = $theme_templates;
|
298 |
+
$tempData['last_scanned'] = time();
|
299 |
+
|
300 |
+
update_option( 'xoo_'.$this->slug.'_theme_templates_data', $tempData );
|
301 |
+
|
302 |
+
return $tempData;
|
303 |
+
|
304 |
+
}
|
305 |
+
|
306 |
+
}
|
307 |
+
|
308 |
+
|
309 |
+
|
310 |
+
?>
|
includes/xoo-framework/xoo-framework.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( !function_exists( 'xoo_framework_includes' ) ){
|
4 |
+
|
5 |
+
if( !defined( 'XOO_FW_DIR' ) ){
|
6 |
+
define( 'XOO_FW_DIR' , __DIR__ );
|
7 |
+
}
|
8 |
+
|
9 |
+
function xoo_framework_includes(){
|
10 |
+
require_once __DIR__.'/class-xoo-helper.php';
|
11 |
+
require_once __DIR__.'/class-xoo-exception.php';
|
12 |
+
}
|
13 |
+
|
14 |
+
xoo_framework_includes();
|
15 |
+
|
16 |
+
}
|
includes/xoo-wsc-functions.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
function xoo_wsc_notice_html( $message, $notice_type = 'success' ){
|
5 |
+
|
6 |
+
$classes = $notice_type === 'error' ? 'xoo-wsc-notice-error' : 'xoo-wsc-notice-success';
|
7 |
+
|
8 |
+
$icon = $notice_type === 'error' ? 'xoo-wsc-icon-cross' : 'xoo-wsc-icon-check_circle';
|
9 |
+
|
10 |
+
$html = '<li class="'.$classes.'"><span class="'.$icon.'"></span>'.$message.'</li>';
|
11 |
+
|
12 |
+
return apply_filters( 'xoo_wsc_notice_html', $html, $message, $notice_type );
|
13 |
+
}
|
14 |
+
|
15 |
+
|
16 |
+
?>
|
index.php
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php // Silence is golden
|
|
languages/side-cart-woocommerce.pot
CHANGED
@@ -2,195 +2,55 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: \n"
|
5 |
-
"POT-Creation-Date:
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
-
"Language: en\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Generator: Poedit 2.2.
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
-
"Plural-Forms: nplurals=
|
16 |
"X-Poedit-KeywordsList: __;_e;esc_attr_e\n"
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
-
#:
|
20 |
-
msgid "
|
21 |
msgstr ""
|
22 |
|
23 |
-
#:
|
24 |
-
msgid "
|
25 |
msgstr ""
|
26 |
|
27 |
-
#:
|
28 |
-
msgid "
|
29 |
msgstr ""
|
30 |
|
31 |
-
#:
|
32 |
-
msgid "
|
33 |
msgstr ""
|
34 |
|
35 |
-
#:
|
36 |
-
msgid "
|
37 |
msgstr ""
|
38 |
|
39 |
-
#:
|
40 |
-
msgid "
|
41 |
msgstr ""
|
42 |
|
43 |
-
#:
|
44 |
-
msgid "
|
45 |
msgstr ""
|
46 |
|
47 |
-
#:
|
48 |
-
msgid "
|
49 |
msgstr ""
|
50 |
|
51 |
-
#:
|
52 |
-
msgid "
|
53 |
msgstr ""
|
54 |
|
55 |
-
#:
|
56 |
-
msgid "Cart
|
57 |
-
msgstr ""
|
58 |
-
|
59 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:136
|
60 |
-
msgid "Checkout Button Text"
|
61 |
-
msgstr ""
|
62 |
-
|
63 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:144
|
64 |
-
msgid "Continue Button Text"
|
65 |
-
msgstr ""
|
66 |
-
|
67 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:153
|
68 |
-
msgid "Cotinue Button URL"
|
69 |
-
msgstr ""
|
70 |
-
|
71 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:162
|
72 |
-
msgid "Product total"
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:170
|
76 |
-
msgid "Redirect to Cart"
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:185
|
80 |
-
msgid "Enable Basket"
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:193
|
84 |
-
msgid "On Cart & Checkout Page"
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:201
|
88 |
-
msgid "Basket on mobile"
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:209
|
92 |
-
msgid "Hide Basket Pages"
|
93 |
-
msgstr ""
|
94 |
-
|
95 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:217
|
96 |
-
msgid "Product Count"
|
97 |
-
msgstr ""
|
98 |
-
|
99 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:332
|
100 |
-
#: public/partials/xoo-wsc-content.php:9
|
101 |
-
msgid "Your Cart"
|
102 |
-
msgstr ""
|
103 |
-
|
104 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:351
|
105 |
-
#: public/partials/xoo-wsc-content.php:32 public/partials/xoo-wsc-footer.php:10
|
106 |
-
msgid "To find out your shipping cost , Please proceed to checkout."
|
107 |
-
msgstr ""
|
108 |
-
|
109 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:368
|
110 |
-
#: public/partials/xoo-wsc-footer.php:11
|
111 |
-
msgid "View Cart"
|
112 |
-
msgstr ""
|
113 |
-
|
114 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:384
|
115 |
-
#: public/partials/xoo-wsc-footer.php:12
|
116 |
-
msgid "Checkout"
|
117 |
-
msgstr ""
|
118 |
-
|
119 |
-
#: admin/settings/class-xoo-wsc-general-settings.php:401
|
120 |
-
#: public/partials/xoo-wsc-footer.php:13
|
121 |
-
msgid "Continue Shopping"
|
122 |
-
msgstr ""
|
123 |
-
|
124 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:81
|
125 |
-
msgid "Head Font Size"
|
126 |
-
msgstr ""
|
127 |
-
|
128 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:96
|
129 |
-
msgid "Open From"
|
130 |
-
msgstr ""
|
131 |
-
|
132 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:105
|
133 |
-
msgid "Container Height"
|
134 |
-
msgstr ""
|
135 |
-
|
136 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:113
|
137 |
-
msgid "Container Width"
|
138 |
-
msgstr ""
|
139 |
-
|
140 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:121
|
141 |
-
msgid "Body Font Size"
|
142 |
-
msgstr ""
|
143 |
-
|
144 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:129
|
145 |
-
msgid "Product Image Width"
|
146 |
-
msgstr ""
|
147 |
-
|
148 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:144
|
149 |
-
msgid "Footer Buttons Margin"
|
150 |
-
msgstr ""
|
151 |
-
|
152 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:159
|
153 |
-
msgid "Basket Position"
|
154 |
-
msgstr ""
|
155 |
-
|
156 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:167
|
157 |
-
msgid "Basket Background Color"
|
158 |
-
msgstr ""
|
159 |
-
|
160 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:175
|
161 |
-
msgid "Basket Icon Color"
|
162 |
-
msgstr ""
|
163 |
-
|
164 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:183
|
165 |
-
msgid "Basket Icon Size"
|
166 |
-
msgstr ""
|
167 |
-
|
168 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:191
|
169 |
-
msgid "Count Background Color"
|
170 |
-
msgstr ""
|
171 |
-
|
172 |
-
#: admin/settings/class-xoo-wsc-style-settings.php:199
|
173 |
-
msgid "Count Text Color"
|
174 |
-
msgstr ""
|
175 |
-
|
176 |
-
#: public/class-xoo-wsc-cart-data.php:150
|
177 |
-
msgid "Something went wrong"
|
178 |
-
msgstr ""
|
179 |
-
|
180 |
-
#: public/partials/xoo-wsc-content.php:8
|
181 |
-
msgid "Your cart is empty."
|
182 |
-
msgstr ""
|
183 |
-
|
184 |
-
#: public/partials/xoo-wsc-content.php:31 public/partials/xoo-wsc-footer.php:9
|
185 |
-
msgid "Subtotal:"
|
186 |
-
msgstr ""
|
187 |
-
|
188 |
-
#: public/partials/xoo-wsc-content.php:95
|
189 |
-
msgid "Remove"
|
190 |
-
msgstr ""
|
191 |
-
|
192 |
-
#: xoo-wsc.php:95
|
193 |
-
msgid ""
|
194 |
-
"Side Cart WooCommerce is enabled but not effective. It requires WooCommerce "
|
195 |
-
"in order to work."
|
196 |
msgstr ""
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: \n"
|
5 |
+
"POT-Creation-Date: 2021-05-27 00:03+0530\n"
|
6 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 2.2.4\n"
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
+
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;esc_attr_e\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
18 |
+
#: includes/class-xoo-wsc-cart.php:134
|
19 |
+
msgid "Item removed"
|
20 |
msgstr ""
|
21 |
|
22 |
+
#: includes/class-xoo-wsc-cart.php:136
|
23 |
+
msgid "Undo?"
|
24 |
msgstr ""
|
25 |
|
26 |
+
#: includes/class-xoo-wsc-cart.php:140
|
27 |
+
msgid "Item updated"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: includes/class-xoo-wsc-frontend.php:82
|
31 |
+
msgid "Only %s% in stock"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: includes/class-xoo-wsc-frontend.php:83
|
35 |
+
msgid "Quantity can only be purchased in multiple of %s%"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: includes/class-xoo-wsc-frontend.php:84
|
39 |
+
msgid "Please use checkout form to calculate shipping"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: includes/class-xoo-wsc-frontend.php:85
|
43 |
+
msgid "Please enter promo code"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: templates/global/body/product.php:56
|
47 |
+
msgid "Price: "
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: templates/global/body/product.php:71
|
51 |
+
msgid "Qty:"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: templates/xoo-wsc-body.php:30
|
55 |
+
msgid "Empty Cart"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
msgstr ""
|
public/class-xoo-wsc-cart-data.php
DELETED
@@ -1,166 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class xoo_wsc_Cart_Data{
|
3 |
-
/**
|
4 |
-
* The ID of this plugin.
|
5 |
-
*
|
6 |
-
* @since 1.0.0
|
7 |
-
* @access private
|
8 |
-
* @var string $xoo_wsc The ID of this plugin.
|
9 |
-
*/
|
10 |
-
private $xoo_wsc;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Initialize the class and set its properties.
|
14 |
-
*
|
15 |
-
* @since 1.0.0
|
16 |
-
* @param string $xoo_wsc The name of the plugin.
|
17 |
-
* @param string $version The version of this plugin.
|
18 |
-
*/
|
19 |
-
public function __construct( $xoo_wsc ) {
|
20 |
-
|
21 |
-
$this->xoo_wsc = $xoo_wsc;
|
22 |
-
|
23 |
-
}
|
24 |
-
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Get Side Cart HTML
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
* @return string
|
31 |
-
*/
|
32 |
-
|
33 |
-
public function get_cart_markup(){
|
34 |
-
$options = get_option('xoo-wsc-gl-options');
|
35 |
-
$chk_basket = isset( $options['bk-chk-basket']) ? $options['bk-chk-basket'] : 1;
|
36 |
-
if( ( is_cart() || is_checkout() ) && $chk_basket != 1 ){return;}
|
37 |
-
require_once plugin_dir_path( dirname( __FILE__ ) ).'/public/partials/xoo-wsc-markup.php';
|
38 |
-
}
|
39 |
-
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Get Side Cart Content
|
43 |
-
*
|
44 |
-
* @since 1.0.0
|
45 |
-
*/
|
46 |
-
|
47 |
-
public function get_cart_content(){
|
48 |
-
$cart_data = WC()->cart->get_cart();
|
49 |
-
$options = get_option('xoo-wsc-gl-options');
|
50 |
-
$sy_options = get_option('xoo-wsc-sy-options');
|
51 |
-
|
52 |
-
$args = array(
|
53 |
-
'options' => $options,
|
54 |
-
'sy_options' => $sy_options
|
55 |
-
);
|
56 |
-
|
57 |
-
ob_start();
|
58 |
-
wc_get_template('xoo-wsc-content.php',$args,'',XOO_WSC_PATH.'/public/partials/');
|
59 |
-
wc_get_template('xoo-wsc-footer.php',$args,'',XOO_WSC_PATH.'/public/partials/');
|
60 |
-
return ob_get_clean();
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
Set fragments
|
65 |
-
|
66 |
-
**/
|
67 |
-
|
68 |
-
public function set_ajax_fragments($fragments){
|
69 |
-
|
70 |
-
//Get User Settings
|
71 |
-
$options = get_option('xoo-wsc-gl-options');
|
72 |
-
$show_count = isset( $options['bk-show-bkcount']) ? $options['bk-show-bkcount'] : 1;
|
73 |
-
|
74 |
-
if($show_count == 1){
|
75 |
-
$count_value = WC()->cart->get_cart_contents_count();
|
76 |
-
}
|
77 |
-
else{
|
78 |
-
$count_value = 0;
|
79 |
-
}
|
80 |
-
|
81 |
-
$cart_content = $this->get_cart_content();
|
82 |
-
|
83 |
-
//Cart content
|
84 |
-
$fragments['div.xoo-wsc-container'] = '<div class="xoo-wsc-container">'.$cart_content.'</div>';
|
85 |
-
|
86 |
-
//Total Count
|
87 |
-
$fragments['span.xoo-wsc-items-count'] = '<span class="xoo-wsc-items-count">'.$count_value.'</span>';
|
88 |
-
|
89 |
-
return $fragments;
|
90 |
-
}
|
91 |
-
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Add product to cart
|
95 |
-
*
|
96 |
-
* @since 1.0.0
|
97 |
-
*/
|
98 |
-
|
99 |
-
|
100 |
-
public function xoo_wsc_add_to_cart_ajax(){
|
101 |
-
|
102 |
-
if(!isset($_POST['action']) || $_POST['action'] != 'xoo_wsc_add_to_cart' || !isset($_POST['add-to-cart'])){
|
103 |
-
die();
|
104 |
-
}
|
105 |
-
|
106 |
-
// get woocommerce error notice
|
107 |
-
$error = wc_get_notices( 'error' );
|
108 |
-
$html = '';
|
109 |
-
|
110 |
-
if( $error ){
|
111 |
-
// print notice
|
112 |
-
ob_start();
|
113 |
-
foreach( $error as $value ) {
|
114 |
-
wc_print_notice( $value['notice'], 'error' );
|
115 |
-
}
|
116 |
-
|
117 |
-
$js_data = array(
|
118 |
-
'error' => ob_get_clean()
|
119 |
-
);
|
120 |
-
|
121 |
-
wc_clear_notices(); // clear other notice
|
122 |
-
wp_send_json($js_data);
|
123 |
-
}
|
124 |
-
|
125 |
-
else{
|
126 |
-
// trigger action for added to cart in ajax
|
127 |
-
do_action( 'woocommerce_ajax_added_to_cart', intval( $_POST['add-to-cart'] ) );
|
128 |
-
wc_clear_notices(); // clear other notice
|
129 |
-
WC_AJAX::get_refreshed_fragments();
|
130 |
-
}
|
131 |
-
|
132 |
-
die();
|
133 |
-
}
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Update product quantity in cart.
|
139 |
-
*
|
140 |
-
* @since 1.0.0
|
141 |
-
*/
|
142 |
-
|
143 |
-
public function update_cart_ajax(){
|
144 |
-
|
145 |
-
//Form Input Values
|
146 |
-
$cart_key = sanitize_text_field($_POST['cart_key']);
|
147 |
-
|
148 |
-
//If empty return error
|
149 |
-
if(!$cart_key){
|
150 |
-
wp_send_json(array('error' => __('Something went wrong','side-cart-woocommerce')));
|
151 |
-
}
|
152 |
-
|
153 |
-
$cart_success = WC()->cart->remove_cart_item($cart_key);
|
154 |
-
|
155 |
-
if($cart_success){
|
156 |
-
WC_AJAX::get_refreshed_fragments();
|
157 |
-
}
|
158 |
-
else{
|
159 |
-
if(wc_notice_count('error') > 0){
|
160 |
-
echo wc_print_notices();
|
161 |
-
}
|
162 |
-
}
|
163 |
-
die();
|
164 |
-
}
|
165 |
-
}
|
166 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public/class-xoo-wsc-public.php
DELETED
@@ -1,307 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* The public-facing functionality of the plugin.
|
5 |
-
*
|
6 |
-
* Defines the plugin name, version, and two examples hooks for how to
|
7 |
-
* enqueue the admin-specific stylesheet and JavaScript.
|
8 |
-
*
|
9 |
-
* @since 1.0.0
|
10 |
-
*
|
11 |
-
* @package Side Cart WooCommerce
|
12 |
-
*/
|
13 |
-
|
14 |
-
class xoo_wsc_Public {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* The ID of this plugin.
|
18 |
-
*
|
19 |
-
* @since 1.0.0
|
20 |
-
* @access private
|
21 |
-
* @var string $xoo_wsc The ID of this plugin.
|
22 |
-
*/
|
23 |
-
private $xoo_wsc;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* The version of this plugin.
|
27 |
-
*
|
28 |
-
* @since 1.0.0
|
29 |
-
* @access private
|
30 |
-
* @var string $version The current version of this plugin.
|
31 |
-
*/
|
32 |
-
private $version;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Initialize the class and set its properties.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
* @param string $xoo_wsc The name of the plugin.
|
39 |
-
* @param string $version The version of this plugin.
|
40 |
-
*/
|
41 |
-
public function __construct( $xoo_wsc, $version ) {
|
42 |
-
|
43 |
-
$this->xoo_wsc = $xoo_wsc;
|
44 |
-
$this->version = $version;
|
45 |
-
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Register the stylesheets for the public-facing side of the site.
|
50 |
-
*
|
51 |
-
* @since 1.0.0
|
52 |
-
*/
|
53 |
-
public function enqueue_styles() {
|
54 |
-
|
55 |
-
wp_enqueue_style( $this->xoo_wsc, plugin_dir_url( __FILE__ ) . 'css/xoo-wsc-public.css', array(), $this->version, 'all' );
|
56 |
-
|
57 |
-
$options = get_option('xoo-wsc-sy-options');
|
58 |
-
|
59 |
-
/*
|
60 |
-
* User Style Options
|
61 |
-
*/
|
62 |
-
|
63 |
-
//Head
|
64 |
-
$sch_fs = isset( $options['sch-fs']) ? $options['sch-fs'] : 20; // Font Size
|
65 |
-
|
66 |
-
//Body
|
67 |
-
$scb_cw = !empty( $options['scb-cw']) ? $options['scb-cw'] : 300; // Container Width
|
68 |
-
$scb_fs = isset( $options['scb-fs']) ? $options['scb-fs'] : 14; // Font Size
|
69 |
-
$scb_imgw = isset( $options['scb-imgw']) ? $options['scb-imgw'] : 35; // Product Images width
|
70 |
-
$scb_sumw = 100-($scb_imgw+5);
|
71 |
-
|
72 |
-
//Footer
|
73 |
-
$scf_bm = isset( $options['scf-bm']) ? $options['scf-bm'] : 4; // buttons margin
|
74 |
-
|
75 |
-
//Basket
|
76 |
-
$bk_pos = isset( $options['bk-pos']) ? $options['bk-pos'] : 'bottom_fixed'; // Basket Position
|
77 |
-
$bk_bbgc = isset( $options['bk-bbgc']) ? $options['bk-bbgc'] : '#ffffff'; // Basket Background Color
|
78 |
-
$bk_bfc = isset( $options['bk-bfc']) ? $options['bk-bfc'] : '#000000'; // basket Icon Color
|
79 |
-
$bk_bfs = isset( $options['bk-bfs']) ? $options['bk-bfs'] : 35; // Basket Icon size
|
80 |
-
$bk_cbgc = isset( $options['bk-cbgc']) ? $options['bk-cbgc'] : '#cc0086'; // Count background Color
|
81 |
-
$bk_cfc = isset( $options['bk-cfc']) ? $options['bk-cfc'] : '#ffffff'; // Count font color
|
82 |
-
|
83 |
-
switch ($bk_pos) {
|
84 |
-
case 'top_fixed':
|
85 |
-
$bk_pos_type = 'fixed';
|
86 |
-
$bk_pos_dir = 'top';
|
87 |
-
break;
|
88 |
-
|
89 |
-
case 'bottom_fixed':
|
90 |
-
$bk_pos_type = 'fixed';
|
91 |
-
$bk_pos_dir = 'bottom';
|
92 |
-
break;
|
93 |
-
|
94 |
-
case 'top':
|
95 |
-
$bk_pos_type = 'absolute';
|
96 |
-
$bk_pos_dir = 'top';
|
97 |
-
break;
|
98 |
-
}
|
99 |
-
|
100 |
-
$inline_style = "
|
101 |
-
.xoo-wsc-ctxt{
|
102 |
-
font-size: {$sch_fs}px;
|
103 |
-
}
|
104 |
-
|
105 |
-
.xoo-wsc-container{
|
106 |
-
width: {$scb_cw}px;
|
107 |
-
}
|
108 |
-
.xoo-wsc-body{
|
109 |
-
font-size: {$scb_fs}px;
|
110 |
-
}
|
111 |
-
.xoo-wsc-img-col{
|
112 |
-
width: {$scb_imgw}%;
|
113 |
-
}
|
114 |
-
.xoo-wsc-sum-col{
|
115 |
-
width: {$scb_sumw}%;
|
116 |
-
}
|
117 |
-
.xoo-wsc-basket{
|
118 |
-
background-color: {$bk_bbgc};
|
119 |
-
{$bk_pos_dir}: 12px;
|
120 |
-
position: {$bk_pos_type};
|
121 |
-
}
|
122 |
-
|
123 |
-
.xoo-wsc-bki{
|
124 |
-
color: {$bk_bfc};
|
125 |
-
font-size: {$bk_bfs}px;
|
126 |
-
}
|
127 |
-
.xoo-wsc-items-count{
|
128 |
-
background-color: {$bk_cbgc};
|
129 |
-
color: {$bk_cfc};
|
130 |
-
}
|
131 |
-
.xoo-wsc-footer a.button{
|
132 |
-
margin: {$scf_bm}px 0;
|
133 |
-
}
|
134 |
-
";
|
135 |
-
|
136 |
-
$cont_height = isset( $options['scb-ch']) ? $options['scb-ch'] : 'full_screen';
|
137 |
-
$cont_open = isset( $options['scb-open']) ? $options['scb-open'] : 'right';
|
138 |
-
|
139 |
-
|
140 |
-
if( $cont_height === "auto_adjust" ){
|
141 |
-
|
142 |
-
$inline_style .= ".xoo-wsc-footer{
|
143 |
-
position: relative;
|
144 |
-
}";
|
145 |
-
|
146 |
-
if($bk_pos === "bottom_fixed"){
|
147 |
-
|
148 |
-
$inline_style .= ".xoo-wsc-container{
|
149 |
-
bottom: 0;
|
150 |
-
}";
|
151 |
-
|
152 |
-
}
|
153 |
-
else{
|
154 |
-
$inline_style .= ".xoo-wsc-container{
|
155 |
-
top: 0;
|
156 |
-
}";
|
157 |
-
}
|
158 |
-
}
|
159 |
-
else{
|
160 |
-
$inline_style .= ".xoo-wsc-footer{
|
161 |
-
position: absolute;
|
162 |
-
}
|
163 |
-
.xoo-wsc-container{
|
164 |
-
top: 0;
|
165 |
-
bottom: 0;
|
166 |
-
}";
|
167 |
-
}
|
168 |
-
|
169 |
-
|
170 |
-
if( $cont_open === "left" ){
|
171 |
-
$inline_style .= "
|
172 |
-
.xoo-wsc-basket{
|
173 |
-
left: 0;
|
174 |
-
}
|
175 |
-
.xoo-wsc-basket, .xoo-wsc-container{
|
176 |
-
transition-property: left;
|
177 |
-
}
|
178 |
-
.xoo-wsc-items-count{
|
179 |
-
right: -15px;
|
180 |
-
}
|
181 |
-
.xoo-wsc-container{
|
182 |
-
left: -{$scb_cw}px;
|
183 |
-
}
|
184 |
-
.xoo-wsc-modal.xoo-wsc-active .xoo-wsc-basket{
|
185 |
-
left: {$scb_cw}px;
|
186 |
-
}
|
187 |
-
.xoo-wsc-modal.xoo-wsc-active .xoo-wsc-container{
|
188 |
-
left: 0;
|
189 |
-
}
|
190 |
-
";
|
191 |
-
}
|
192 |
-
else{
|
193 |
-
$inline_style .= "
|
194 |
-
.xoo-wsc-basket{
|
195 |
-
right: 0;
|
196 |
-
}
|
197 |
-
.xoo-wsc-basket, .xoo-wsc-container{
|
198 |
-
transition-property: right;
|
199 |
-
}
|
200 |
-
.xoo-wsc-items-count{
|
201 |
-
left: -15px;
|
202 |
-
}
|
203 |
-
.xoo-wsc-container{
|
204 |
-
right: -{$scb_cw}px;
|
205 |
-
}
|
206 |
-
.xoo-wsc-modal.xoo-wsc-active .xoo-wsc-basket{
|
207 |
-
right: {$scb_cw}px;
|
208 |
-
}
|
209 |
-
.xoo-wsc-modal.xoo-wsc-active .xoo-wsc-container{
|
210 |
-
right: 0;
|
211 |
-
}
|
212 |
-
";
|
213 |
-
}
|
214 |
-
|
215 |
-
|
216 |
-
wp_add_inline_style($this->xoo_wsc,$inline_style);
|
217 |
-
|
218 |
-
//Custom CSS from user settings
|
219 |
-
$av_options = get_option('xoo-wsc-av-options');
|
220 |
-
if(isset($av_options['custom-css']) && !empty($av_options['custom-css'])){
|
221 |
-
wp_add_inline_style($this->xoo_wsc,$av_options['custom-css']);
|
222 |
-
}
|
223 |
-
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Register the JavaScript for the public-facing side of the site.
|
228 |
-
*
|
229 |
-
* @since 1.0.0
|
230 |
-
*/
|
231 |
-
public function enqueue_scripts() {
|
232 |
-
|
233 |
-
//User Options
|
234 |
-
$gl_options = get_option('xoo-wsc-gl-options');
|
235 |
-
$av_options = get_option('xoo-wsc-av-options');
|
236 |
-
$sy_options = get_option('xoo-wsc-sy-options');
|
237 |
-
|
238 |
-
$ajax_atc = isset( $gl_options['sc-ajax-atc']) ? $gl_options['sc-ajax-atc'] : 0;
|
239 |
-
$atc_icons = isset( $gl_options['sc-atc-icons']) ? $gl_options['sc-atc-icons'] : 1;
|
240 |
-
$atc_reset = isset( $gl_options['sc-atc-reset']) ? $gl_options['sc-atc-reset'] : 0;
|
241 |
-
$cont_height = isset( $sy_options['scb-ch']) ? $sy_options['scb-ch'] : 'full_screen';
|
242 |
-
|
243 |
-
$trigger_class = isset($av_options['trigger-class']) ? $av_options['trigger-class'] : null;
|
244 |
-
|
245 |
-
//Check if item added to cart
|
246 |
-
if($ajax_atc != 1 && isset($_POST['add-to-cart'])){
|
247 |
-
$added_to_cart = true;
|
248 |
-
}
|
249 |
-
else{
|
250 |
-
$added_to_cart = false;
|
251 |
-
}
|
252 |
-
|
253 |
-
|
254 |
-
$auto_open_cart = isset( $gl_options['sc-auto-open']) ? $gl_options['sc-auto-open'] : 1;
|
255 |
-
|
256 |
-
//Check if wc-add-to-cart is enqueued
|
257 |
-
if (!wp_script_is('wc-add-to-cart', 'enqueued' )) {
|
258 |
-
wp_enqueue_script( 'wc-add-to-cart',WC()->plugin_url().'/assets/js/frontend/add-to-cart.min.js', array('jquery'), WC_VERSION,true );
|
259 |
-
}
|
260 |
-
|
261 |
-
wp_enqueue_script( $this->xoo_wsc, plugin_dir_url( __FILE__ ) . 'js/xoo-wsc-public.js', array( 'jquery' ), $this->version, true );
|
262 |
-
wp_localize_script($this->xoo_wsc,'xoo_wsc_localize',array(
|
263 |
-
'adminurl' => admin_url().'admin-ajax.php',
|
264 |
-
'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" ),
|
265 |
-
'ajax_atc' => $ajax_atc,
|
266 |
-
'added_to_cart' => $added_to_cart,
|
267 |
-
'auto_open_cart'=> $auto_open_cart,
|
268 |
-
'atc_icons' => $atc_icons,
|
269 |
-
'atc_reset' => $atc_reset,
|
270 |
-
'trigger_class' => $trigger_class,
|
271 |
-
'cont_height' => $cont_height,
|
272 |
-
)
|
273 |
-
);
|
274 |
-
}
|
275 |
-
|
276 |
-
//Cart fragment backup
|
277 |
-
public function enqueue_cart_fragment_script(){
|
278 |
-
if( !wp_script_is( 'wc-cart-fragments', 'enqueued' ) ){
|
279 |
-
wp_enqueue_script( 'wc-cart-fragments',WC()->plugin_url().'/assets/js/frontend/cart-fragments.min.js', array('jquery','js-cookie'), WC_VERSION,true );
|
280 |
-
}
|
281 |
-
}
|
282 |
-
|
283 |
-
|
284 |
-
/**
|
285 |
-
* Prevent cart redirect. WC Option Redirect to the cart page after successful addition
|
286 |
-
*
|
287 |
-
* @since 1.1.0
|
288 |
-
* @author Francesco Licandro
|
289 |
-
* @param mixed $value
|
290 |
-
* @param string $option
|
291 |
-
* @return mixed
|
292 |
-
*/
|
293 |
-
public function prevent_cart_redirect($value){
|
294 |
-
|
295 |
-
$gl_options = get_option('xoo-wsc-gl-options');
|
296 |
-
$cart_redirect = isset( $gl_options['sc-cart-redirect']) ? $gl_options['sc-cart-redirect'] : 0;
|
297 |
-
|
298 |
-
if(!is_admin() && !$cart_redirect) {
|
299 |
-
return 'no';
|
300 |
-
}
|
301 |
-
|
302 |
-
return $value;
|
303 |
-
}
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public/css/fonts/Woo-Side-Cart.eot
DELETED
Binary file
|
public/css/fonts/Woo-Side-Cart.svg
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?xml version="1.0" standalone="no"?>
|
2 |
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
-
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
-
<metadata>Generated by IcoMoon</metadata>
|
5 |
-
<defs>
|
6 |
-
<font id="Woo-Side-Cart" horiz-adv-x="1024">
|
7 |
-
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
-
<missing-glyph horiz-adv-x="1024" />
|
9 |
-
<glyph unicode=" " horiz-adv-x="512" d="" />
|
10 |
-
<glyph unicode="" glyph-name="basket5" d="M928 512h-832c-17.696 0-32 14.304-32 32s14.304 32 32 32h64l192 352c0 17.696 14.304 32 32 32h64c17.696 0 32-14.304 32-32l-192-352h448l-192 352c0 17.696 14.304 32 32 32h96c17.696 0 32-14.304 32-32l160-352h64c17.696 0 32-14.304 32-32s-14.304-32-32-32zM96 448h832c17.696 0 32-14.304 32-32l-64-448c0-17.696-14.304-32-32-32h-704c-17.696 0-32 14.304-32 32l-64 448c0 17.696 14.304 32 32 32zM704 64h64c17.696 0 32 14.304 32 32l32 192c0 17.696-14.304 32-32 32h-64c-17.696 0-32-14.304-32-32l-32-192c0-17.696 14.304-32 32-32zM448 96c0-17.696 14.304-32 32-32h64c17.696 0 32 14.304 32 32v192c0 17.696-14.304 32-32 32h-64c-17.696 0-32-14.304-32-32v-192zM224 96c0-17.696 14.304-32 32-32h64c17.696 0 32 14.304 32 32l-32 192c0 17.696-14.304 32-32 32h-64c-17.696 0-32-14.304-32-32l32-192z" />
|
11 |
-
<glyph unicode="" glyph-name="basket4" d="M942.029 614.4h-256.358l-92.774-92.774c-23.194-23.194-54.067-35.942-86.835-35.942-32.87 0-63.693 12.8-86.938 35.994-23.142 23.142-35.942 53.965-35.994 86.784 0 1.997 0.512 3.942 0.563 5.939h-301.773c-16.998 0-30.72-13.722-30.72-30.72v-122.88h921.6v122.88c0 16.998-13.824 30.72-30.771 30.72zM551.322 563.251l258.816 258.816c12.032 11.981 12.134 31.386 0.102 43.469l-47.104 47.104c-11.981 11.981-31.437 11.93-43.52 0l-258.816-258.867c-24.986-24.986-24.986-65.536 0-90.522 24.986-24.934 65.485-24.986 90.522 0zM195.738 88.525c4.966-20.531 26.368-37.325 47.462-37.325h537.6c21.094 0 42.496 16.794 47.462 37.325l77.978 321.075h-788.48l77.978-321.075z" />
|
12 |
-
<glyph unicode="" glyph-name="basket6" horiz-adv-x="1170" d="M1097.143 512c40.571 0 73.143-32.571 73.143-73.143s-32.571-73.143-73.143-73.143h-8.571l-65.714-378.286c-6.286-34.857-36.571-60.571-72-60.571h-731.429c-35.429 0-65.714 25.714-72 60.571l-65.714 378.286h-8.571c-40.571 0-73.143 32.571-73.143 73.143s32.571 73.143 73.143 73.143h1024zM277.143 54.857c20 1.714 35.429 19.429 33.714 39.429l-18.286 237.714c-1.714 20-19.429 35.429-39.429 33.714s-35.429-19.429-33.714-39.429l18.286-237.714c1.714-18.857 17.714-33.714 36.571-33.714h2.857zM512 91.428v237.714c0 20-16.571 36.571-36.571 36.571s-36.571-16.571-36.571-36.571v-237.714c0-20 16.571-36.571 36.571-36.571s36.571 16.571 36.571 36.571zM731.429 91.428v237.714c0 20-16.571 36.571-36.571 36.571s-36.571-16.571-36.571-36.571v-237.714c0-20 16.571-36.571 36.571-36.571s36.571 16.571 36.571 36.571zM932.571 88.571l18.286 237.714c1.714 20-13.714 37.714-33.714 39.429s-37.714-13.714-39.429-33.714l-18.286-237.714c-1.714-20 13.714-37.714 33.714-39.429h2.857c18.857 0 34.857 14.857 36.571 33.714zM272 784l-53.143-235.429h-75.429l57.714 252c14.857 66.857 73.714 113.714 142.286 113.714h95.429c0 20 16.571 36.571 36.571 36.571h219.429c20 0 36.571-16.571 36.571-36.571h95.429c68.571 0 127.429-46.857 142.286-113.714l57.714-252h-75.429l-53.143 235.429c-8 33.714-37.143 57.143-71.429 57.143h-95.429c0-20-16.571-36.571-36.571-36.571h-219.429c-20 0-36.571 16.571-36.571 36.571h-95.429c-34.286 0-63.429-23.429-71.429-57.143z" />
|
13 |
-
<glyph unicode="" glyph-name="basket1" d="M512 212.667c46 0 86 40 86 86s-40 86-86 86-86-40-86-86 40-86 86-86zM384 554.667h256l-128 188zM734 554.667h204c24 0 44-18 44-42-34.625-138.041-73.705-271.628-110-408-10-36-42-62-82-62h-556c-40 0-72 26-82 62l-108 396c-2 4-2 8-2 12 0 24 20 42 44 42h204l186 280c8 12 22 18 36 18s28-6 36-18z" />
|
14 |
-
<glyph unicode="" glyph-name="basket2" d="M0 512v96h120l240.992 241.024c-1.6 4.768-2.976 9.632-2.976 14.976 0 26.528 21.472 48 48 48 26.496 0 48-21.472 48-48 0-26.496-21.504-48-48-48-3.552 0-6.688 1.312-9.984 2.016l-210.048-210.016h619.328l-208.8 210.528c-4.128-1.152-8.064-2.528-12.512-2.528-26.496 0-48 21.504-48 48 0 26.528 21.504 48 48 48s48-21.472 48-48c0-4.896-1.44-9.376-2.816-13.856l242.144-242.144h120.672v-96h-992zM795.808 35.136c-9.376-37.504-35.36-35.424-35.36-35.424l-531.040-1.024c-27.072 0-34.336 34.304-34.336 34.304l-140.384 446.56 882.368 0.832-141.248-445.248zM319.968 416h-32v-160h32v160zM319.968 224h-32v-160h32v160zM383.968 416h-31.968v-160h31.968v160zM383.968 224h-31.968v-160h31.968v160zM447.968 416h-32v-160h32v160zM447.968 224h-32v-160h32v160zM512 416h-32v-160h32v160zM512 224h-32v-160h32v160zM576 416h-32v-160h32v160zM576 224h-32v-160h32v160zM640 416h-32v-160h32v160zM640 224h-32v-160h32v160zM704 416h-32v-160h32v160zM704 224h-32v-160h32v160z" />
|
15 |
-
<glyph unicode="" glyph-name="basket3" horiz-adv-x="1344" d="M1264 512h-1184c-4.928 0-9.6-2.272-12.64-6.144s-4.096-8.928-2.912-13.728l128.192-512.544c3.072-10.784 12.512-43.584 47.36-43.584h864c34.976 0 44.32 32.832 47.52 44.128l128 512c1.184 4.768 0.128 9.856-2.912 13.728-3.008 3.872-7.68 6.144-12.608 6.144zM1120.64-11.616c-5.824-20.384-11.84-20.384-16.64-20.384h-864c-4.768 0-10.752 0-16.48 19.872l-123.008 492.128h1143.008l-122.88-491.616zM592 64c8.832 0 16 7.168 16 16v288c0 8.832-7.168 16-16 16s-16-7.168-16-16v-288c0-8.832 7.168-16 16-16zM367.968 64c0.608 0 1.184 0.032 1.824 0.096 8.768 0.992 15.104 8.896 14.112 17.664l-32 288c-0.96 8.8-8.64 15.008-17.696 14.144-8.768-0.992-15.104-8.896-14.112-17.664l32-288c0.896-8.192 7.84-14.24 15.872-14.24zM784 64c8.832 0 16 7.168 16 16v288c0 8.832-7.168 16-16 16s-16-7.168-16-16v-288c0-8.832 7.168-16 16-16zM974.208 64.096c0.64-0.064 1.216-0.096 1.824-0.096 8.032 0 14.976 6.048 15.872 14.24l32 288c0.96 8.768-5.344 16.672-14.112 17.664-9.184 0.896-16.704-5.344-17.696-14.144l-32-288c-0.96-8.768 5.344-16.672 14.112-17.664zM1104 576c3.712 0 7.424 1.28 10.464 3.904 6.688 5.792 7.392 15.872 1.632 22.56l-304 352c-5.792 6.72-15.872 7.392-22.56 1.664-6.688-5.792-7.392-15.872-1.632-22.56l304-352c3.168-3.68 7.616-5.568 12.096-5.568zM570.112 956.384c-6.816 5.536-16.896 4.608-22.496-2.272l-288-352c-5.6-6.816-4.608-16.896 2.24-22.528 2.976-2.4 6.592-3.584 10.144-3.584 4.64 0 9.216 1.984 12.384 5.888l288 352c5.6 6.816 4.576 16.896-2.272 22.496zM1328 640h-128c-8.832 0-16-7.168-16-16s7.168-16 16-16h128c8.832 0 16 7.168 16 16s-7.168 16-16 16zM432 608h512c8.832 0 16 7.168 16 16s-7.168 16-16 16h-512c-8.832 0-16-7.168-16-16s7.168-16 16-16zM16 608h160c8.832 0 16 7.168 16 16s-7.168 16-16 16h-160c-8.832 0-16-7.168-16-16s7.168-16 16-16z" />
|
16 |
-
<glyph unicode="" glyph-name="cross" d="M734.618 212.531c-24.013-24.013-62.925-24.013-86.886 0l-135.731 155.136-135.731-155.085c-24.013-24.013-62.925-24.013-86.886 0-24.013 24.013-24.013 62.925 0 86.886l141.21 161.28-141.261 161.382c-24.013 24.013-24.013 62.874 0 86.886s62.874 24.013 86.886 0l135.782-155.187 135.731 155.187c24.013 24.013 62.874 24.013 86.886 0s24.013-62.925 0-86.886l-141.21-161.382 141.21-161.28c24.013-24.013 24.013-62.925 0-86.938z" />
|
17 |
-
<glyph unicode="" glyph-name="spinner" d="M384 832c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM655.53 719.53c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM832 448c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM719.53 176.47c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM448.002 64c0 0 0 0 0 0 0 35.346 28.654 64 64 64s64-28.654 64-64c0 0 0 0 0 0 0-35.346-28.654-64-64-64s-64 28.654-64 64zM176.472 176.47c0 0 0 0 0 0 0 35.346 28.654 64 64 64s64-28.654 64-64c0 0 0 0 0 0 0-35.346-28.654-64-64-64s-64 28.654-64 64zM144.472 719.53c0 0 0 0 0 0 0 53.019 42.981 96 96 96s96-42.981 96-96c0 0 0 0 0 0 0-53.019-42.981-96-96-96s-96 42.981-96 96zM56 448c0 39.765 32.235 72 72 72s72-32.235 72-72c0-39.765-32.235-72-72-72s-72 32.235-72 72z" />
|
18 |
-
<glyph unicode="" glyph-name="spinner2" d="M1024 448c-1.278 66.862-15.784 133.516-42.576 194.462-26.704 61-65.462 116.258-113.042 161.92-47.552 45.696-103.944 81.82-164.984 105.652-61.004 23.924-126.596 35.352-191.398 33.966-64.81-1.282-129.332-15.374-188.334-41.356-59.048-25.896-112.542-63.47-156.734-109.576-44.224-46.082-79.16-100.708-102.186-159.798-23.114-59.062-34.128-122.52-32.746-185.27 1.286-62.76 14.964-125.148 40.134-182.206 25.088-57.1 61.476-108.828 106.11-151.548 44.61-42.754 97.472-76.504 154.614-98.72 57.118-22.304 118.446-32.902 179.142-31.526 60.708 1.29 120.962 14.554 176.076 38.914 55.15 24.282 105.116 59.48 146.366 102.644 41.282 43.14 73.844 94.236 95.254 149.43 13.034 33.458 21.88 68.4 26.542 103.798 1.246-0.072 2.498-0.12 3.762-0.12 35.346 0 64 28.652 64 64 0 1.796-0.094 3.572-0.238 5.332h0.238zM922.306 278.052c-23.472-53.202-57.484-101.4-99.178-141.18-41.67-39.81-91-71.186-144.244-91.79-53.228-20.678-110.29-30.452-166.884-29.082-56.604 1.298-112.596 13.736-163.82 36.474-51.25 22.666-97.684 55.49-135.994 95.712-38.338 40.198-68.528 87.764-88.322 139.058-19.87 51.284-29.228 106.214-27.864 160.756 1.302 54.552 13.328 108.412 35.254 157.69 21.858 49.3 53.498 93.97 92.246 130.81 38.73 36.868 84.53 65.87 133.874 84.856 49.338 19.060 102.136 28.006 154.626 26.644 52.5-1.306 104.228-12.918 151.562-34.034 47.352-21.050 90.256-51.502 125.624-88.782 35.396-37.258 63.21-81.294 81.39-128.688 18.248-47.392 26.782-98.058 25.424-148.496h0.238c-0.144-1.76-0.238-3.536-0.238-5.332 0-33.012 24.992-60.174 57.086-63.624-6.224-34.822-16.53-68.818-30.78-100.992z" />
|
19 |
-
<glyph unicode="" glyph-name="checkmark" d="M864 832l-480-480-224 224-160-160 384-384 640 640z" />
|
20 |
-
</font></defs></svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public/css/fonts/Woo-Side-Cart.ttf
DELETED
Binary file
|
public/css/fonts/Woo-Side-Cart.woff
DELETED
Binary file
|
public/css/xoo-wsc-public.css
DELETED
@@ -1,376 +0,0 @@
|
|
1 |
-
.xoo-wsc-close {
|
2 |
-
cursor: pointer;
|
3 |
-
position: absolute;
|
4 |
-
}
|
5 |
-
|
6 |
-
@font-face {
|
7 |
-
font-family: 'Woo-Side-Cart';
|
8 |
-
src: url('fonts/Woo-Side-Cart.eot?79hb0k');
|
9 |
-
src: url('fonts/Woo-Side-Cart.eot?79hb0k#iefix') format('embedded-opentype'),
|
10 |
-
url('fonts/Woo-Side-Cart.ttf?79hb0k') format('truetype'),
|
11 |
-
url('fonts/Woo-Side-Cart.woff?79hb0k') format('woff'),
|
12 |
-
url('fonts/Woo-Side-Cart.svg?79hb0k#Woo-Side-Cart') format('svg');
|
13 |
-
font-weight: normal;
|
14 |
-
font-style: normal;
|
15 |
-
}
|
16 |
-
|
17 |
-
[class^="xoo-wsc-icon-"], [class*=" xoo-wsc-icon-"] {
|
18 |
-
/* use !important to prevent issues with browser extensions that change fonts */
|
19 |
-
font-family: 'Woo-Side-Cart' !important;
|
20 |
-
speak: none;
|
21 |
-
font-style: normal;
|
22 |
-
font-weight: normal;
|
23 |
-
font-variant: normal;
|
24 |
-
text-transform: none;
|
25 |
-
line-height: 1;
|
26 |
-
|
27 |
-
/* Better Font Rendering =========== */
|
28 |
-
-webkit-font-smoothing: antialiased;
|
29 |
-
-moz-osx-font-smoothing: grayscale;
|
30 |
-
}
|
31 |
-
|
32 |
-
.xoo-wsc-icon-cross:before {
|
33 |
-
content: "\e909";
|
34 |
-
}
|
35 |
-
.xoo-wsc-icon-basket5:before {
|
36 |
-
content: "\e900";
|
37 |
-
}
|
38 |
-
.xoo-wsc-icon-basket4:before {
|
39 |
-
content: "\e901";
|
40 |
-
}
|
41 |
-
.xoo-wsc-icon-basket6:before {
|
42 |
-
content: "\e902";
|
43 |
-
}
|
44 |
-
.xoo-wsc-icon-basket1:before {
|
45 |
-
content: "\e903";
|
46 |
-
}
|
47 |
-
.xoo-wsc-icon-basket2:before {
|
48 |
-
content: "\e904";
|
49 |
-
}
|
50 |
-
.xoo-wsc-icon-basket3:before {
|
51 |
-
content: "\e905";
|
52 |
-
}
|
53 |
-
.xoo-wsc-icon-spinner:before {
|
54 |
-
content: "\e97a";
|
55 |
-
}
|
56 |
-
.xoo-wsc-icon-spinner2:before {
|
57 |
-
content: "\e97b";
|
58 |
-
}
|
59 |
-
.xoo-wsc-icon-checkmark:before {
|
60 |
-
content: "\ea10";
|
61 |
-
}
|
62 |
-
|
63 |
-
|
64 |
-
@keyframes xoo-wsc-spin {
|
65 |
-
0% {
|
66 |
-
transform: rotate(0)
|
67 |
-
}
|
68 |
-
100% {
|
69 |
-
transform: rotate(360deg)
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
.xoo-wsc-icon-atc {
|
74 |
-
margin-left: 5px
|
75 |
-
}
|
76 |
-
|
77 |
-
.xoo-wsc-icon-atc.xoo-wsc-active {
|
78 |
-
display: inline-block;
|
79 |
-
-webkit-animation: xoo-wsc-spin 575ms infinite linear;
|
80 |
-
animation: xoo-wsc-spin 575ms infinite linear
|
81 |
-
}
|
82 |
-
|
83 |
-
.xoo-wsc-updating {
|
84 |
-
display: none;
|
85 |
-
text-align: center;
|
86 |
-
z-index: 1
|
87 |
-
}
|
88 |
-
|
89 |
-
.xoo-wsc-updating .xoo-wsc-icon-spinner2 {
|
90 |
-
position: absolute;
|
91 |
-
-webkit-animation: xoo-wsc-spin 575ms infinite linear;
|
92 |
-
animation: xoo-wsc-spin 575ms infinite linear;
|
93 |
-
display: inline-block;
|
94 |
-
font-size: 30px;
|
95 |
-
z-index: 1;
|
96 |
-
color: #000;
|
97 |
-
bottom: 10px
|
98 |
-
}
|
99 |
-
|
100 |
-
.xoo-wsc-uopac,
|
101 |
-
.xoo-wsc-updating {
|
102 |
-
top: 0;
|
103 |
-
bottom: 0;
|
104 |
-
left: 0;
|
105 |
-
right: 0;
|
106 |
-
position: absolute
|
107 |
-
}
|
108 |
-
|
109 |
-
.xoo-wsc-uopac {
|
110 |
-
background-color: #f0f0f0;
|
111 |
-
opacity: .7
|
112 |
-
}
|
113 |
-
|
114 |
-
body.xoo-wsc-active, html.xoo-wsc-active {
|
115 |
-
overflow: hidden;
|
116 |
-
}
|
117 |
-
|
118 |
-
.xoo-wsc-modal.xoo-wsc-active .xoo-wsc-opac {
|
119 |
-
top: 0;
|
120 |
-
left: 0;
|
121 |
-
right: 0;
|
122 |
-
position: fixed;
|
123 |
-
bottom: 0;
|
124 |
-
background-color: #000;
|
125 |
-
z-index: 99999;
|
126 |
-
opacity: .5
|
127 |
-
}
|
128 |
-
|
129 |
-
.xoo-wsc-container {
|
130 |
-
position: fixed;
|
131 |
-
z-index: 999999;
|
132 |
-
background-color: #fff;
|
133 |
-
max-width: 90%;
|
134 |
-
}
|
135 |
-
|
136 |
-
.xoo-wsc-content{
|
137 |
-
position: relative;
|
138 |
-
font-size: 14px;
|
139 |
-
}
|
140 |
-
|
141 |
-
.xoo-wsc-header {
|
142 |
-
position: relative;
|
143 |
-
border-bottom: 1px solid #eee;
|
144 |
-
padding: 15px;
|
145 |
-
}
|
146 |
-
|
147 |
-
.xoo-wsc-basket {
|
148 |
-
padding: 10px;
|
149 |
-
border-radius: 14px;
|
150 |
-
margin: 10px;
|
151 |
-
box-shadow: 0 1px 4px 0;
|
152 |
-
z-index: 999999;
|
153 |
-
cursor: pointer;
|
154 |
-
}
|
155 |
-
|
156 |
-
.xoo-wsc-basket , .xoo-wsc-container{
|
157 |
-
transition-duration: .5s;
|
158 |
-
}
|
159 |
-
|
160 |
-
.xoo-wsc-items-count {
|
161 |
-
border-radius: 50%;
|
162 |
-
position: absolute;
|
163 |
-
top: -15px;
|
164 |
-
font-size: 13px;
|
165 |
-
width: 28px;
|
166 |
-
height: 28px;
|
167 |
-
line-height: 28px;
|
168 |
-
text-align: center;
|
169 |
-
overflow: hidden
|
170 |
-
}
|
171 |
-
|
172 |
-
.xoo-wsc-close {
|
173 |
-
transform: translateY(-50%);
|
174 |
-
top: 50%;
|
175 |
-
right: 20px
|
176 |
-
}
|
177 |
-
|
178 |
-
.xoo-wsc-body {
|
179 |
-
overflow-y: auto;
|
180 |
-
position: relative;
|
181 |
-
overflow-x: hidden;
|
182 |
-
}
|
183 |
-
|
184 |
-
.xoo-wsc-product {
|
185 |
-
padding: 15px;
|
186 |
-
width: 100%;
|
187 |
-
display: inline-block;
|
188 |
-
border-top: 1px solid #eee;
|
189 |
-
}
|
190 |
-
|
191 |
-
.xoo-wsc-img-col {
|
192 |
-
float: left;
|
193 |
-
text-align: center
|
194 |
-
}
|
195 |
-
|
196 |
-
.xoo-wsc-img-col img{
|
197 |
-
width: 100%;
|
198 |
-
height: auto;
|
199 |
-
}
|
200 |
-
|
201 |
-
a.xoo-wsc-remove {
|
202 |
-
margin-top: 5px;
|
203 |
-
display: inline-block;
|
204 |
-
text-transform: uppercase;
|
205 |
-
font-size: 10px
|
206 |
-
}
|
207 |
-
|
208 |
-
.xoo-wsc-sum-col {
|
209 |
-
display: inline-block;
|
210 |
-
margin-left: 10px;
|
211 |
-
float: left
|
212 |
-
}
|
213 |
-
|
214 |
-
a.xoo-wsc-pname {
|
215 |
-
word-wrap: break-word;
|
216 |
-
display: block;
|
217 |
-
width: 100%
|
218 |
-
}
|
219 |
-
|
220 |
-
.xoo-wsc-price {
|
221 |
-
margin: 3px 0
|
222 |
-
}
|
223 |
-
|
224 |
-
.xoo-wsc-sum-col .variation {
|
225 |
-
overflow: auto;
|
226 |
-
font-size: 12px;
|
227 |
-
margin: 5px 0;
|
228 |
-
}
|
229 |
-
|
230 |
-
.xoo-wsc-sum-col .variation dt {
|
231 |
-
display: inline-block;
|
232 |
-
margin: 0 3px 0 0;
|
233 |
-
float: none
|
234 |
-
}
|
235 |
-
|
236 |
-
.xoo-wsc-sum-col .variation dd {
|
237 |
-
display: inline-block;
|
238 |
-
margin: 0 5px 0 0;
|
239 |
-
float: none
|
240 |
-
}
|
241 |
-
|
242 |
-
|
243 |
-
.xoo-wsc-footer,
|
244 |
-
.xoo-wsc-footer a.button {
|
245 |
-
width: 100%;
|
246 |
-
text-align: center;
|
247 |
-
display: block;
|
248 |
-
}
|
249 |
-
|
250 |
-
.xoo-wsc-footer-a{
|
251 |
-
margin-bottom: 10px;
|
252 |
-
}
|
253 |
-
|
254 |
-
.xoo-wsc-subtotal {
|
255 |
-
text-align: center;
|
256 |
-
font-weight: 700;
|
257 |
-
font-size: 17px
|
258 |
-
}
|
259 |
-
|
260 |
-
.xoo-wsc-footer {
|
261 |
-
bottom: 0;
|
262 |
-
padding: 10px;
|
263 |
-
box-sizing: border-box;
|
264 |
-
border-top: 2px solid #eee;
|
265 |
-
}
|
266 |
-
|
267 |
-
.xoo-wsc-mgn {
|
268 |
-
margin: 10px 0;
|
269 |
-
display: block
|
270 |
-
}
|
271 |
-
|
272 |
-
input.xoo-wsc-qty::-webkit-inner-spin-button,
|
273 |
-
input.xoo-wsc-qty::-webkit-outer-spin-button {
|
274 |
-
-webkit-appearance: none;
|
275 |
-
margin: 0
|
276 |
-
}
|
277 |
-
|
278 |
-
.xoo-wsc-ecnt {
|
279 |
-
padding: 15px;
|
280 |
-
font-size: 20px;
|
281 |
-
display: block
|
282 |
-
}
|
283 |
-
|
284 |
-
.xoo-wsc-shiptxt {
|
285 |
-
padding: 0 15px;
|
286 |
-
display: block;
|
287 |
-
font-size: 13px
|
288 |
-
}
|
289 |
-
|
290 |
-
|
291 |
-
.xoo-wsc-notice-box{
|
292 |
-
left: 0;
|
293 |
-
right: 0;
|
294 |
-
bottom: 50px;
|
295 |
-
position: fixed;
|
296 |
-
z-index: 100000;
|
297 |
-
}
|
298 |
-
.xoo-wsc-notice-box > div{
|
299 |
-
display: table;
|
300 |
-
margin: 0 auto;
|
301 |
-
background-color: #333;
|
302 |
-
padding: 10px 20px;
|
303 |
-
color: white;
|
304 |
-
font-weight: 500;
|
305 |
-
font-size: 15px;
|
306 |
-
}
|
307 |
-
.xoo-wsc-notice ul.woocommerce-error a.button{
|
308 |
-
display: none;
|
309 |
-
}
|
310 |
-
.xoo-wsc-notice ul.woocommerce-error{
|
311 |
-
margin: 0;
|
312 |
-
}
|
313 |
-
.xoo-wsc-ptotal span.amount{font-size: 14px;}
|
314 |
-
|
315 |
-
.xoo-wsc-product.xoo-wsc-bundled-child{
|
316 |
-
border: 0;
|
317 |
-
}
|
318 |
-
.xoo-wsc-modal .variation:last-of-type {
|
319 |
-
display: none;
|
320 |
-
}
|
321 |
-
|
322 |
-
.xoo-wsc-modal .variation:first-of-type {
|
323 |
-
display: block;
|
324 |
-
}
|
325 |
-
|
326 |
-
a.added_to_cart {
|
327 |
-
display: none;
|
328 |
-
}
|
329 |
-
|
330 |
-
.xoo-wsc-is-child .xoo-wsc-img-col img {
|
331 |
-
max-width: 50px;
|
332 |
-
margin-left: 0;
|
333 |
-
float: right;
|
334 |
-
}
|
335 |
-
.xoo-wsc-is-child .xoo-wsc-total-sales , .xoo-wsc-is-child .xoo-wsc-remove {
|
336 |
-
display: none;
|
337 |
-
}
|
338 |
-
|
339 |
-
.xoo-wsc-product.xoo-wsc-is-child{
|
340 |
-
border: 0;
|
341 |
-
}
|
342 |
-
|
343 |
-
.xoo-wsc-is-child{
|
344 |
-
padding-top: 0;
|
345 |
-
padding-bottom: 0;
|
346 |
-
display: flex;
|
347 |
-
align-items: center;
|
348 |
-
}
|
349 |
-
|
350 |
-
.xoo-wsc-child-qty span:first-of-type {
|
351 |
-
margin-right: 5px;
|
352 |
-
}
|
353 |
-
|
354 |
-
.xoo-wsc-is-child{
|
355 |
-
display: flex;
|
356 |
-
align-items: center;
|
357 |
-
}
|
358 |
-
|
359 |
-
.xoo-wsc-child-qty {
|
360 |
-
color: #777;
|
361 |
-
display: table;
|
362 |
-
float: right;
|
363 |
-
padding-right: 10px;
|
364 |
-
}
|
365 |
-
.xoo-wsc-is-parent{
|
366 |
-
padding-bottom: 0;
|
367 |
-
}
|
368 |
-
|
369 |
-
.xoo-wsc-sum-col dl.component {
|
370 |
-
margin: 0;
|
371 |
-
display: inline-block;
|
372 |
-
}
|
373 |
-
|
374 |
-
.xoo-wsc-sum-col dl.component dd {
|
375 |
-
margin-bottom: 0;
|
376 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public/index.php
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php // Silence is golden
|
|
public/js/xoo-wsc-public.js
DELETED
@@ -1,324 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function($){
|
2 |
-
'use strict';
|
3 |
-
|
4 |
-
//Block cart on fragment refresh
|
5 |
-
$(document.body).on('wc_fragment_refresh',block_cart);
|
6 |
-
|
7 |
-
//Unblock cart
|
8 |
-
$(document.body).on('wc_fragments_refreshed wc_fragments_loaded',function(){
|
9 |
-
content_height();
|
10 |
-
});
|
11 |
-
|
12 |
-
// refresh fragment on document load
|
13 |
-
if(!xoo_wsc_localize.added_to_cart){
|
14 |
-
$( document.body ).trigger( 'wc_fragment_refresh' );
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
function update_cartChk(){
|
19 |
-
//Refresh checkout page
|
20 |
-
if( window.wc_checkout_params && wc_checkout_params.is_checkout === "1" ){
|
21 |
-
if( $( 'form.checkout' ).length === 0 ){
|
22 |
-
location.reload();
|
23 |
-
return;
|
24 |
-
}
|
25 |
-
$(document.body).trigger("update_checkout");
|
26 |
-
}
|
27 |
-
|
28 |
-
//Refresh Cart page
|
29 |
-
if( window.wc_add_to_cart_params && window.wc_add_to_cart_params.is_cart && wc_add_to_cart_params.is_cart === "1" ){
|
30 |
-
$(document.body).trigger("wc_update_cart");
|
31 |
-
}
|
32 |
-
}
|
33 |
-
|
34 |
-
$(document.body).on('xoo_wsc_cart_updated',update_cartChk);
|
35 |
-
|
36 |
-
|
37 |
-
//Toggle Side Cart
|
38 |
-
function toggle_sidecart(toggle_type){
|
39 |
-
var toggle_element = $('.xoo-wsc-modal , body, html'),
|
40 |
-
toggle_class = 'xoo-wsc-active';
|
41 |
-
|
42 |
-
if(toggle_type == 'show'){
|
43 |
-
toggle_element.addClass(toggle_class);
|
44 |
-
}
|
45 |
-
else if(toggle_type == 'hide'){
|
46 |
-
toggle_element.removeClass(toggle_class);
|
47 |
-
}
|
48 |
-
else{
|
49 |
-
toggle_element.toggleClass('xoo-wsc-active');
|
50 |
-
}
|
51 |
-
|
52 |
-
unblock_cart();
|
53 |
-
}
|
54 |
-
|
55 |
-
$('.xoo-wsc-basket').on('click',toggle_sidecart);
|
56 |
-
|
57 |
-
if(xoo_wsc_localize.trigger_class){
|
58 |
-
$('.'+xoo_wsc_localize.trigger_class).on('click',toggle_sidecart);
|
59 |
-
}
|
60 |
-
|
61 |
-
|
62 |
-
//Set Cart content height
|
63 |
-
function content_height(){
|
64 |
-
var header = $('.xoo-wsc-header').outerHeight(),
|
65 |
-
footer = $('.xoo-wsc-footer').outerHeight(),
|
66 |
-
screen = $(window).height();
|
67 |
-
|
68 |
-
|
69 |
-
if( xoo_wsc_localize.cont_height == "auto_adjust" ){
|
70 |
-
var body_height = 'calc(100% - '+(header+footer)+'px)';
|
71 |
-
if( $('.xoo-wsc-container').outerHeight() > screen ){
|
72 |
-
$('.xoo-wsc-container').css({"top": "0", "bottom": "0"});
|
73 |
-
}
|
74 |
-
}
|
75 |
-
else{
|
76 |
-
var body_height = screen-(header+footer);
|
77 |
-
}
|
78 |
-
|
79 |
-
|
80 |
-
$('.xoo-wsc-body').css('height',body_height);
|
81 |
-
|
82 |
-
};
|
83 |
-
|
84 |
-
content_height();
|
85 |
-
|
86 |
-
$(window).resize(function(){
|
87 |
-
content_height();
|
88 |
-
});
|
89 |
-
|
90 |
-
|
91 |
-
//Reset cart button/form
|
92 |
-
function reset_cart(atc_btn){
|
93 |
-
$('.xoo-wsc-icon-atc',atc_btn).remove();
|
94 |
-
var qty_elem = atc_btn.parents('form.cart').find('.qty');
|
95 |
-
if(qty_elem.length > 0) qty_elem.val(qty_elem.attr('min') || 1);
|
96 |
-
$('.added_to_cart').remove();
|
97 |
-
}
|
98 |
-
|
99 |
-
//Auto open Side Cart when item added to cart without ajax
|
100 |
-
(function(){
|
101 |
-
if(xoo_wsc_localize.added_to_cart){
|
102 |
-
var toggled = false;
|
103 |
-
$(document).on('wc_fragments_refreshed',function(){
|
104 |
-
if(!toggled){
|
105 |
-
setTimeout(toggle_sidecart,1,'show');
|
106 |
-
toggled = true;
|
107 |
-
}
|
108 |
-
})
|
109 |
-
}
|
110 |
-
}());
|
111 |
-
|
112 |
-
|
113 |
-
//Auto open with ajax & reset cart form
|
114 |
-
$(document).on('added_to_cart',function(event,fragments,cart_hash,atc_btn){
|
115 |
-
if(xoo_wsc_localize.auto_open_cart == 1){
|
116 |
-
setTimeout(toggle_sidecart,1,'show');
|
117 |
-
}
|
118 |
-
|
119 |
-
if(xoo_wsc_localize.atc_reset == 1){
|
120 |
-
reset_cart(atc_btn);
|
121 |
-
}
|
122 |
-
|
123 |
-
update_cartChk();
|
124 |
-
});
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
//Block Cart
|
129 |
-
function block_cart(){
|
130 |
-
$('.xoo-wsc-updating').show();
|
131 |
-
}
|
132 |
-
|
133 |
-
//Unblock cart
|
134 |
-
function unblock_cart(){
|
135 |
-
$('.xoo-wsc-updating').hide();
|
136 |
-
}
|
137 |
-
|
138 |
-
|
139 |
-
//Close Side Cart
|
140 |
-
function close_sidecart(e){
|
141 |
-
$.each(e.target.classList,function(key,value){
|
142 |
-
if(value != 'xoo-wsc-container' && (value == 'xoo-wsc-close' || value == 'xoo-wsc-opac' || value == 'xoo-wsc-basket' || value == 'xoo-wsc-cont')){
|
143 |
-
$('.xoo-wsc-modal , body, html').removeClass('xoo-wsc-active');
|
144 |
-
}
|
145 |
-
})
|
146 |
-
}
|
147 |
-
|
148 |
-
$('body').on('click','.xoo-wsc-close , .xoo-wsc-opac',function(e){
|
149 |
-
e.preventDefault();
|
150 |
-
close_sidecart(e);
|
151 |
-
});
|
152 |
-
|
153 |
-
$('body').on('click','.xoo-wsc-cont',function(e){
|
154 |
-
var link = $.trim($(this).attr('href'));
|
155 |
-
if( link == "#" || !link){
|
156 |
-
e.preventDefault();
|
157 |
-
close_sidecart(e);
|
158 |
-
}
|
159 |
-
});
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
//Add to cart function
|
164 |
-
function add_to_cart(atc_btn,product_data){
|
165 |
-
|
166 |
-
// Trigger event.
|
167 |
-
$( document.body ).trigger( 'adding_to_cart', [ atc_btn, product_data ] );
|
168 |
-
|
169 |
-
$.ajax({
|
170 |
-
url: xoo_wsc_localize.wc_ajax_url.toString().replace( '%%endpoint%%', 'xoo_wsc_add_to_cart' ),
|
171 |
-
type: 'POST',
|
172 |
-
data: $.param(product_data),
|
173 |
-
success: function(response){
|
174 |
-
|
175 |
-
add_to_cart_button_check_icon(atc_btn);
|
176 |
-
|
177 |
-
if(response.fragments){
|
178 |
-
// Trigger event so themes can refresh other areas.
|
179 |
-
$( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, atc_btn ] );
|
180 |
-
}
|
181 |
-
else if(response.error){
|
182 |
-
show_notice('error',response.error);
|
183 |
-
toggle_sidecart('show');
|
184 |
-
}
|
185 |
-
else{
|
186 |
-
console.log(response);
|
187 |
-
}
|
188 |
-
|
189 |
-
}
|
190 |
-
})
|
191 |
-
}
|
192 |
-
|
193 |
-
|
194 |
-
//Update cart
|
195 |
-
function update_cart(cart_key,new_qty){
|
196 |
-
|
197 |
-
$.ajax({
|
198 |
-
url: xoo_wsc_localize.wc_ajax_url.toString().replace( '%%endpoint%%', 'xoo_wsc_update_cart' ),
|
199 |
-
type: 'POST',
|
200 |
-
data: {
|
201 |
-
cart_key: cart_key,
|
202 |
-
new_qty: new_qty
|
203 |
-
},
|
204 |
-
success: function(response){
|
205 |
-
if(response.fragments){
|
206 |
-
var fragments = response.fragments,
|
207 |
-
cart_hash = response.cart_hash;
|
208 |
-
|
209 |
-
//Set fragments
|
210 |
-
$.each( response.fragments, function( key, value ) {
|
211 |
-
$( key ).replaceWith( value );
|
212 |
-
$( key ).stop( true ).css( 'opacity', '1' ).unblock();
|
213 |
-
});
|
214 |
-
|
215 |
-
|
216 |
-
if(wc_cart_fragments_params){
|
217 |
-
var cart_hash_key = wc_cart_fragments_params.ajax_url.toString() + '-wc_cart_hash';
|
218 |
-
//Set cart hash
|
219 |
-
sessionStorage.setItem( wc_cart_fragments_params.fragment_name, JSON.stringify( fragments ) );
|
220 |
-
localStorage.setItem( cart_hash_key, cart_hash );
|
221 |
-
sessionStorage.setItem( cart_hash_key, cart_hash );
|
222 |
-
}
|
223 |
-
|
224 |
-
$(document.body).trigger('wc_fragments_loaded');
|
225 |
-
$(document.body).trigger('xoo_wsc_cart_updated');
|
226 |
-
}
|
227 |
-
else{
|
228 |
-
//Print error
|
229 |
-
show_notice('error',response.error);
|
230 |
-
}
|
231 |
-
}
|
232 |
-
|
233 |
-
})
|
234 |
-
}
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
//Remove item from cart
|
239 |
-
$(document).on('click','.xoo-wsc-remove',function(e){
|
240 |
-
e.preventDefault();
|
241 |
-
block_cart();
|
242 |
-
var product_row = $(this).parents('.xoo-wsc-product');
|
243 |
-
var cart_key = product_row.data('xoo_wsc');
|
244 |
-
update_cart(cart_key,0);
|
245 |
-
})
|
246 |
-
|
247 |
-
//Add to cart on single page
|
248 |
-
|
249 |
-
$(document).on('submit','form.cart',function(e){
|
250 |
-
|
251 |
-
if( xoo_wsc_localize.ajax_atc != 1 ) return;
|
252 |
-
|
253 |
-
e.preventDefault();
|
254 |
-
block_cart();
|
255 |
-
var form = $(this);
|
256 |
-
var atc_btn = form.find( 'button[type="submit"]');
|
257 |
-
|
258 |
-
add_to_cart_button_loading_icon(atc_btn);
|
259 |
-
|
260 |
-
var product_data = form.serializeArray();
|
261 |
-
|
262 |
-
//Check for woocommerce custom quantity code
|
263 |
-
//https://docs.woocommerce.com/document/override-loop-template-and-show-quantities-next-to-add-to-cart-buttons/
|
264 |
-
var has_product_id = false;
|
265 |
-
$.each(product_data,function(key,form_item){
|
266 |
-
if(form_item.name === 'product_id' || form_item.name === 'add-to-cart'){
|
267 |
-
if(form_item.value){
|
268 |
-
has_product_id = true;
|
269 |
-
return false;
|
270 |
-
}
|
271 |
-
}
|
272 |
-
})
|
273 |
-
|
274 |
-
//If no product id found , look for the form action URL
|
275 |
-
if(!has_product_id){
|
276 |
-
var is_url = form.attr('action').match(/add-to-cart=([0-9]+)/);
|
277 |
-
var product_id = is_url ? is_url[1] : false;
|
278 |
-
}
|
279 |
-
|
280 |
-
// if button as name add-to-cart get it and add to form
|
281 |
-
if( atc_btn.attr('name') && atc_btn.attr('name') == 'add-to-cart' && atc_btn.attr('value') ){
|
282 |
-
var product_id = atc_btn.attr('value');
|
283 |
-
}
|
284 |
-
|
285 |
-
if(product_id){
|
286 |
-
product_data.push({name: 'add-to-cart', value: product_id});
|
287 |
-
}
|
288 |
-
|
289 |
-
|
290 |
-
product_data.push({name: 'action', value: 'xoo_wsc_add_to_cart'});
|
291 |
-
|
292 |
-
add_to_cart(atc_btn,product_data);//Ajax add to cart
|
293 |
-
})
|
294 |
-
|
295 |
-
|
296 |
-
//Notice Function
|
297 |
-
function show_notice(notice_type,notice){
|
298 |
-
$('.xoo-wsc-notice').html(notice).attr('class','xoo-wsc-notice').addClass('xoo-wsc-nt-'+notice_type);
|
299 |
-
$('.xoo-wsc-notice-box').fadeIn('fast');
|
300 |
-
clearTimeout(fadenotice);
|
301 |
-
var fadenotice = setTimeout(function(){
|
302 |
-
$('.xoo-wsc-notice-box').fadeOut('slow');
|
303 |
-
},2000);
|
304 |
-
};
|
305 |
-
|
306 |
-
//Add to cart preloader
|
307 |
-
function add_to_cart_button_loading_icon(atc_btn){
|
308 |
-
if(xoo_wsc_localize.atc_icons != 1) return;
|
309 |
-
|
310 |
-
if(atc_btn.find('.xoo-wsc-icon-atc').length !== 0){
|
311 |
-
atc_btn.find('.xoo-wsc-icon-atc').attr('class','xoo-wsc-icon-spinner2 xoo-wsc-icon-atc xoo-wsc-active');
|
312 |
-
}
|
313 |
-
else{
|
314 |
-
atc_btn.append('<span class="xoo-wsc-icon-spinner2 xoo-wsc-icon-atc xoo-wsc-active"></span>');
|
315 |
-
}
|
316 |
-
}
|
317 |
-
|
318 |
-
//Add to cart check icon
|
319 |
-
function add_to_cart_button_check_icon(atc_btn){
|
320 |
-
if(xoo_wsc_localize.atc_icons != 1) return;
|
321 |
-
// Check icon
|
322 |
-
atc_btn.find('.xoo-wsc-icon-atc').attr('class','xoo-wsc-icon-checkmark xoo-wsc-icon-atc');
|
323 |
-
}
|
324 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public/js/xoo-wsc-public.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(o){"use strict";function t(){if(window.wc_checkout_params&&"1"===wc_checkout_params.is_checkout){if(0===o("form.checkout").length)return void location.reload();o(document.body).trigger("update_checkout")}window.wc_add_to_cart_params&&window.wc_add_to_cart_params.is_cart&&"1"===wc_add_to_cart_params.is_cart&&o(document.body).trigger("wc_update_cart")}function c(t){var c=o(".xoo-wsc-modal , body"),a="xoo-wsc-active";"show"==t?c.addClass(a):"hide"==t?c.removeClass(a):c.toggleClass("xoo-wsc-active"),o(".xoo-wsc-updating").hide()}function a(){var t=o(".xoo-wsc-header").outerHeight(),c=o(".xoo-wsc-footer").outerHeight(),a=o(window).height();o(".xoo-wsc-body").height(a-(t+c))}function e(){o(".xoo-wsc-updating").show()}function r(t){o.each(t.target.classList,function(t,c){"xoo-wsc-container"==c||"xoo-wsc-close"!=c&&"xoo-wsc-opac"!=c&&"xoo-wsc-basket"!=c&&"xoo-wsc-cont"!=c||o(".xoo-wsc-modal , body").removeClass("xoo-wsc-active")})}function n(t,a){o(document.body).trigger("adding_to_cart",[t,a]),o.ajax({url:xoo_wsc_localize.wc_ajax_url.toString().replace("%%endpoint%%","xoo_wsc_add_to_cart"),type:"POST",data:o.param(a),success:function(a){!function(o){if(1!=xoo_wsc_localize.atc_icons)return;o.find(".xoo-wsc-icon-atc").attr("class","xoo-wsc-icon-checkmark xoo-wsc-icon-atc")}(t),a.fragments?o(document.body).trigger("added_to_cart",[a.fragments,a.cart_hash,t]):a.error?(s("error",a.error),c("show")):console.log(a)}})}function s(t,c){o(".xoo-wsc-notice").html(c).attr("class","xoo-wsc-notice").addClass("xoo-wsc-nt-"+t),o(".xoo-wsc-notice-box").fadeIn("fast"),clearTimeout(a);var a=setTimeout(function(){o(".xoo-wsc-notice-box").fadeOut("slow")},2e3)}o(document.body).on("wc_fragment_refresh",e),o(document.body).on("wc_fragments_refreshed wc_fragments_loaded",function(){a()}),xoo_wsc_localize.added_to_cart||o(document.body).trigger("wc_fragment_refresh"),o(document.body).on("xoo_wsc_cart_updated",t),o(".xoo-wsc-basket").on("click",c),xoo_wsc_localize.trigger_class&&o("."+xoo_wsc_localize.trigger_class).on("click",c),a(),o(window).resize(function(){a()}),function(){if(xoo_wsc_localize.added_to_cart){var t=!1;o(document).on("wc_fragments_refreshed",function(){t||(setTimeout(c,1,"show"),t=!0)})}}(),o(document).on("added_to_cart",function(a,e,r,n){1==xoo_wsc_localize.auto_open_cart&&setTimeout(c,1,"show"),1==xoo_wsc_localize.atc_reset&&function(t){o(".xoo-wsc-icon-atc",t).remove();var c=t.parents("form.cart").find(".qty");c.length>0&&c.val(c.attr("min")||1),o(".added_to_cart").remove()}(n),t()}),o("body").on("click",".xoo-wsc-close , .xoo-wsc-opac",function(o){o.preventDefault(),r(o)}),o("body").on("click",".xoo-wsc-cont",function(t){var c=o.trim(o(this).attr("href"));"#"!=c&&c||(t.preventDefault(),r(t))}),o(document).on("click",".xoo-wsc-remove",function(t){t.preventDefault(),e();var c,a,r=o(this).parents(".xoo-wsc-product").data("xoo_wsc");c=r,a=0,o.ajax({url:xoo_wsc_localize.wc_ajax_url.toString().replace("%%endpoint%%","xoo_wsc_update_cart"),type:"POST",data:{cart_key:c,new_qty:a},success:function(t){if(t.fragments){var c=t.fragments,a=t.cart_hash;if(o.each(t.fragments,function(t,c){o(t).replaceWith(c),o(t).stop(!0).css("opacity","1").unblock()}),wc_cart_fragments_params){var e=wc_cart_fragments_params.ajax_url.toString()+"-wc_cart_hash";sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(c)),localStorage.setItem(e,a),sessionStorage.setItem(e,a)}o(document.body).trigger("wc_fragments_loaded"),o(document.body).trigger("xoo_wsc_cart_updated")}else s("error",t.error)}})}),1==xoo_wsc_localize.ajax_atc&&o(document).on("submit","form.cart",function(t){t.preventDefault(),e();var c=o(this),a=c.find('button[type="submit"]');!function(o){if(1!=xoo_wsc_localize.atc_icons)return;0!==o.find(".xoo-wsc-icon-atc").length?o.find(".xoo-wsc-icon-atc").attr("class","xoo-wsc-icon-spinner2 xoo-wsc-icon-atc xoo-wsc-active"):o.append('<span class="xoo-wsc-icon-spinner2 xoo-wsc-icon-atc xoo-wsc-active"></span>')}(a);var r=c.serializeArray(),s=!1;if(o.each(r,function(o,t){if(("product_id"===t.name||"add-to-cart"===t.name)&&t.value)return s=!0,!1}),!s)var i=c.attr("action").match(/add-to-cart=([0-9]+)/),_=!!i&&i[1];if(a.attr("name")&&"add-to-cart"==a.attr("name")&&a.attr("value"))_=a.attr("value");_&&r.push({name:"add-to-cart",value:_}),r.push({name:"action",value:"xoo_wsc_add_to_cart"}),n(a,r)})});
|
|
public/partials/xoo-wsc-content.php
DELETED
@@ -1,162 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// If this file is called directly, abort.
|
4 |
-
if ( ! defined( 'WPINC' ) ) {
|
5 |
-
die;
|
6 |
-
}
|
7 |
-
|
8 |
-
$empty_cart_txt = isset( $options['sc-empty-text']) ? $options['sc-empty-text'] : __('Your cart is empty.','side-cart-woocommerce');
|
9 |
-
$head_title = isset($options['sc-head-text']) ? $options['sc-head-text']: __("Your Cart",'side-cart-woocommerce'); //Head Title
|
10 |
-
|
11 |
-
?>
|
12 |
-
|
13 |
-
|
14 |
-
<div class="xoo-wsc-header">
|
15 |
-
<?php do_action( 'xoo_wsc_before_header' ); ?>
|
16 |
-
<span class="xoo-wsc-ctxt"><?php esc_attr_e($head_title,'side-cart-woocommerce'); ?></span>
|
17 |
-
<span class="xoo-wsc-icon-cross xoo-wsc-close"></span>
|
18 |
-
</div>
|
19 |
-
|
20 |
-
<div class="xoo-wsc-body">
|
21 |
-
|
22 |
-
<?php do_action( 'xoo_wsc_before_product_summary' ); ?>
|
23 |
-
|
24 |
-
<div class="xoo-wsc-content">
|
25 |
-
<?php do_action( 'woocommerce_before_cart_contents' ); ?>
|
26 |
-
<?php if(WC()->cart->is_empty()): ?>
|
27 |
-
<span class="xoo-wsc-ecnt"><?php esc_attr_e($empty_cart_txt,'side-cart-woocommerce'); ?></span>
|
28 |
-
<?php else: ?>
|
29 |
-
|
30 |
-
<?php
|
31 |
-
$subtotal_txt = isset($options['sc-subtotal-text']) ? $options['sc-subtotal-text']: __("Subtotal:",'side-cart-woocommerce');
|
32 |
-
$shipping_txt = isset($options['sc-shipping-text']) ? $options['sc-shipping-text']: __("To find out your shipping cost , Please proceed to checkout.",'side-cart-woocommerce');
|
33 |
-
$show_ptotal = isset( $options['sc-show-ptotal']) ? $options['sc-show-ptotal'] : 1;
|
34 |
-
|
35 |
-
|
36 |
-
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
|
37 |
-
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
38 |
-
|
39 |
-
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
|
40 |
-
|
41 |
-
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
|
42 |
-
|
43 |
-
$product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
$product_name = apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_title() ), $cart_item, $cart_item_key );
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
$product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
|
57 |
-
|
58 |
-
$product_subtotal = apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key );
|
59 |
-
|
60 |
-
$attributes = '';
|
61 |
-
|
62 |
-
//Variation
|
63 |
-
$attributes .= $_product->is_type('variable') || $_product->is_type('variation') ? wc_get_formatted_variation($_product) : '';
|
64 |
-
// Meta data
|
65 |
-
if(version_compare( WC()->version , '3.3.0' , "<" )){
|
66 |
-
$attributes .= WC()->cart->get_item_data( $cart_item );
|
67 |
-
}
|
68 |
-
else{
|
69 |
-
$attributes .= wc_get_formatted_cart_item_data( $cart_item );
|
70 |
-
}
|
71 |
-
|
72 |
-
|
73 |
-
//Woocommerce Bundled Products
|
74 |
-
$bundled_parent = $bundled_child = null;
|
75 |
-
$extra_classes = array();
|
76 |
-
if(isset($cart_item['bundled_items'])){
|
77 |
-
$bundled_parent = true;
|
78 |
-
$extra_classes[] = 'xoo-wsc-bundled-parent';
|
79 |
-
}
|
80 |
-
elseif(isset($cart_item['bundled_by'])){
|
81 |
-
$bundled_child = true;
|
82 |
-
$extra_classes[] = 'xoo-wsc-bundled-child';
|
83 |
-
}
|
84 |
-
|
85 |
-
|
86 |
-
//Mix and match
|
87 |
-
if(isset($cart_item['mnm_contents'])){
|
88 |
-
$bundled_parent = true;
|
89 |
-
$extra_classes[] = 'xoo-wsc-mnm-parent';
|
90 |
-
}
|
91 |
-
elseif(isset($cart_item['mnm_container'])){
|
92 |
-
$bundled_child = true;
|
93 |
-
$extra_classes[] = 'xoo-wsc-mnm-child';
|
94 |
-
}
|
95 |
-
|
96 |
-
//Composite products
|
97 |
-
if(isset($cart_item['composite_children'])){
|
98 |
-
$bundled_parent = true;
|
99 |
-
$extra_classes[] = 'xoo-wsc-comp-parent';
|
100 |
-
}
|
101 |
-
elseif(isset($cart_item['composite_parent'])){
|
102 |
-
$bundled_child = true;
|
103 |
-
$extra_classes[] = 'xoo-wsc-comp-child';
|
104 |
-
}
|
105 |
-
|
106 |
-
if($bundled_parent){
|
107 |
-
$extra_classes[] = 'xoo-wsc-is-parent';
|
108 |
-
}
|
109 |
-
elseif($bundled_child){
|
110 |
-
$extra_classes[] = 'xoo-wsc-is-child';
|
111 |
-
}
|
112 |
-
|
113 |
-
|
114 |
-
?>
|
115 |
-
|
116 |
-
<div class="xoo-wsc-product <?php echo implode(' ',$extra_classes); ?>" data-xoo_wsc="<?php echo $cart_item_key; ?>">
|
117 |
-
<div class="xoo-wsc-img-col">
|
118 |
-
|
119 |
-
<a href="<?php echo $product_permalink; ?>"><?php echo $thumbnail; ?></a>
|
120 |
-
<?php if(!$bundled_child): ?>
|
121 |
-
<a href="#" class="xoo-wsc-remove"><?php _e('Remove','side-cart-woocommerce'); ?></a>
|
122 |
-
<?php endif; ?>
|
123 |
-
|
124 |
-
</div>
|
125 |
-
<div class="xoo-wsc-sum-col">
|
126 |
-
|
127 |
-
<?php do_action('xoo_wsc_before_product_summary',$_product); ?>
|
128 |
-
|
129 |
-
<?php echo $product_name; ?>
|
130 |
-
|
131 |
-
<?php echo $attributes ? $attributes : ''; ?>
|
132 |
-
|
133 |
-
<?php if(!$bundled_child): ?>
|
134 |
-
|
135 |
-
<div class="xoo-wsc-price">
|
136 |
-
<span><?php echo $cart_item['quantity']; ?></span> X <span><?php echo $product_price; ?></span>
|
137 |
-
<?php if($show_ptotal == 1): ?>
|
138 |
-
= <span><?php echo $product_subtotal; ?></span>
|
139 |
-
<?php endif; ?>
|
140 |
-
</div>
|
141 |
-
|
142 |
-
<?php else: ?>
|
143 |
-
<div class="xoo-wsc-child-qty"><span><?php _e('Qty:','side-cart-for-woocommerce'); ?></span><span><?php echo $cart_item['quantity']; ?></span></div>
|
144 |
-
<?php endif; ?>
|
145 |
-
|
146 |
-
<?php do_action('xoo_wsc_after_product_summary',$_product); ?>
|
147 |
-
|
148 |
-
</div>
|
149 |
-
</div>
|
150 |
-
<?php } ?>
|
151 |
-
<?php } ?>
|
152 |
-
<?php endif; ?>
|
153 |
-
|
154 |
-
<div class="xoo-wsc-updating">
|
155 |
-
<span class="xoo-wsc-icon-spinner2" aria-hidden="true"></span>
|
156 |
-
<span class="xoo-wsc-uopac"></span>
|
157 |
-
</div>
|
158 |
-
</div>
|
159 |
-
|
160 |
-
<?php do_action( 'xoo_wsc_after_product_summary' ); ?>
|
161 |
-
|
162 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public/partials/xoo-wsc-footer.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// If this file is called directly, abort.
|
4 |
-
if ( ! defined( 'WPINC' ) ) {
|
5 |
-
die;
|
6 |
-
}
|
7 |
-
|
8 |
-
|
9 |
-
$subtotal_txt = isset($options['sc-subtotal-text']) ? $options['sc-subtotal-text']: __("Subtotal:",'side-cart-woocommerce'); //Subtotal Text
|
10 |
-
$shipping_txt = isset($options['sc-shipping-text']) ? $options['sc-shipping-text']: __("To find out your shipping cost , Please proceed to checkout.",'side-cart-woocommerce'); // Shipping Text
|
11 |
-
$cart_txt = isset($options['sc-cart-text']) ? $options['sc-cart-text'] : __("View Cart",'side-cart-woocommerce'); //Cart Text
|
12 |
-
$chk_txt = isset($options['sc-checkout-text']) ? $options['sc-checkout-text']: __("Checkout",'side-cart-woocommerce'); //Checkout Text
|
13 |
-
$cont_txt = isset($options['sc-continue-text']) ? $options['sc-continue-text'] :__( "Continue Shopping",'side-cart-woocommerce'); //Continue Text
|
14 |
-
$cont_btn_url = isset($options['sc-cont-btn-url']) ? $options['sc-cont-btn-url'] : "#"; //Continue Text
|
15 |
-
|
16 |
-
|
17 |
-
?>
|
18 |
-
|
19 |
-
<?php if(!empty($cart_txt) || !empty($chk_txt) || !empty($cont_txt)): // If any footer button exists , add footer div ?>
|
20 |
-
|
21 |
-
<div class="xoo-wsc-footer">
|
22 |
-
|
23 |
-
<?php do_action( 'xoo_wsc_before_footer' ); ?>
|
24 |
-
|
25 |
-
<div class="xoo-wsc-footer-a">
|
26 |
-
<div class="xoo-wsc-subtotal">
|
27 |
-
<span><?php esc_attr_e($subtotal_txt,'side-cart-woocommerce') ?></span> <?php echo WC()->cart->get_cart_subtotal(); ?>
|
28 |
-
</div>
|
29 |
-
|
30 |
-
<?php if(!empty($shipping_txt)): ?>
|
31 |
-
<span class="xoo-wsc-shiptxt"><?php esc_attr_e($shipping_txt,'side-cart-woocommerce'); ?></span>
|
32 |
-
<?php endif; ?>
|
33 |
-
</div>
|
34 |
-
|
35 |
-
<div class="xoo-wsc-footer-b">
|
36 |
-
<?php $hide_btns = WC()->cart->is_empty() ? 'style="display: none;"' : '';?>
|
37 |
-
|
38 |
-
<?php if(!empty($cart_txt)): ?>
|
39 |
-
<a href="<?php echo wc_get_cart_url(); ?>" class="button xoo-wsc-cart btn" <?php echo $hide_btns; ?>><?php echo esc_attr__($cart_txt,'side-cart-woocommerce'); ?></a>
|
40 |
-
<?php endif; ?>
|
41 |
-
|
42 |
-
<?php if(!empty($chk_txt)): ?>
|
43 |
-
<a href="<?php echo wc_get_checkout_url(); ?>" class="button xoo-wsc-chkt btn" <?php echo $hide_btns; ?>><?php echo esc_attr__($chk_txt,'side-cart-woocommerce'); ?></a>
|
44 |
-
<?php endif; ?>
|
45 |
-
|
46 |
-
<?php if(!empty($cont_txt)): ?>
|
47 |
-
<a href="<?php echo $cont_btn_url; ?> " class="button xoo-wsc-cont btn"><?php echo esc_attr__($cont_txt,'side-cart-woocommerce'); ?></a>
|
48 |
-
<?php endif; ?>
|
49 |
-
</div>
|
50 |
-
|
51 |
-
<?php do_action( 'xoo_wsc_after_footer' ); ?>
|
52 |
-
|
53 |
-
</div>
|
54 |
-
|
55 |
-
<?php endif; ?>
|
56 |
-
|
57 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public/partials/xoo-wsc-markup.php
DELETED
@@ -1,76 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Side Cart HTML
|
5 |
-
*
|
6 |
-
* @since 1.0.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
global $post;
|
10 |
-
|
11 |
-
//User Settings
|
12 |
-
$options = get_option('xoo-wsc-gl-options');
|
13 |
-
$sy_options = get_option('xoo-wsc-sy-options');
|
14 |
-
|
15 |
-
$show_basket = isset( $options['bk-show-basket']) ? $options['bk-show-basket'] : 1; //Show Basket
|
16 |
-
$show_basket_mobile = isset( $options['bk-show-basket-mobile']) ? $options['bk-show-basket-mobile'] : 1; //Show Basket on mobile device
|
17 |
-
$hide_basket_pages = trim(isset( $options['bk-hide-basket-pages']) ? $options['bk-hide-basket-pages'] : ''); //Hide basket on pages
|
18 |
-
$show_count = isset( $options['bk-show-bkcount']) ? $options['bk-show-bkcount'] : 1; //Show Count
|
19 |
-
|
20 |
-
|
21 |
-
?>
|
22 |
-
|
23 |
-
<div class="xoo-wsc-modal">
|
24 |
-
|
25 |
-
<?php if($show_basket == 1): ?>
|
26 |
-
<?php
|
27 |
-
$hide_basket = false;
|
28 |
-
|
29 |
-
//On mobile device
|
30 |
-
if(wp_is_mobile() && $show_basket_mobile != 1){
|
31 |
-
$hide_basket = true;
|
32 |
-
}
|
33 |
-
|
34 |
-
//Hide on pages
|
35 |
-
if(isset($hide_basket_pages) && $hide_basket === false){
|
36 |
-
foreach (explode(',',$hide_basket_pages) as $page) {
|
37 |
-
//Check for page ID
|
38 |
-
if($page && is_page($page)){
|
39 |
-
$hide_basket = true;
|
40 |
-
break;
|
41 |
-
}
|
42 |
-
|
43 |
-
//Check for post type
|
44 |
-
if($post){
|
45 |
-
if($page == $post->ID || $page == $post->post_type){
|
46 |
-
$hide_basket = true;
|
47 |
-
break;
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
$show_basket_style = $hide_basket === true ? 'display:none;' : '';
|
55 |
-
?>
|
56 |
-
<div class="xoo-wsc-basket" style="<?php echo $show_basket_style; ?>">
|
57 |
-
<?php if($show_count == 1):
|
58 |
-
$count_value = WC()->cart->get_cart_contents_count();
|
59 |
-
?>
|
60 |
-
<span class="xoo-wsc-items-count"><?php echo $count_value ?></span>
|
61 |
-
<?php endif; ?>
|
62 |
-
<span class="xoo-wsc-icon-basket1 xoo-wsc-bki"></span>
|
63 |
-
</div>
|
64 |
-
<?php endif; ?>
|
65 |
-
|
66 |
-
<div class="xoo-wsc-opac"></div>
|
67 |
-
<div class="xoo-wsc-container">
|
68 |
-
<?php do_action('xoo_wsc_cart_content'); ?>
|
69 |
-
</div>
|
70 |
-
</div>
|
71 |
-
|
72 |
-
<div class="xoo-wsc-notice-box" style="display: none;">
|
73 |
-
<div>
|
74 |
-
<span class="xoo-wsc-notice"></span>
|
75 |
-
</div>
|
76 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/global/body/product.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Product
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/templates/side-cart-woocommerce/global/body/product.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion we will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen.
|
11 |
+
* @see https://docs.xootix.com/side-cart-woocommerce/
|
12 |
+
* @version 2.1
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit; // Exit if accessed directly
|
18 |
+
}
|
19 |
+
|
20 |
+
$productClasses = apply_filters( 'xoo_wsc_product_class', $productClasses );
|
21 |
+
|
22 |
+
?>
|
23 |
+
|
24 |
+
<div data-key="<?php echo $cart_item_key ?>" class="<?php echo implode( ' ', $productClasses ) ?>">
|
25 |
+
|
26 |
+
<?php do_action( 'xoo_wsc_product_start', $_product, $cart_item_key ); ?>
|
27 |
+
|
28 |
+
<?php if( $showPimage ): ?>
|
29 |
+
|
30 |
+
<div class="xoo-wsc-img-col">
|
31 |
+
|
32 |
+
<?php echo $thumbnail; ?>
|
33 |
+
|
34 |
+
<?php do_action( 'xoo_wsc_product_image_col', $_product, $cart_item_key ); ?>
|
35 |
+
|
36 |
+
</div>
|
37 |
+
|
38 |
+
<?php endif; ?>
|
39 |
+
|
40 |
+
<div class="xoo-wsc-sum-col">
|
41 |
+
|
42 |
+
<?php do_action( 'xoo_wsc_product_summary_col_start', $_product, $cart_item_key ); ?>
|
43 |
+
|
44 |
+
<div class="xoo-wsc-sm-info">
|
45 |
+
|
46 |
+
<div class="xoo-wsc-sm-left">
|
47 |
+
|
48 |
+
<?php if( $showPname ): ?>
|
49 |
+
<span class="xoo-wsc-pname"><?php echo $product_name; ?></span>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if( $showPmeta ) echo $product_meta ?>
|
53 |
+
|
54 |
+
<?php if( $showPprice && ( $qtyPriceDisplay === 'separate' ) ): ?>
|
55 |
+
<div class="xoo-wsc-pprice">
|
56 |
+
<?php echo __( 'Price: ', 'side-cart-woocommerce' ) . $product_price ?>
|
57 |
+
</div>
|
58 |
+
<?php endif; ?>
|
59 |
+
|
60 |
+
<!-- Quantity -->
|
61 |
+
|
62 |
+
<div class="xoo-wsc-qty-price">
|
63 |
+
|
64 |
+
<?php if( $showPprice && $qtyPriceDisplay === 'one_liner' ): ?>
|
65 |
+
<span><?php echo $cart_item['quantity']; ?></span> X <span><?php echo $product_price; ?></span>
|
66 |
+
<?php if( $showPtotal ): ?>
|
67 |
+
<span> = <?php echo $product_subtotal ?></span>
|
68 |
+
<?php endif; ?>
|
69 |
+
|
70 |
+
<?php else: ?>
|
71 |
+
<span><?php _e( 'Qty:', 'side-cart-woocommerce' ) ?></span> <span><?php echo $cart_item['quantity']; ?></span>
|
72 |
+
<?php endif; ?>
|
73 |
+
|
74 |
+
</div>
|
75 |
+
|
76 |
+
</div>
|
77 |
+
|
78 |
+
<!-- End Quantity -->
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
<div class="xoo-wsc-sm-right">
|
83 |
+
|
84 |
+
<?php if( $showPdel ): ?>
|
85 |
+
<span class="xoo-wsc-smr-del <?php echo $delete_icon ?>"></span>
|
86 |
+
<?php endif; ?>
|
87 |
+
|
88 |
+
<?php if( $showPtotal && ( $qtyPriceDisplay === 'separate' ) ): ?>
|
89 |
+
<span class="xoo-wsc-smr-ptotal"><?php echo $product_subtotal ?></span>
|
90 |
+
<?php endif; ?>
|
91 |
+
|
92 |
+
</div>
|
93 |
+
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<?php do_action( 'xoo_wsc_product_summary_col_end', $_product, $cart_item_key ); ?>
|
97 |
+
|
98 |
+
</div>
|
99 |
+
|
100 |
+
<?php do_action( 'xoo_wsc_product_end', $_product, $cart_item_key ); ?>
|
101 |
+
|
102 |
+
</div>
|
templates/global/footer/buttons.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Footer Buttons
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/templates/side-cart-woocommerce/global/footer/buttons.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion we will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen.
|
11 |
+
* @see https://docs.xootix.com/side-cart-woocommerce/
|
12 |
+
* @version 2.1
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit; // Exit if accessed directly
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
extract( Xoo_Wsc_Template_Args::footer_buttons() );
|
22 |
+
|
23 |
+
do_action( 'xoo_wsc_before_footer_btns' );
|
24 |
+
|
25 |
+
$buttonHTML = '<a href="%1$s" class="%2$s">%3$s</a>';
|
26 |
+
|
27 |
+
?>
|
28 |
+
<div class="xoo-wsc-ft-buttons-cont">
|
29 |
+
|
30 |
+
<?php foreach ( $buttons as $key => $button_data ){
|
31 |
+
|
32 |
+
if( !$button_data['label'] ) continue;
|
33 |
+
$button_data['class'][] = 'xoo-wsc-ft-btn-'.$key;
|
34 |
+
|
35 |
+
printf(
|
36 |
+
$buttonHTML,
|
37 |
+
esc_attr( $button_data['url'] ),
|
38 |
+
implode( ' ', $button_data['class'] ),
|
39 |
+
esc_html( $button_data['label'] )
|
40 |
+
);
|
41 |
+
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
</div>
|
45 |
+
|
46 |
+
<?php do_action( 'xoo_wsc_after_footer_btns' ); ?>
|
templates/global/footer/totals.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Totals
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/templates/side-cart-woocommerce/global/footer/totals.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion we will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen.
|
11 |
+
* @see https://docs.xootix.com/side-cart-woocommerce/
|
12 |
+
* @version 2.1
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit; // Exit if accessed directly
|
18 |
+
}
|
19 |
+
|
20 |
+
extract( Xoo_Wsc_Template_Args::footer_totals() );
|
21 |
+
|
22 |
+
?>
|
23 |
+
|
24 |
+
<?php if( WC()->cart->is_empty() ) return; ?>
|
25 |
+
|
26 |
+
<div class="xoo-wsc-ft-totals">
|
27 |
+
<?php foreach( $totals as $key => $data ): ?>
|
28 |
+
<div class="xoo-wsc-ft-amt xoo-wsc-ft-amt-<?php echo $key; ?> <?php echo isset( $data['action'] ) ? $data['action'] : '' ?>">
|
29 |
+
<span class="xoo-wsc-ft-amt-label"><?php echo $data['label'] ?></span>
|
30 |
+
<span class="xoo-wsc-ft-amt-value"><?php echo $data['value'] ?></span>
|
31 |
+
</div>
|
32 |
+
<?php endforeach; ?>
|
33 |
+
|
34 |
+
<?php do_action( 'xoo_wsc_totals_end' ); ?>
|
35 |
+
|
36 |
+
</div>
|
templates/global/inline-style.php
ADDED
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* Main */
|
4 |
+
$cartWidth = (int) $sy['scm-width'];
|
5 |
+
$cartheight = $sy['scm-height'];
|
6 |
+
$openFrom = $sy['scm-open-from'];
|
7 |
+
$fontFamily = $sy['scm-font'];
|
8 |
+
|
9 |
+
/* Basket */
|
10 |
+
$basketPosition = $sy['sck-position'];
|
11 |
+
$basketShape = $sy['sck-shape'];
|
12 |
+
$basketSize = $sy['sck-size'];
|
13 |
+
$basketOffset = $sy['sck-offset'];
|
14 |
+
$basketHOffset = $sy['sck-hoffset'];
|
15 |
+
$countPosition = $sy['sck-count-pos'];
|
16 |
+
$basketBG = $sy['sck-basket-bg'];
|
17 |
+
$basketColor = $sy['sck-basket-color'];
|
18 |
+
$basketShadow = $sy['sck-basket-sh'];
|
19 |
+
$countBG = $sy['sck-count-bg'];
|
20 |
+
$countColor = $sy['sck-count-color'];
|
21 |
+
|
22 |
+
/* Header */
|
23 |
+
$closeIconSize = $sy['sch-close-fsize'];
|
24 |
+
$closeIconAlign = $sy['sch-close-align'];
|
25 |
+
$headingAlign = $sy['sch-head-align'];
|
26 |
+
$headFontSize = $sy['sch-head-fsize'];
|
27 |
+
$headBGColor = $sy['sch-bgcolor'];
|
28 |
+
$headTxtColor = $sy['sch-txtcolor'];
|
29 |
+
$headBarColor = $sy['sch-sbcolor'];
|
30 |
+
|
31 |
+
/* Body */
|
32 |
+
$bodyFontSize = $sy['scb-fsize'];
|
33 |
+
$bodyBGColor = $sy['scb-bgcolor'];
|
34 |
+
$bodyTxtColor = $sy['scb-txtcolor'];
|
35 |
+
$bPpadding = $sy['scbp-padding'];
|
36 |
+
$bPimgwidth = (int) $sy['scbp-imgw'];
|
37 |
+
$bpDisplay = $sy['scbp-display'];
|
38 |
+
|
39 |
+
/* Quantity */
|
40 |
+
$qtyStyle = $sy['scbq-style'];
|
41 |
+
$qtyWidth = $sy['scbq-width'];
|
42 |
+
$qtyHeight = $sy['scbq-height'];
|
43 |
+
$qtyBorsize = $sy['scbq-bsize'];
|
44 |
+
$inputBorColor = $sy['scbq-input-bcolor'];
|
45 |
+
$btnBorColor = $sy['scbq-box-bcolor'];
|
46 |
+
$inputBgColor = $sy['scbq-input-bgcolor'];
|
47 |
+
$inputTxtColor = $sy['scbq-input-txtcolor'];
|
48 |
+
$btnBgColor = $sy['scbq-box-bgcolor'];
|
49 |
+
$btnTxtColor = $sy['scbq-box-txtcolor'];
|
50 |
+
|
51 |
+
/* Footer */
|
52 |
+
$footerStick = $sy['scf-stick'];
|
53 |
+
$buttonsOrder = $sy['scf-button-pos'];
|
54 |
+
$buttonRows = $sy['scf-btns-row'];
|
55 |
+
$buttonTheme = $sy['scf-btns-theme'];
|
56 |
+
$buttonbgColor = $sy['scf-btn-bgcolor'];
|
57 |
+
$buttontxtColor = $sy['scf-btn-txtcolor'];
|
58 |
+
$buttonBorder = $sy['scf-btn-border'];
|
59 |
+
$ftrPadding = $sy['scf-padding'];
|
60 |
+
$ftrBgColor = $sy['scf-bgcolor'];
|
61 |
+
$ftrTxtColor = $sy['scf-txtcolor'];
|
62 |
+
$ftrFsize = $sy['scf-fsize'];
|
63 |
+
|
64 |
+
/* Suggested Products */
|
65 |
+
$spImgWidth = (int) $sy['scsp-imgw'];
|
66 |
+
$spFontSize = (int) $sy['scsp-fsize'];
|
67 |
+
$spBGColor = $sy['scsp-bgcolor'];
|
68 |
+
|
69 |
+
if( $buttonRows === 'three' ){
|
70 |
+
$gridCols = '1fr 1fr 1fr';
|
71 |
+
}
|
72 |
+
elseif ( $buttonRows === 'two_one' ) {
|
73 |
+
$gridCols = '2fr 2fr';
|
74 |
+
echo 'a.xoo-wsc-ft-btn:nth-child(3){
|
75 |
+
grid-column: 1/-1;
|
76 |
+
}';
|
77 |
+
}
|
78 |
+
elseif ( $buttonRows === 'one_two' ) {
|
79 |
+
$gridCols = '2fr 2fr';
|
80 |
+
echo 'a.xoo-wsc-ft-btn:nth-child(1){
|
81 |
+
grid-column: 1/-1;
|
82 |
+
}';
|
83 |
+
}
|
84 |
+
else{
|
85 |
+
$gridCols = 'auto';
|
86 |
+
}
|
87 |
+
|
88 |
+
?>
|
89 |
+
|
90 |
+
.xoo-wsc-sp-left-col img{
|
91 |
+
max-width: <?php echo $spImgWidth ?>px;
|
92 |
+
}
|
93 |
+
|
94 |
+
.xoo-wsc-sp-right-col{
|
95 |
+
font-size: <?php echo $spFontSize ?>px;
|
96 |
+
}
|
97 |
+
|
98 |
+
.xoo-wsc-sp-container{
|
99 |
+
background-color: <?php echo $spBGColor ?>;
|
100 |
+
}
|
101 |
+
|
102 |
+
|
103 |
+
<?php if( $buttonTheme === 'custom' ): ?>
|
104 |
+
|
105 |
+
.xoo-wsc-ft-buttons-cont a.xoo-wsc-ft-btn {
|
106 |
+
background-color: <?php echo $buttonbgColor ?>;
|
107 |
+
color: <?php echo $buttontxtColor ?>;
|
108 |
+
border: <?php echo $buttonBorder ?>;
|
109 |
+
}
|
110 |
+
|
111 |
+
<?php endif; ?>
|
112 |
+
|
113 |
+
.xoo-wsc-footer{
|
114 |
+
background-color: <?php echo $ftrBgColor ?>;
|
115 |
+
color: <?php echo $ftrTxtColor ?>;
|
116 |
+
padding: <?php echo $ftrPadding ?>;
|
117 |
+
}
|
118 |
+
|
119 |
+
.xoo-wsc-footer, .xoo-wsc-footer a, .xoo-wsc-footer .amount{
|
120 |
+
font-size: <?php echo $ftrFsize ?>px;
|
121 |
+
}
|
122 |
+
|
123 |
+
.xoo-wsc-ft-buttons-cont{
|
124 |
+
grid-template-columns: <?php echo $gridCols ?>;
|
125 |
+
}
|
126 |
+
|
127 |
+
.xoo-wsc-basket{
|
128 |
+
<?php echo $basketPosition ?>: <?php echo $basketOffset ?>px;
|
129 |
+
<?php echo $openFrom ?>: <?php echo $basketHOffset ?>px;
|
130 |
+
background-color: <?php echo $basketBG ?>;
|
131 |
+
color: <?php echo $basketColor ?>;
|
132 |
+
box-shadow: <?php echo $basketShadow ?>;
|
133 |
+
border-radius: <?php echo $basketShape === 'round' ? '50%' : '14px' ?>
|
134 |
+
}
|
135 |
+
|
136 |
+
.xoo-wsc-bki{
|
137 |
+
font-size: <?php echo $basketSize.'px' ?>
|
138 |
+
}
|
139 |
+
|
140 |
+
.xoo-wsc-items-count{
|
141 |
+
<?php echo $countPosition === 'top_right' || $countPosition === 'top_left' ? 'top' : 'bottom' ?>: -12px;
|
142 |
+
<?php echo $countPosition === 'top_right' || $countPosition === 'bottom_right' ? 'right' : 'left' ?>: -12px;
|
143 |
+
}
|
144 |
+
|
145 |
+
.xoo-wsc-items-count, .xoo-wsc-sc-count{
|
146 |
+
background-color: <?php echo $countBG ?>;
|
147 |
+
color: <?php echo $countColor ?>;
|
148 |
+
}
|
149 |
+
|
150 |
+
.xoo-wsc-container, .xoo-wsc-slider{
|
151 |
+
max-width: <?php echo $cartWidth ?>px;
|
152 |
+
<?php echo $openFrom ?>: <?php echo -$cartWidth ?>px;
|
153 |
+
<?php echo $cartheight === 'full' ? 'top: 0;bottom: 0' : 'max-height: 100vh' ?>;
|
154 |
+
<?php echo $basketPosition ?>: 0;
|
155 |
+
font-family: <?php echo $fontFamily; ?>
|
156 |
+
}
|
157 |
+
|
158 |
+
|
159 |
+
.xoo-wsc-cart-active .xoo-wsc-container, .xoo-wsc-slider-active .xoo-wsc-slider{
|
160 |
+
<?php echo $openFrom ?>: 0;
|
161 |
+
}
|
162 |
+
|
163 |
+
<?php if( $footerStick !== 'yes' ): ?>
|
164 |
+
|
165 |
+
.xoo-wsc-container {
|
166 |
+
display: block;
|
167 |
+
overflow: auto;
|
168 |
+
}
|
169 |
+
|
170 |
+
<?php endif; ?>
|
171 |
+
|
172 |
+
.xoo-wsc-cart-active .xoo-wsc-basket{
|
173 |
+
<?php echo $openFrom ?>: <?php echo $cartWidth ?>px;
|
174 |
+
}
|
175 |
+
|
176 |
+
.xoo-wsc-slider{
|
177 |
+
right: -<?php echo $cartWidth ?>px;
|
178 |
+
}
|
179 |
+
|
180 |
+
span.xoo-wsch-close {
|
181 |
+
font-size: <?php echo $closeIconSize ?>px;
|
182 |
+
<?php echo $closeIconAlign ?>: 10px;
|
183 |
+
}
|
184 |
+
|
185 |
+
.xoo-wsch-top{
|
186 |
+
justify-content: <?php echo $headingAlign ?>;
|
187 |
+
}
|
188 |
+
|
189 |
+
.xoo-wsch-text{
|
190 |
+
font-size: <?php echo $headFontSize ?>px;
|
191 |
+
}
|
192 |
+
|
193 |
+
.xoo-wsc-header{
|
194 |
+
color: <?php echo $headTxtColor ?>;
|
195 |
+
background-color: <?php echo $headBGColor ?>;
|
196 |
+
}
|
197 |
+
|
198 |
+
.xoo-wsc-sb-bar > span{
|
199 |
+
background-color: <?php echo $headBarColor ?>;
|
200 |
+
}
|
201 |
+
|
202 |
+
.xoo-wsc-body{
|
203 |
+
background-color: <?php echo $bodyBGColor ?>;
|
204 |
+
}
|
205 |
+
|
206 |
+
.xoo-wsc-body, .xoo-wsc-body span.amount, .xoo-wsc-body a{
|
207 |
+
font-size: <?php echo $bodyFontSize ?>px;
|
208 |
+
color: <?php echo $bodyTxtColor ?>;
|
209 |
+
}
|
210 |
+
|
211 |
+
.xoo-wsc-product{
|
212 |
+
padding: <?php echo $bPpadding ?>;
|
213 |
+
}
|
214 |
+
|
215 |
+
.xoo-wsc-img-col{
|
216 |
+
width: <?php echo $bPimgwidth ?>%;
|
217 |
+
}
|
218 |
+
.xoo-wsc-sum-col{
|
219 |
+
width: <?php echo 100-$bPimgwidth ?>%;
|
220 |
+
}
|
221 |
+
|
222 |
+
<?php if( $bpDisplay === 'stretched' ): ?>
|
223 |
+
.xoo-wsc-sm-info{
|
224 |
+
flex-grow: 1;
|
225 |
+
align-self: stretch;
|
226 |
+
}
|
227 |
+
<?php else: ?>
|
228 |
+
.xoo-wsc-sum-col{
|
229 |
+
justify-content: <?php echo $bpDisplay ?>;
|
230 |
+
}
|
231 |
+
<?php endif; ?>
|
232 |
+
|
233 |
+
/***** Quantity *****/
|
234 |
+
|
235 |
+
.xoo-wsc-qty-box{
|
236 |
+
max-width: <?php echo $qtyWidth ?>px;
|
237 |
+
}
|
238 |
+
|
239 |
+
.xoo-wsc-qty-box.xoo-wsc-qtb-square{
|
240 |
+
border-color: <?php echo $btnBorColor ?>;
|
241 |
+
}
|
242 |
+
|
243 |
+
input[type="number"].xoo-wsc-qty{
|
244 |
+
border-color: <?php echo $inputBorColor ?>;
|
245 |
+
background-color: <?php echo $inputBgColor ?>;
|
246 |
+
color: <?php echo $inputTxtColor ?>;
|
247 |
+
height: <?php echo $qtyHeight ?>px;
|
248 |
+
line-height: <?php echo $qtyHeight ?>px;
|
249 |
+
}
|
250 |
+
|
251 |
+
input[type="number"].xoo-wsc-qty, .xoo-wsc-qtb-square{
|
252 |
+
border-width: <?php echo $qtyBorsize ?>px;
|
253 |
+
border-style: solid;
|
254 |
+
}
|
255 |
+
.xoo-wsc-chng{
|
256 |
+
background-color: <?php echo $btnBgColor ?>;
|
257 |
+
color: <?php echo $btnTxtColor ?>;
|
258 |
+
}
|
templates/xoo-wsc-body.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Side Cart Body (Avoid editing this template)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/templates/side-cart-woocommerce/xoo-wsc-body.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion we will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen.
|
11 |
+
* @see https://docs.xootix.com/side-cart-woocommerce/
|
12 |
+
* @version 2.1
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit; // Exit if accessed directly
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
extract( Xoo_Wsc_Template_Args::cart_body() );
|
22 |
+
|
23 |
+
?>
|
24 |
+
|
25 |
+
<?php if ( empty( $cart ) ){
|
26 |
+
|
27 |
+
$emptyHTML = '';
|
28 |
+
|
29 |
+
if( $emptyCartImg ){
|
30 |
+
$emptyHTML .= sprintf( '<img src="%1$s" class="xoo-wsc-emp-img" alt="%2$s">', $emptyCartImg, __( 'Empty Cart', 'side-cart-woocommerce' ) );
|
31 |
+
}
|
32 |
+
|
33 |
+
if( $emptyText ){
|
34 |
+
$emptyHTML .= sprintf( '<span>%s</span>', $emptyText );
|
35 |
+
}
|
36 |
+
|
37 |
+
if( $shopURL && $shopBtnText ){
|
38 |
+
$emptyHTML .= sprintf( '<a class="button btn" href="%1$s">%2$s</a>', $shopURL, $shopBtnText );
|
39 |
+
}
|
40 |
+
|
41 |
+
printf( '<div class="xoo-wsc-empty-cart">%s</div>', $emptyHTML );
|
42 |
+
|
43 |
+
do_action( 'xoo_wsc_empty_cart_content' );
|
44 |
+
|
45 |
+
return;
|
46 |
+
|
47 |
+
}
|
48 |
+
|
49 |
+
?>
|
50 |
+
|
51 |
+
<?php do_action( 'xoo_wsc_before_products' ); ?>
|
52 |
+
|
53 |
+
<div class="xoo-wsc-products">
|
54 |
+
|
55 |
+
<?php
|
56 |
+
|
57 |
+
/* Output Products */
|
58 |
+
foreach ( $cart as $cart_item_key => $cart_item ) {
|
59 |
+
|
60 |
+
$bundleData = xoo_wsc_cart()->is_bundle_item( $cart_item );
|
61 |
+
|
62 |
+
if( !empty( $bundleData ) ){
|
63 |
+
$showPLink = !$bundleData['link'] ? false : $showPLink;
|
64 |
+
}
|
65 |
+
|
66 |
+
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
67 |
+
|
68 |
+
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
|
69 |
+
|
70 |
+
if ( !$_product || !$_product->exists() || $cart_item['quantity'] < 0 || !apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) continue;
|
71 |
+
|
72 |
+
$product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
|
73 |
+
|
74 |
+
$product_name = $_product->get_name();
|
75 |
+
|
76 |
+
if( $_product->get_type() === 'variation' ){
|
77 |
+
if( $pnameVariation === "no" ){
|
78 |
+
$product_name = $_product->get_title();
|
79 |
+
$cart_item['data']->set_name( $_product->get_title() );
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
$product_name = apply_filters( 'woocommerce_cart_item_name', $product_name, $cart_item, $cart_item_key );
|
84 |
+
$product_name = $product_permalink && $showPLink ? sprintf( '<a href="%s">%s</a>', $product_permalink, $product_name ) : $product_name;
|
85 |
+
|
86 |
+
$product_meta = wc_get_formatted_cart_item_data( $cart_item );
|
87 |
+
|
88 |
+
$product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
|
89 |
+
|
90 |
+
$product_subtotal = apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key );
|
91 |
+
|
92 |
+
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
93 |
+
$thumbnail = $product_permalink && $showPLink ? sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ) : $thumbnail;
|
94 |
+
|
95 |
+
$cart_item_args = array(
|
96 |
+
'cart_item_key' => $cart_item_key,
|
97 |
+
'cart_item' => $cart_item,
|
98 |
+
'_product' => $_product,
|
99 |
+
'product_id' => $product_id,
|
100 |
+
'product_name' => $product_name,
|
101 |
+
'product_permalink' => $product_permalink,
|
102 |
+
'product_meta' => $product_meta,
|
103 |
+
'product_price' => $product_price,
|
104 |
+
'product_subtotal' => $product_subtotal,
|
105 |
+
'thumbnail' => $thumbnail,
|
106 |
+
'bundleData' => $bundleData
|
107 |
+
);
|
108 |
+
|
109 |
+
$args = Xoo_Wsc_Template_Args::product( $_product, $cart_item, $cart_item_key, $cart_item_args );
|
110 |
+
|
111 |
+
xoo_wsc_helper()->get_template(
|
112 |
+
'global/body/product.php',
|
113 |
+
$args
|
114 |
+
);
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
?>
|
119 |
+
|
120 |
+
</div>
|
121 |
+
|
122 |
+
<?php do_action( 'xoo_wsc_after_products' ); ?>
|
templates/xoo-wsc-container.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Side Cart Container
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/templates/side-cart-woocommerce/xoo-wsc-container.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion we will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen.
|
11 |
+
* @see https://docs.xootix.com/side-cart-woocommerce/
|
12 |
+
* @version 2.1
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit; // Exit if accessed directly
|
18 |
+
}
|
19 |
+
|
20 |
+
extract( Xoo_Wsc_Template_Args::cart_container() );
|
21 |
+
|
22 |
+
?>
|
23 |
+
|
24 |
+
<div class="xoo-wsc-container">
|
25 |
+
|
26 |
+
<div class="xoo-wsc-basket">
|
27 |
+
|
28 |
+
<?php if( $showCount === "yes" ): ?>
|
29 |
+
<span class="xoo-wsc-items-count"><?php echo xoo_wsc_cart()->get_cart_count() ?></span>
|
30 |
+
<?php endif; ?>
|
31 |
+
|
32 |
+
<span class="xoo-wsc-bki xoo-wsc-icon-basket1"></span>
|
33 |
+
|
34 |
+
<?php do_action( 'xoo_wsc_basket_content' ); ?>
|
35 |
+
|
36 |
+
</div>
|
37 |
+
|
38 |
+
<div class="xoo-wsc-header">
|
39 |
+
|
40 |
+
<?php do_action( 'xoo_wsc_header_start' ); ?>
|
41 |
+
|
42 |
+
<?php xoo_wsc_helper()->get_template( 'xoo-wsc-header.php' ); ?>
|
43 |
+
|
44 |
+
<?php do_action( 'xoo_wsc_header_end' ); ?>
|
45 |
+
|
46 |
+
</div>
|
47 |
+
|
48 |
+
|
49 |
+
<div class="xoo-wsc-body">
|
50 |
+
|
51 |
+
<?php do_action( 'xoo_wsc_body_start' ); ?>
|
52 |
+
|
53 |
+
<?php xoo_wsc_helper()->get_template( 'xoo-wsc-body.php' ); ?>
|
54 |
+
|
55 |
+
<?php do_action( 'xoo_wsc_body_end' ); ?>
|
56 |
+
|
57 |
+
</div>
|
58 |
+
|
59 |
+
<div class="xoo-wsc-footer">
|
60 |
+
|
61 |
+
<?php do_action( 'xoo_wsc_footer_start' ); ?>
|
62 |
+
|
63 |
+
<?php xoo_wsc_helper()->get_template( 'xoo-wsc-footer.php' ); ?>
|
64 |
+
|
65 |
+
<?php do_action( 'xoo_wsc_footer_end' ); ?>
|
66 |
+
|
67 |
+
</div>
|
68 |
+
|
69 |
+
<span class="xoo-wsc-loader"></span>
|
70 |
+
|
71 |
+
</div>
|
templates/xoo-wsc-footer.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Side Cart Footer
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/templates/side-cart-woocommerce/xoo-wsc-footer.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion we will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen.
|
11 |
+
* @see https://docs.xootix.com/side-cart-woocommerce/
|
12 |
+
* @version 2.1
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit; // Exit if accessed directly
|
18 |
+
}
|
19 |
+
|
20 |
+
extract( Xoo_Wsc_Template_Args::cart_footer() );
|
21 |
+
|
22 |
+
?>
|
23 |
+
|
24 |
+
|
25 |
+
<?php xoo_wsc_helper()->get_template( 'global/footer/totals.php' ) ?>
|
26 |
+
|
27 |
+
<?php xoo_wsc_helper()->get_template( 'global/footer/buttons.php' ); ?>
|
templates/xoo-wsc-header.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Side Cart Header
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/templates/side-cart-woocommerce/xoo-wsc-header.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion we will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen.
|
11 |
+
* @see https://docs.xootix.com/side-cart-woocommerce/
|
12 |
+
* @version 2.1
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit; // Exit if accessed directly
|
18 |
+
}
|
19 |
+
|
20 |
+
extract( Xoo_Wsc_Template_Args::cart_header() );
|
21 |
+
|
22 |
+
?>
|
23 |
+
|
24 |
+
<div class="xoo-wsch-top">
|
25 |
+
|
26 |
+
<?php if( $showNotifications ): ?>
|
27 |
+
<?php xoo_wsc_cart()->print_notices_html( 'cart' ); ?>
|
28 |
+
<?php endif; ?>
|
29 |
+
|
30 |
+
<?php if( $showBasket ): ?>
|
31 |
+
<div class="xoo-wsch-basket">
|
32 |
+
<span class="xoo-wscb-icon xoo-wsc-icon-bag2"></span>
|
33 |
+
<span class="xoo-wscb-count"><?php echo xoo_wsc_cart()->get_cart_count() ?></span>
|
34 |
+
</div>
|
35 |
+
<?php endif; ?>
|
36 |
+
|
37 |
+
<?php if( $heading ): ?>
|
38 |
+
<span class="xoo-wsch-text"><?php echo $heading ?></span>
|
39 |
+
<?php endif; ?>
|
40 |
+
|
41 |
+
<?php if( $showCloseIcon ): ?>
|
42 |
+
<span class="xoo-wsch-close xoo-wsc-icon-cross"></span>
|
43 |
+
<?php endif; ?>
|
44 |
+
|
45 |
+
</div>
|
templates/xoo-wsc-markup.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Side Cart Markup
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/templates/side-cart-woocommerce/xoo-wsc-markup.php.
|
6 |
+
*
|
7 |
+
* HOWEVER, on occasion we will need to update template files and you
|
8 |
+
* (the theme developer) will need to copy the new files to your theme to
|
9 |
+
* maintain compatibility. We try to do this as little as possible, but it does
|
10 |
+
* happen.
|
11 |
+
* @see https://docs.xootix.com/side-cart-woocommerce/
|
12 |
+
* @version 2.1
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit; // Exit if accessed directly
|
18 |
+
}
|
19 |
+
|
20 |
+
?>
|
21 |
+
|
22 |
+
<div class="xoo-wsc-modal">
|
23 |
+
|
24 |
+
<?php xoo_wsc_helper()->get_template( 'xoo-wsc-container.php' ); ?>
|
25 |
+
|
26 |
+
<span class="xoo-wsc-opac">
|
27 |
+
|
28 |
+
</div>
|
wpml-config.xml
CHANGED
@@ -1,15 +1,22 @@
|
|
1 |
<wpml-config>
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
</wpml-config>
|
1 |
<wpml-config>
|
2 |
+
|
3 |
+
<admin-texts>
|
4 |
+
|
5 |
+
<key name="xoo-wsc-gl-options">
|
6 |
+
<key name="sct-cart-heading" />
|
7 |
+
<key name="sct-ft-contbtn" />
|
8 |
+
<key name="sct-ft-cartbtn" />
|
9 |
+
<key name="sct-ft-chkbtn" />
|
10 |
+
<key name="sct-empty" />
|
11 |
+
<key name="sct-shop-btn" />
|
12 |
+
<key name="sct-sb-remaining" />
|
13 |
+
<key name="sct-sb-free" />
|
14 |
+
<key name="scu-continue" />
|
15 |
+
<key name="scu-cart" />
|
16 |
+
<key name="scu-checkout" />
|
17 |
+
<key name="sct-subtotal" />
|
18 |
+
</key>
|
19 |
+
|
20 |
+
</admin-texts>
|
21 |
+
|
22 |
</wpml-config>
|
xoo-wsc-main.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: Side Cart WooCommerce
|
4 |
+
* Plugin URI: http://xootix.com/side-cart-woocommerce
|
5 |
+
* Author: XootiX
|
6 |
+
* Version: 2.1
|
7 |
+
* Text Domain: side-cart-woocommerce
|
8 |
+
* Domain Path: /languages
|
9 |
+
* Author URI: http://xootix.com
|
10 |
+
* Description: Manage your cart from just a click away
|
11 |
+
* Tags: popup,floating cart,ajax,cart,slider
|
12 |
+
*/
|
13 |
+
|
14 |
+
|
15 |
+
//Exit if accessed directly
|
16 |
+
if( !defined('ABSPATH') ){
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
if ( ! defined( 'XOO_WSC_PLUGIN_FILE' ) ) {
|
21 |
+
define( 'XOO_WSC_PLUGIN_FILE', __FILE__ );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Initialize
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
*/
|
29 |
+
function xoo_wsc_init(){
|
30 |
+
|
31 |
+
if( !class_exists( 'woocommerce' ) ) return;
|
32 |
+
|
33 |
+
do_action( 'xoo_wsc_before_plugin_activation' );
|
34 |
+
|
35 |
+
if ( ! class_exists( 'Xoo_Wsc_Loader' ) ) {
|
36 |
+
require_once 'includes/class-xoo-wsc-loader.php';
|
37 |
+
}
|
38 |
+
|
39 |
+
xoo_wsc();
|
40 |
+
|
41 |
+
|
42 |
+
}
|
43 |
+
add_action( 'plugins_loaded','xoo_wsc_init', 15 );
|
44 |
+
|
45 |
+
function xoo_wsc(){
|
46 |
+
return Xoo_Wsc_Loader::get_instance();
|
47 |
+
}
|
xoo-wsc.php
DELETED
@@ -1,98 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* The plugin bootstrap file
|
5 |
-
*
|
6 |
-
* @since 1.0.0
|
7 |
-
* @package Side Cart WooCommerce
|
8 |
-
*
|
9 |
-
* @wordpress-plugin
|
10 |
-
* Plugin Name: WooCommerce Cart
|
11 |
-
* Plugin URI: http://xootix.com
|
12 |
-
* Description: Woo Side Cart shows all the items added to cart in a side popup.The plugin is ajax based.
|
13 |
-
* Version: 2.0
|
14 |
-
* Author: XootiX
|
15 |
-
* Author URI: http://xootix.com/
|
16 |
-
* License: GPL-2.0+
|
17 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
18 |
-
* Text Domain: side-cart-woocommerce
|
19 |
-
* Domain Path: /languages
|
20 |
-
*/
|
21 |
-
|
22 |
-
// If this file is called directly, abort.
|
23 |
-
if ( ! defined( 'WPINC' ) ) {
|
24 |
-
die;
|
25 |
-
}
|
26 |
-
|
27 |
-
define("XOO_WSC_PATH",plugin_dir_path(__FILE__));
|
28 |
-
|
29 |
-
/**
|
30 |
-
* The code that runs during plugin activation.
|
31 |
-
* This action is documented in includes/class-xoo-sc-activator.php
|
32 |
-
*/
|
33 |
-
function activate_xoo_wsc() {
|
34 |
-
require_once plugin_dir_path( __FILE__ ) . 'includes/class-xoo-wsc-activator.php';
|
35 |
-
xoo_wsc_Activator::activate();
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* The code that runs during plugin deactivation.
|
40 |
-
* This action is documented in includes/class-plugin-name-deactivator.php
|
41 |
-
*/
|
42 |
-
function deactivate_xoo_wsc() {
|
43 |
-
require_once plugin_dir_path( __FILE__ ) . 'includes/class-xoo-wsc-deactivator.php';
|
44 |
-
xoo_wsc_Deactivator::deactivate();
|
45 |
-
}
|
46 |
-
|
47 |
-
register_activation_hook( __FILE__, 'activate_xoo_wsc' );
|
48 |
-
register_deactivation_hook( __FILE__, 'deactivate_xoo_wsc' );
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Begins execution of the plugin.
|
52 |
-
*
|
53 |
-
* Since everything within the plugin is registered via hooks,
|
54 |
-
* then kicking off the plugin from this point in the file does
|
55 |
-
* not affect the page life cycle.
|
56 |
-
*
|
57 |
-
* @since 1.0.0
|
58 |
-
*/
|
59 |
-
function run_xoo_wsc() {
|
60 |
-
|
61 |
-
$plugin = new xoo_wsc();
|
62 |
-
$plugin->run();
|
63 |
-
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Check if WooCommerce is activated
|
68 |
-
*
|
69 |
-
* @since 1.0.0
|
70 |
-
*/
|
71 |
-
function xoo_wsc_init(){
|
72 |
-
if ( function_exists( 'WC' ) ) {
|
73 |
-
|
74 |
-
/*The core plugin class that is used to define internationalization,
|
75 |
-
admin-specific hooks, and public-facing site hooks.*/
|
76 |
-
|
77 |
-
require plugin_dir_path( __FILE__ ) . 'includes/class-xoo-wsc.php';
|
78 |
-
run_xoo_wsc();
|
79 |
-
}
|
80 |
-
else{
|
81 |
-
add_action( 'admin_notices', 'xoo_wsc_install_wc_notice' );
|
82 |
-
}
|
83 |
-
}
|
84 |
-
add_action('plugins_loaded','xoo_wsc_init');
|
85 |
-
|
86 |
-
|
87 |
-
/**
|
88 |
-
* WooCommerce not activated admin notice
|
89 |
-
*
|
90 |
-
* @since 1.0.0
|
91 |
-
*/
|
92 |
-
function xoo_wsc_install_wc_notice(){
|
93 |
-
?>
|
94 |
-
<div class="error">
|
95 |
-
<p><?php _e( 'Side Cart WooCommerce is enabled but not effective. It requires WooCommerce in order to work.', 'side-cart-woocommerce' ); ?></p>
|
96 |
-
</div>
|
97 |
-
<?php
|
98 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|