From 5f7a9a637b44303573b2725102a60848659c9a6e Mon Sep 17 00:00:00 2001 From: Varun Sridharan Date: Sat, 20 Feb 2016 12:50:05 +0530 Subject: [PATCH] Released V 0.17 --- readme.txt | 7 +++- woocommerce-quick-buy.php | 67 ++++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 34 deletions(-) diff --git a/readme.txt b/readme.txt index bd8f2c4..f1e9404 100644 --- a/readme.txt +++ b/readme.txt @@ -8,7 +8,7 @@ Requires at least: 3.0 Tested up to: 4.4 WC requires at least: 2.0 WC tested up to: 2.5.x -Stable tag: 0.16 +Stable tag: 0.17 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -48,6 +48,8 @@ Please update the settings once you have updated the plugin. if not this plugin == Screenshots == 1. WC Quick Buy Settings +2. Simple Product View +3. Variable Product View == Installation == @@ -116,6 +118,9 @@ Please open an issue at

Woocommerce Quick Buy Settings Is Not Configured... click here to configure

',lang_dom) ; + echo __( '

Woocommerce Quick Buy Settings Is Not Configured... click here to configure

',wc_qb_lang_dom) ; } /** @@ -103,7 +103,7 @@ function wc_quick_buy_failed_settings() { * @return Array List Of Sections In WC Settings Page */ public function wc_quick_buy_add_section( $sections ) { - $sections['wc_quick_buy'] = __( 'WC Quick Buy',lang_dom); + $sections['wc_quick_buy'] = __( 'WC Quick Buy',wc_qb_lang_dom); return $sections; } @@ -118,8 +118,8 @@ public static function install(){ add_option('wc_quick_buy_class','quick_buy_button'); add_option('wc_quick_buy_redirect','checkout'); add_option('wc_quick_buy_product_types',array('simple','variable')); - add_option('wc_quick_buy_simple_product_form_class',' form.cart[data-product_id={product_id}]'); - add_option('wc_quick_buy_variable_product_form_class',' form.variations_form[data-product_id={product_id}]'); + add_option('wc_quick_buy_simple_product_form_class',' form.cart[data-product_id=\'{product_id}\']'); + add_option('wc_quick_buy_variable_product_form_class','form.variations_form[data-product_id=\'{product_id}\']'); add_option('wc_quick_buy_btn_css','.wc_quick_buy_btn {} .wc_quick_buy_btn:hover {}'); @@ -136,38 +136,38 @@ public static function install(){ public function wc_quick_buy_all_settings( $settings, $current_section ) { if ( $current_section == 'wc_quick_buy' ) { $wc_quick_buy = array(); - $wc_quick_buy[] = array( 'name' => __( 'WC Quick Buy Settings', lang_dom ), + $wc_quick_buy[] = array( 'name' => __( 'WC Quick Buy Settings', wc_qb_lang_dom ), 'type' => 'title', - 'desc' => __( 'The following options are used to configure WC Quick Buy',lang_dom ), + 'desc' => __( 'The following options are used to configure WC Quick Buy',wc_qb_lang_dom ), 'id' => 'wc_quick_buy' ); $wc_quick_buy[] = array( - 'name' => __( 'Redirect Location', lang_dom ), - 'desc_tip' => __( 'After Add To Cart Where To Redirect The user',lang_dom ), + 'name' => __( 'Redirect Location', wc_qb_lang_dom ), + 'desc_tip' => __( 'After Add To Cart Where To Redirect The user',wc_qb_lang_dom ), 'id' => 'wc_quick_buy_redirect', 'type' => 'select', 'class' =>'chosen_select', - 'options' => array('cart' => __( 'Cart Page', lang_dom ) ,'checkout'=> __( 'Checkout Page', lang_dom ) ) + 'options' => array('cart' => __( 'Cart Page', wc_qb_lang_dom ) ,'checkout'=> __( 'Checkout Page', wc_qb_lang_dom ) ) ); $wc_quick_buy[] = array( - 'name' => __( 'Automatically Add Button ', lang_dom ), - 'desc_tip' => __( 'Automaticaly Adds Button After Add To Cart In Single Product View', lang_dom ), + 'name' => __( 'Automatically Add Button ', wc_qb_lang_dom ), + 'desc_tip' => __( 'Automaticaly Adds Button After Add To Cart In Single Product View', wc_qb_lang_dom ), 'id' => 'wc_quick_buy_auto', 'type' => 'select', 'class' =>'chosen_select', 'options' => array('true' => 'Yes','false'=>'No') ); $wc_quick_buy[] = array( - 'name' => __( 'Position', lang_dom ), - 'desc_tip' => __( 'Where the button need to be added in single page .. before / after',lang_dom ), + 'name' => __( 'Position', wc_qb_lang_dom ), + 'desc_tip' => __( 'Where the button need to be added in single page .. before / after',wc_qb_lang_dom ), 'id' => 'wc_quick_buy_position', 'type' => 'select', 'class' =>'chosen_select', 'options' => array('after' => 'After Add To Cart','before'=>'Before Add To Cart') ); $wc_quick_buy[] = array( - 'name' => __( 'Show Quick Buy Button For ', lang_dom ), - 'desc_tip' => __( 'For Which Products To Show Quick Buy Button [eg to show for simple products select only simple products]',lang_dom ), + 'name' => __( 'Show Quick Buy Button For ', wc_qb_lang_dom ), + 'desc_tip' => __( 'For Which Products To Show Quick Buy Button [eg to show for simple products select only simple products]',wc_qb_lang_dom ), 'id' => 'wc_quick_buy_product_types', 'type' => 'multiselect', 'class' =>'chosen_select', @@ -175,8 +175,8 @@ public function wc_quick_buy_all_settings( $settings, $current_section ) { ); $wc_quick_buy[] = array( - 'name' => __( 'Quick Buy Button Style', lang_dom), - 'desc_tip' => __( 'Directly Add Button CSS', lang_dom), + 'name' => __( 'Quick Buy Button Style', wc_qb_lang_dom), + 'desc_tip' => __( 'Directly Add Button CSS', wc_qb_lang_dom), 'id' => 'wc_quick_buy_btn_css', 'type' => 'textarea', 'class'=>'large-text', @@ -184,46 +184,46 @@ public function wc_quick_buy_all_settings( $settings, $current_section ) { ); $wc_quick_buy[] = array( - 'name' => __( 'Quick Buy Button Text',lang_dom ), - 'desc_tip' => __( 'You Can Change The Quick Buy Button Lable',lang_dom ), + 'name' => __( 'Quick Buy Button Text',wc_qb_lang_dom ), + 'desc_tip' => __( 'You Can Change The Quick Buy Button Lable',wc_qb_lang_dom ), 'id' => 'wc_quick_buy_lable', 'type' => 'text', ); $wc_quick_buy[] = array( - 'name' => __( 'Quick Buy Button Class',lang_dom ), - 'desc_tip' => __( 'You Can Change The Quick Buy Button Class', lang_dom ), + 'name' => __( 'Quick Buy Button Class',wc_qb_lang_dom ), + 'desc_tip' => __( 'You Can Change The Quick Buy Button Class', wc_qb_lang_dom ), 'id' => 'wc_quick_buy_class', 'type' => 'text', ); $wc_quick_buy[] = array( 'type' => 'sectionend', 'id' => 'wc_quick_buy' ); - $wc_quick_buy[] = array( 'name' => __( 'Debug / Troubleshoot', lang_dom ), + $wc_quick_buy[] = array( 'name' => __( 'Debug / Troubleshoot', wc_qb_lang_dom ), 'type' => 'title', - 'desc' => __( 'if JS is not running please use the below fields to fix it.', lang_dom ), + 'desc' => __( 'if JS is not running please use the below fields to fix it.', wc_qb_lang_dom ), 'id' => 'wc_quick_buy_troubleshoot' ); $wc_quick_buy[] = array( - 'name' => __( 'Simple Product Form Class',lang_dom ), - 'desc_tip' => __( 'Enter The Form Class for simple product add to cart form',lang_dom ), + 'name' => __( 'Simple Product Form Class',wc_qb_lang_dom ), + 'desc_tip' => __( 'Enter The Form Class for simple product add to cart form',wc_qb_lang_dom ), 'id' => 'wc_quick_buy_simple_product_form_class', 'type' => 'text', ); $wc_quick_buy[] = array( - 'name' => __( 'Variable Product Form Class', lang_dom ), - 'desc_tip' => __( 'Enter The Form Class for Variable product add to cart form', lang_dom ), + 'name' => __( 'Variable Product Form Class', wc_qb_lang_dom ), + 'desc_tip' => __( 'Enter The Form Class for Variable product add to cart form', wc_qb_lang_dom ), 'id' => 'wc_quick_buy_variable_product_form_class', 'type' => 'text', ); $wc_quick_buy[] = array( 'type' => 'sectionend', 'id' => 'wc_quick_buy' ); - $wc_quick_buy[] = array( 'name' => __( 'WC Quick Buy Short Code', lang_dom ), + $wc_quick_buy[] = array( 'name' => __( 'WC Quick Buy Short Code', wc_qb_lang_dom ), 'type' => 'title', 'desc' => __( '[wc_quick_buy] Use Inside of product loop - [wc_quick_buy product="2"] Outside loop With manual Product ID
To remove the js embeded by shortcode use [wc_quick_buy product="2" show_js="false"]

Note : Do not add this shortcode in a form. as this shortcode itself generates a html form

.', lang_dom ), + [wc_quick_buy product="2"] Outside loop With manual Product ID
To remove the js embeded by shortcode use [wc_quick_buy product="2" show_js="false"]

Note : Do not add this shortcode in a form. as this shortcode itself generates a html form

.', wc_qb_lang_dom ), 'id' => 'wc_quick_buy_shortcode' ); @@ -410,6 +410,7 @@ class="wc_quick_buy_form wc_quick_buy_form_'.$productid.'" method="post" enctype jQuery.each( datas, function( key, value ) { if(value["name"] != "quantity" && value["name"] != "add-to-cart"){ jQuery("form#wc_quick_buy_'.$productid.' > div#variable_details").append(\' \'); + jQuery("form#wc_quick_buy_'.$productid.' > div#variable_details").append(\' \'); } }); });