Changeset 2113688
- Timestamp:
- 06/27/2019 03:13:12 PM (7 years ago)
- Location:
- cart66-cloud/trunk
- Files:
-
- 3 edited
-
cart66-cloud.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
views/html-editor-pop-up.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cart66-cloud/trunk/cart66-cloud.php
r2108304 r2113688 4 4 Plugin URI: http://cart66.com 5 5 Description: Secure Ecommerce For WordPress. 6 Version: 2.3. 06 Version: 2.3.1 7 7 Author: Reality66 8 8 Author URI: http://www.reality66.com -
cart66-cloud/trunk/readme.txt
r2108304 r2113688 6 6 Requires PHP: 5.4 7 7 Tested up to: 5.2.1 8 Stable tag: 2.3. 08 Stable tag: 2.3.1 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 139 139 == Changelog == 140 140 141 = 2.3.1 = 142 - Fix: Issue with product selection when inserting shortcode into page from the 143 WordPress admin 144 141 145 = 2.3.0 = 142 146 - Fix: Issue with product catalog showing incorrect prices for products -
cart66-cloud/trunk/views/html-editor-pop-up.php
r1687253 r2113688 8 8 </style> 9 9 10 <style type="text/css"> 11 .choices .choices__inner { 12 min-height: auto; 13 padding-right: 0; 14 width: 90%; 15 } 16 17 .choices .choices__list--single { 18 width: 90%; 19 } 20 21 .choices .choices__item--selectable { 22 width: 90%; 23 } 24 25 .choices[data-type*=select-one]:after { 26 right: 35px; 27 } 28 29 .choices .choices__list--dropdown { 30 width: 93%; 31 } 32 </style> 33 10 34 <script type="text/javascript"> 11 35 function cc_insert_product_shortcode(){ 12 var product_ info = JSON.parse(jQuery('#cc_product_id').val());36 var product_sku = jQuery('#cc_product_sku').val(); 13 37 var display_type = jQuery("#display_type").val(); 14 38 var display_quantity = jQuery("#display_quantity").is(":checked") ? 'true' : 'false'; 15 39 var display_price = jQuery("#display_price").is(":checked") ? 'true' : 'false'; 16 40 17 if(product_ info.length == 0 || product_info == "0" || product_info== ""){41 if(product_sku.length == 0 || product_sku == "0" || product_sku == ""){ 18 42 alert("<?php _e("Please select a product", "cart66") ?>"); 19 43 return; 20 44 } 21 console.log(product_ info);22 window.send_to_editor("[cc_product sku=\"" + product_ info.sku + "\" display=\"" + display_type + "\" quantity=\"" + display_quantity + "\" price=\"" + display_price + "\"]");45 console.log(product_sku); 46 window.send_to_editor("[cc_product sku=\"" + product_sku + "\" display=\"" + display_type + "\" quantity=\"" + display_quantity + "\" price=\"" + display_price + "\"]"); 23 47 } 24 48 25 jQuery(document).ready(function($) {26 $('#cc_product_id').select2({27 width: '100%',28 minimumInputLength: 2,29 allowClear: true,30 ajax: {31 url: ajaxurl,32 dataType: 'json',33 data: function (term, page) {34 return {35 action: 'cc_ajax_product_search',36 search: term37 };38 },39 results: function (data, page) {40 return { results: data };41 }42 }43 });44 });45 49 </script> 50 51 <?php 52 $cloud_product = new CC_Cloud_Product(); 53 $cc_products = $cloud_product->get_products(); 54 ?> 46 55 47 56 <div id="cc_editor_pop_up" style="display:none;"> … … 57 66 <tbody> 58 67 <tr valign="top"> 59 <th scope="row"><label for="cc_product_ id">Products</label></th>68 <th scope="row"><label for="cc_product_sku">Products</label></th> 60 69 <td> 61 <input type="hidden" name="cc_product_id" id="cc_product_id" value="" /> 70 <select name="cc_product_sku" id="cc_product_sku" class="choices"> 71 <option placeholder value="">Choose Product</option> 72 <?php foreach ($cc_products as $cc_product): ?> 73 <option value="<?php echo $cc_product["sku"] ?>"> 74 <?php echo $cc_product["name"] ?> 75 </option> 76 <?php endforeach ?> 77 </select> 62 78 </td> 63 79 </tr> … … 102 118 </div> 103 119 </div> 120 121 <script> 122 $(document).ready(function() { 123 var choices = new Choices($(".choices")[0], { 124 }); 125 }); 126 </script>
Note: See TracChangeset
for help on using the changeset viewer.