Changeset 2792087
- Timestamp:
- 09/29/2022 07:00:13 PM (3 years ago)
- Location:
- product-compare-for-woocommerce/trunk
- Files:
-
- 10 edited
-
admin/class-cdlzr-proco-actions.php (modified) (1 diff)
-
admin/class-cdlzr-proco-admin.php (modified) (1 diff)
-
admin/inc/class-cdlzr-dashboard-page.php (modified) (1 diff)
-
product-compare-for-woocommerce.php (modified) (1 diff)
-
public/class-cdlzr-proco-addbutton.php (modified) (2 diffs)
-
public/class-cdlzr-proco-frontend.php (modified) (1 diff)
-
public/class-cdlzr-proco-public.php (modified) (3 diffs)
-
public/handler/show_compared_products.php (modified) (2 diffs)
-
public/libs/public_js.js (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
product-compare-for-woocommerce/trunk/admin/class-cdlzr-proco-actions.php
r2606301 r2792087 13 13 include( CDLZR_PRODUCT_COMPARE_DIR_PATH . 'admin/inc/handler/setting-handler.php' ); 14 14 } 15 16 17 public static function cdlzr_proco_admin_print_scripts($hook_suffix){ 18 $screen = get_current_screen(); 19 //echo $hook_suffix; 20 //if ( in_array( $hook_suffix, array('admin.php') ) ) { 21 //var_dump($screen); 22 $screen = get_current_screen(); 23 wp_enqueue_script( 'jquery' ); //mother js library 24 // here 'cdlzr_proco' is cptname 25 if ( 'toplevel_page_cdlzr_proco' === $screen->base ) { 26 27 wp_enqueue_style( 'cdlzr-proco-bootstrap', CDLZR_PRODUCT_COMPARE_URL . '/assets/css/bootstrap.css' ); 28 wp_enqueue_script('cdlzr-proco-bootstrap-js', CDLZR_PRODUCT_COMPARE_URL . '/assets/js/bootstrap.min.js', array('jquery'), true, true); 29 30 } 31 //} 32 } 15 33 } 16 34 } -
product-compare-for-woocommerce/trunk/admin/class-cdlzr-proco-admin.php
r2606301 r2792087 24 24 */ 25 25 add_action( 'wp_ajax_save_options_adminside', array( 'CDLZR_Admin_Actions', 'save_options' ) ); 26 27 add_action( 'admin_enqueue_scripts', array( 'CDLZR_Admin_Actions', 'cdlzr_proco_admin_print_scripts' ) ); 26 28 } 27 29 } -
product-compare-for-woocommerce/trunk/admin/inc/class-cdlzr-dashboard-page.php
r2606301 r2792087 84 84 </div> 85 85 <div class="form-group col"> 86 <label for="proco_c2"><?php _e( 'Show compare button in products archivepage', CDLZR_PRODUCT_COMPARE ); ?></label>86 <label for="proco_c2"><?php _e( 'Show compare button in products shop page', CDLZR_PRODUCT_COMPARE ); ?></label> 87 87 <input type="checkbox" name="proco_c2" class="form-control" id="proco_c2" value="1" <?php echo ( $show_button_productlist == 1 ) ? 'checked=checked' : '' ?>> 88 88 </div> -
product-compare-for-woocommerce/trunk/product-compare-for-woocommerce.php
r2606304 r2792087 4 4 * Plugin URI: https://wordpress.org/plugins/ 5 5 * Description: The plugin give you the ability to compare the products by their category 6 * Version: 0. 16 * Version: 0.2 7 7 * Author: Codelizar 8 8 * Author URI: https://codelizar.com/ -
product-compare-for-woocommerce/trunk/public/class-cdlzr-proco-addbutton.php
r2606301 r2792087 8 8 if( !class_exists('CDLZR_PROCO_ADDBUTTON')) { 9 9 class CDLZR_PROCO_ADDBUTTON { 10 public static function proco_archive_page_compare_btn_archivePage() {10 public static function proco_archive_page_compare_btn_archivePage(){ 11 11 global $product; 12 12 $get_saved_option = get_option( 'proco_product_compare' ); … … 48 48 if( isset( $get_saved_option['button_type'] ) && $get_saved_option['button_type'] == 1 ) { 49 49 ?> 50 <a href="#" class="product_type_simple add_to_cart_button adcomp-button <?php echo esc_html(self::hide_button($product->get_id())); ?>" id="<?php echo esc_attr($product->get_id()); ?>" data-id="<?php echo esc_attr($product->get_id()); ?>">50 <a href="#" class="product_type_simple add_to_cart_button adcomp-button <?php //echo self::hide_button($product->get_id()); ?>" id="<?php echo esc_attr($product->get_id()); ?>" data-id="<?php echo esc_attr($product->get_id()); ?>"> 51 51 <?php echo esc_html($button_text); ?> 52 52 </a> 53 53 <?php 54 54 } 55 elseif ( isset( $get_saved_option['button_type'] ) && $get_saved_option['button_type'] == 2 ) { 55 elseif ( isset( $get_saved_option['button_type'] ) && $get_saved_option['button_type'] == 2 ) { 56 56 ?> 57 <button type="button" class="button product_type_simple add_to_cart_button adcomp-button <?php echo esc_html(self::hide_button($product->get_id())); ?>" id="<?php echo esc_attr($product->get_id()); ?>" data-id="<?php echo esc_attr($product->get_id()); ?>">57 <button type="button" class="button product_type_simple add_to_cart_button adcomp-button <?php //echo self::hide_button($product->get_id()); ?>" id="<?php echo esc_attr($product->get_id()); ?>" data-id="<?php echo esc_attr($product->get_id()); ?>"> 58 58 <?php echo esc_html($button_text); ?> 59 59 </button> -
product-compare-for-woocommerce/trunk/public/class-cdlzr-proco-frontend.php
r2606301 r2792087 20 20 wp_enqueue_script( 'datatable_js', CDLZR_PRODUCT_COMPARE_URL . 'assets/datatable/jquery.dataTables.min.js' ); 21 21 /* Front ajax load */ 22 wp_enqueue_script( 'public_js', CDLZR_PRODUCT_COMPARE_URL . 'public/libs/public_js.js', null, null, true ); 23 wp_localize_script( 'public_js', 'procopublicajax', admin_url( 'admin-post.php' ) ); 22 //wp_enqueue_script( 'public_js', CDLZR_PRODUCT_COMPARE_URL . 'public/libs/public_js.js', null, null, true ); 23 //wp_localize_script( 'public_js', 'procopublicajax', admin_url( 'admin-post.php' ) ); 24 25 26 wp_enqueue_script( 'public_js', CDLZR_PRODUCT_COMPARE_URL . 'public/libs/public_js.js' , ['jquery'], '1.2', true ); 27 wp_localize_script( 'public_js', 'procopublicajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); 24 28 } 25 29 } -
product-compare-for-woocommerce/trunk/public/class-cdlzr-proco-public.php
r2606301 r2792087 25 25 * Action for ajax 26 26 */ 27 add_action( ' admin_post_check_upg_prdct_category', array( 'Proco_Frontend_Actions', 'check_product_category' ) );28 add_action( ' admin_post_nopriv_check_upg_prdct_category', array( 'Proco_Frontend_Actions', 'check_product_category' ) );27 add_action( 'wp_ajax_check_upg_prdct_category', array( 'Proco_Frontend_Actions', 'check_product_category' ) ); 28 add_action( 'wp_ajax_nopriv_check_upg_prdct_category', array( 'Proco_Frontend_Actions', 'check_product_category' ) ); 29 29 30 30 /** … … 32 32 */ 33 33 34 add_action( ' admin_post_show_compare_table_popup', array( 'Proco_Frontend_Actions', 'show_product_compare_table' ) );35 add_action( ' admin_post_nopriv_show_compare_table_popup', array( 'Proco_Frontend_Actions', 'show_product_compare_table' ) );34 add_action( 'wp_ajax_show_compare_table_popup', array( 'Proco_Frontend_Actions', 'show_product_compare_table' ) ); 35 add_action( 'wp_ajax_nopriv_show_compare_table_popup', array( 'Proco_Frontend_Actions', 'show_product_compare_table' ) ); 36 36 37 37 /** 38 38 * Action to remove product from compare table 39 39 */ 40 add_action( ' admin_post_remove_product_compare_table', array( 'Proco_Frontend_Actions', 'remove_product_compare_table' ) );41 add_action( ' admin_post_nopriv_remove_product_compare_table', array( 'Proco_Frontend_Actions', 'remove_product_compare_table' ) );40 add_action( 'wp_ajax_remove_product_compare_table', array( 'Proco_Frontend_Actions', 'remove_product_compare_table' ) ); 41 add_action( 'wp_ajax_nopriv_remove_product_compare_table', array( 'Proco_Frontend_Actions', 'remove_product_compare_table' ) ); 42 42 43 43 /* … … 51 51 */ 52 52 if( $show_button_productlist == 1 ) { 53 add_action( 'woocommerce_after_shop_loop_item', array('C LDZR_PROCO_ADDBUTTON','proco_archive_page_compare_btn_archivePage'), 10 );53 add_action( 'woocommerce_after_shop_loop_item', array('CDLZR_PROCO_ADDBUTTON','proco_archive_page_compare_btn_archivePage'), 10 ); 54 54 add_action( 'woocommerce_after_shop_loop_item', array('CDLZR_PROCO_PUBLIC','show_view'), 10 ); 55 55 } -
product-compare-for-woocommerce/trunk/public/handler/show_compared_products.php
r2606301 r2792087 99 99 if( count($image) > 0 ) { 100 100 for( $i_mage = 0; $i_mage < count($image); $i_mage++ ) { 101 echo "<td class='col'><a href='' class='remove_product' data-id='".esc_attr($product_id[$i_mage])."'> remove<span class='crossign'>X</span></a>". esc_html($image[$i_mage])."</td>";101 echo "<td class='col'><a href='' class='remove_product' data-id='".esc_attr($product_id[$i_mage])."'><span class='crossign'>X</span></a>". $image[$i_mage] ."</td>"; 102 102 } 103 103 } … … 210 210 if( count($regular_price) > 0 ) { 211 211 for( $regular_price_counter = 0; $regular_price_counter < count($regular_price); $regular_price_counter++ ) { 212 echo "<td class='col'>". esc_html(wc_price($regular_price[$regular_price_counter])) ."</td>";212 echo "<td class='col'>". wc_price($regular_price[$regular_price_counter]) ."</td>"; 213 213 } 214 214 } -
product-compare-for-woocommerce/trunk/public/libs/public_js.js
r2606301 r2792087 9 9 var request = jQuery.ajax({ 10 10 method: 'post', 11 url: procopublicajax+"?action=check_upg_prdct_category", 12 data: 'product_id='+product_id, 13 action: "check_upg_prdct_category", 11 url: procopublicajax.ajaxurl, 12 //url: procopublicajax+"?action=check_upg_prdct_category", 13 data:{ 14 action: "check_upg_prdct_category", 15 product_id: product_id 16 }, 17 //data: 'product_id='+product_id, 18 14 19 beforeSend: function(){ 15 20 // Show image container … … 33 38 jQuery.ajax({ 34 39 method: 'get', 35 url: procopublicajax+"?action=show_compare_table_popup", 40 url: procopublicajax.ajaxurl, 41 data:{ 42 action: "show_compare_table_popup" 43 }, 44 //url: procopublicajax+"?action=show_compare_table_popup", 36 45 success: function( sct_result ) { 37 46 jQuery('.result').html(sct_result); … … 49 58 jQuery.ajax({ 50 59 method: 'post', 51 url: procopublicajax+"?action=remove_product_compare_table", 52 data:'productId_remove='+productId_remove, 60 url: procopublicajax.ajaxurl, 61 data:{ 62 action: "remove_product_compare_table", 63 productId_remove: productId_remove 64 }, 65 //url: procopublicajax+"?action=remove_product_compare_table", 66 //data:'productId_remove='+productId_remove, 53 67 beforeSend: function(){ 54 68 // Show image container … … 64 78 jQuery.ajax({ 65 79 method: 'get', 66 url: procopublicajax+"?action=show_compare_table_popup", 80 url: procopublicajax.ajaxurl, 81 data:{ 82 action: "show_compare_table_popup", 83 product_id: productId_remove 84 }, 85 //url: procopublicajax+"?action=show_compare_table_popup", 67 86 beforeSend: function(){ 68 87 // Show image container -
product-compare-for-woocommerce/trunk/readme.txt
r2606301 r2792087 3 3 Contributors: codelizarplugs 4 4 Donate link: https://codelizar.com/ 5 Tags: woocommerce, products, e-commerce, product compare, woocommerce product compare, product comparison, woocommerce compare products, woocommerce table compare, woocommerce compare items, add to compare button, compare table, custom compare buttons5 Tags: woocommerce, products, product compare, product table, list, grid, product comparison, woocommerce compare products, woocommerce table compare, woocommerce compare items, add to compare button, compare table, custom compare buttons 6 6 Donate link: https://codelizar.com/ 7 7 Requires at least: 4.9 8 Tested up to: 5.8.19 Stable tag: 0. 18 Tested up to: 6.0.2 9 Stable tag: 0.2 10 10 Requires PHP: 5.2 11 11 License: GPLv2 or later 12 12 License URI: http://www.gnu.org/licenses/gpl-2.0.html 13 13 14 The plugin give you the ability to compare the products by their category14 The plugin give you the ability to compare the WooCommerce products by their category 15 15 16 16 == Description == … … 23 23 * Add to cart button in modal - Compare Table 24 24 25 > #### Demos 26 > 25 ### More Plugins 26 * [Ultimate YouTube/Vimeo Video Player Pro Demo](https://codelizar.com/product/ultimate-youtube-video-player-pro/) 27 * [Accordion Box Pro With WooCommerce Addon](https://codelizar.com/product/accordion-box-pro/) 28 * [Tabs & Pills Pro Demo](https://codelizar.com/elementor-662/) 29 * [Grid Slid Pinterest Feed Pro](https://codelizar.com/product/grid-slid-pinterest-feed-pro/) 30 * [Gallery-Slider & Follow Button For Pinterest Pro](https://codelizar.com/product/grid-slid-pins-pro/) 31 * [Product Table Pro For WooCommerce](https://codelizar.com/product/product-table-pro-for-woocommerce/) 27 32 28 33 == Screenshots == 29 30 31 == Upgrade Notice == 32 34 * Selected Proucts List in Compare Table 35 * Pro - Product Table in Shop Page 36 * Pro - Where to diplay Product Table - Settings 37 * Pro - Pagination and Shortcode with other Settings 33 38 34 39 == Changelog == … … 36 41 = 0.1 = 37 42 * Initial Version 43 44 = 0.2 = 45 * Shop Page Button Bug fixed 46 * Modal Data Bug Fixed
Note: See TracChangeset
for help on using the changeset viewer.