Plugin Directory

Changeset 2148723


Ignore:
Timestamp:
08/30/2019 09:40:57 PM (7 years ago)
Author:
reality66
Message:

Release 2.3.5

Location:
cart66-cloud/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • cart66-cloud/trunk/cart66-cloud.php

    r2146461 r2148723  
    44Plugin URI: http://cart66.com
    55Description: Ecommerce Without The Clutter
    6 Version: 2.3.4
     6Version: 2.3.5
    77Author: Reality66
    88Author URI: http://www.reality66.com
  • cart66-cloud/trunk/includes/admin/cc-product-meta-box.php

    r2108304 r2148723  
    77    add_action( 'add_meta_boxes', 'cc_add_product_meta_box' );
    88    add_action( 'save_post', 'cc_save_product_meta_box', 10, 2 );
    9    
    10     $url = cc_url();
    11     //wp_enqueue_style( 'choices-base', 'https://cdn.jsdelivr.net/npm/choices.js/public/assets/styles/base.min.css');
    12     wp_enqueue_style( 'choices', 'https://cdn.jsdelivr.net/npm/choices.js/public/assets/styles/choices.min.css');
    13     wp_enqueue_script( 'choices', 'https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js');
    149}
    1510
  • cart66-cloud/trunk/includes/admin/class-cc-admin-media-button.php

    r1815908 r2148723  
    44
    55    public static function add_media_button( $context ) {
    6         // CC_Log::write( 'Called add_media_button. Context: ' . print_r( $context, true ) );
    76
    87        $style = <<<EOL
     
    4645    }
    4746
    48     public static function enqueue_select2() {
    49         $url = cc_url();
    50         wp_enqueue_style( 'select2', $url .'resources/css/select2.css' );
    51         wp_enqueue_script( 'select2', $url . 'resources/js/select2.min.js' );
    52     }
    53 
    5447}
  • cart66-cloud/trunk/includes/admin/class-cc-admin.php

    r1815908 r2148723  
    1818        // Add the cart66 product insert media button to the editor
    1919        add_action( 'current_screen', array($this, 'add_media_button_to_editor' ) );
     20       
     21        // Initialize the choices dropdowns
     22        add_action( 'current_screen', array( CC_Scripts, 'enqueue_choices' ) );
    2023
    2124        // Check for cart66 theme support
     
    9396            add_action('media_buttons', array('CC_Admin_Media_Button', 'add_media_button'));
    9497            add_action('admin_footer',  array('CC_Admin_Media_Button', 'add_media_button_popup'));
    95             add_action('admin_enqueue_scripts', array('CC_Admin_Media_Button', 'enqueue_select2'));
    9698        }
    9799    }
  • cart66-cloud/trunk/readme.txt

    r2146461 r2148723  
    66Requires PHP: 7.0
    77Tested up to: 5.2.2
    8 Stable tag: 2.3.4
     8Stable tag: 2.3.5
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    139139== Changelog ==
    140140
     141= 2.3.5 =
     142- Update/Fix: Remove all references to the select2 library, which was causing issues with some themes and plugins.
     143
    141144= 2.3.4 =
    142145- Fix: Yet another fix related to product post types and their associations with product SKUs in the cloud.  If more than 1 product post type was associated with the same product SKU in the cloud, the Refresh Product Info process would only update the first one.  This fix makes it so all of them get updated as they should.
  • cart66-cloud/trunk/resources/js/cart66-review.js

    r1815908 r2148723  
    11jQuery(document).ready(function($) {
    2 
    3   $('#cc-product-review-form').on('submit', function(e) {
     2  $("#cc-product-review-form").on("submit", function(e) {
    43    e.preventDefault();
    5     $('#cc-review-processing').show();
     4    $("#cc-review-processing").show();
    65    var data = $(this).serialize();
    76
    87    $.ajax({
    9       type: 'POST',
     8      type: "POST",
    109      url: cc_review.ajax_url,
    1110      data: data,
    12       dataType: 'html',
    13       success: function( result ) {
    14         $('#cc-product-review-failed').hide();
    15         $('#cc-product-review-received').show( "slow" );
    16         $('#cc-review-processing').hide();
    17         $('#cc-product-review-form')[0].reset();
     11      dataType: "html",
     12      success: function(result) {
     13        $("#cc-product-review-failed").hide();
     14        $("#cc-product-review-received").show("slow");
     15        $("#cc-review-processing").hide();
     16        $("#cc-product-review-form")[0].reset();
    1817      },
    19       error: function( ) {
    20         $('#cc-product-review-failed').show( "slow" );
    21         $('#cc-review-processing').hide();
     18      error: function() {
     19        $("#cc-product-review-failed").show("slow");
     20        $("#cc-review-processing").hide();
    2221      }
    2322    });
    24 
    2523  });
    26 
    2724});
  • cart66-cloud/trunk/views/admin/html-product-meta-box.php

    r2108304 r2148723  
    1010
    1111<style type="text/css">
    12     .choices .choices__inner {
     12    .c66-choices .choices__inner {
    1313        min-height: auto;
    1414        padding-right: 0;
     
    1616    }
    1717
    18     .choices .choices__list--single {
     18    .c66-choices .choices__list--single {
    1919        width: 90%;
    2020    }
    2121
    22     .choices .choices__item--selectable {
     22    .c66-choices .choices__item--selectable {
    2323        width: 90%;
    2424    }
    2525
    26     .choices[data-type*=select-one]:after {
     26    .c66-choices[data-type*=select-one]:after {
    2727        right: 35px;
    2828    }
    2929
    30     .choices .choices__list--dropdown {
     30    .c66-choices .choices__list--dropdown {
    3131        width: 93%;
    3232    }
     
    3434
    3535<div class="cc_meta_box_option">
    36     <select name="_cc_product_sku" id="_cc_product_sku" class="choices">
     36    <select name="_cc_product_sku" id="_cc_product_sku" class="c66-choices">
    3737        <option placeholder value="">Choose Product</option>
    3838        <?php foreach ($cc_products as $cc_product): ?>
     
    6060    </select>
    6161</div>
    62 
    63 <script>
    64     $(document).ready(function() {
    65         var choices = new Choices($(".choices")[0], {
    66         });
    67     });
    68 </script>
  • cart66-cloud/trunk/views/html-editor-pop-up.php

    r2113688 r2148723  
    1 <style type="text/css">
    2     .select2-drop-mask {
    3         z-index: 2000001;
    4     }
    5     .select2-drop {
    6         z-index: 2000002;
    7     }
    8 </style>
    9 
    101<style type="text/css">
    112    .choices .choices__inner {
     
    6859                            <th scope="row"><label for="cc_product_sku">Products</label></th>
    6960                            <td>
    70                                 <select name="cc_product_sku" id="cc_product_sku" class="choices">
     61                                <select name="cc_product_sku" id="cc_product_sku" class="c66-choices">
    7162                                    <option placeholder value="">Choose Product</option>
    7263                                    <?php foreach ($cc_products as $cc_product): ?>
     
    118109    </div>
    119110</div>
    120 
    121 <script>
    122     $(document).ready(function() {
    123         var choices = new Choices($(".choices")[0], {
    124         });
    125     });
    126 </script>
  • cart66-cloud/trunk/views/html-review-pop-up.php

    r1815908 r2148723  
    1 <style type="text/css">
    2     .select2-drop-mask {
    3         z-index: 2000001;
    4     }
    5     .select2-drop {
    6         z-index: 2000002;
    7     }
    8 </style>
    9 
    101<script type="text/javascript">
    112    function cc_insert_review_shortcode(){
    12         var product_info = JSON.parse(jQuery('#cc_product_id_review').val());
     3        var product_sku = jQuery('#cc_product_sku_review').val();
    134        var display_type = jQuery("#display_type_review").val();
    145
    15         if(product_info.length == 0 || product_info == "0" || product_info == ""){
     6        if(product_sku.length == 0 || product_sku == "0" || product_sku == ""){
    167            alert("<?php _e("Please select a product", "cart66") ?>");
    178            return;
    189        }
    19         console.log(product_info);
     10        console.log(product_sku);
    2011
    2112        if ( display_type == 'display' ) {
    22             window.send_to_editor("[cc_product_reviews sku=\"" + product_info.sku + "\"]");
     13            window.send_to_editor("[cc_product_reviews sku=\"" + product_sku + "\"]");
    2314        }
    2415        else {
    25             window.send_to_editor("[cc_product_review_form sku=\"" + product_info.sku + "\"]");
     16            window.send_to_editor("[cc_product_review_form sku=\"" + product_sku + "\"]");
    2617        }
    2718    }
     19</script>
    2820
    29     jQuery(document).ready(function($) {
    30         $('#cc_product_id_review').select2({
    31             width: '100%',
    32             minimumInputLength: 2,
    33             allowClear: true,
    34             ajax: {
    35                 url: ajaxurl,
    36                 dataType: 'json',
    37                 data: function (term, page) {
    38                     return {
    39                         action: 'cc_ajax_product_search',
    40                         search: term
    41                     };
    42                 },
    43                 results: function (data, page) {
    44                   return { results: data };
    45                 }
    46             }
    47         });
    48     });
    49 </script>
     21<?php
     22    $cloud_product = new CC_Cloud_Product();
     23    $cc_products = $cloud_product->get_products();
     24?>
    5025
    5126<div id="cc_review_pop_up" style="display:none;">
     
    6136                    <tbody>
    6237                        <tr valign="top">
    63                             <th scope="row"><label for="cc_product_id_review">Product</label></th>
     38                            <th scope="row"><label for="cc_product_sku_review">Product</label></th>
    6439                            <td>
    65                                 <input type="hidden" name="cc_product_id_review" id="cc_product_id_review" value="" />
     40                                <select name="cc_product_sku_review" id="cc_product_sku_review" class="c66-choices">
     41                                    <option placeholder value="">Choose Product</option>
     42                                    <?php foreach ($cc_products as $cc_product): ?>
     43                                        <option value="<?php echo $cc_product["sku"] ?>">
     44                                            <?php echo $cc_product["name"] ?>
     45                                        </option>
     46                                    <?php endforeach ?>
     47                                </select>
    6648                            </td>
    6749                        </tr>
Note: See TracChangeset for help on using the changeset viewer.