Changeset 2041639
- Timestamp:
- 02/28/2019 04:23:22 PM (6 years ago)
- Location:
- rockon-woo-variations-table/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
rockon-woo-variations-table/trunk/readme.txt
r1830298 r2041639 3 3 Tags: woocommerce, variations, table, rockon, shortcode, vs 4 4 Requires at least: 3.6 5 Tested up to: 4.95 Tested up to: 5.1 6 6 Stable tag: 1.0 7 7 License: GPLv2 or later -
rockon-woo-variations-table/trunk/ron-woo-variations-table.php
r1833219 r2041639 22 22 define('RWVT_PLUGIN_NAME', plugin_basename(__FILE__)); 23 23 24 function ron_woo_variations_table( $atts ) { 25 24 function ron_woo_variations_table( $atts ) { 26 25 $v = shortcode_atts( array( 27 'id' 28 'thead' 29 'disabled' 30 'categories_exc' 26 'id' => '', 27 'thead' => '', 28 'disabled' => '', 29 'categories_exc' => '', 31 30 ), $atts ); 32 31 … … 37 36 38 37 function ron_woo_find_matching_product_variation( $product, $attributes ) { 39 40 38 foreach( $attributes as $key => $value ) { 41 39 if( strpos( $key, 'attribute_' ) === 0 ) { … … 59 57 add_action("wp_ajax_check_choosed_var", "check_choosed_var"); 60 58 add_action("wp_ajax_nopriv_check_choosed_var", "check_choosed_var"); 61 62 59 function check_choosed_var(){ 63 60 … … 85 82 86 83 echo $cart_slug; 87 88 84 die(); 89 90 85 } 91 86 … … 116 111 } 117 112 */ 118 $title = wc_attribute_label( $attribute['name'] ); 119 120 $data_array['att_title'][] = $title; 121 $data_array['product_id'][] = $product->id; 122 113 $title = wc_attribute_label($attribute['name']); 114 $data_array['att_title'][] = $title; 115 $data_array['product_id'][] = $product->id; 123 116 } 124 117 … … 127 120 $data .= '<thead><tr>'; 128 121 129 if(!empty($allsets['thead']) && sizeof($table_head) > 0){ 130 122 if(!empty($allsets['thead']) && sizeof($table_head) > 0){ 131 123 foreach($table_head as $th){ 132 124 $data .= '<th>'.$th.'</th>'; 133 } 134 135 } else { 136 137 $data .= '<th>Title</th>'; 138 125 } 126 } else { 127 $data .= '<th>Title</th>'; 139 128 foreach($data_array as $rok => $rov){ 140 129 … … 148 137 } 149 138 } 150 $data .= '<th>BASKET</th>'; 151 139 $data .= '<th>BASKET</th>'; 152 140 } 153 141 … … 286 274 } 287 275 }); 288 } 289 276 } 290 277 </script> 291 278 <?php } ?>
Note: See TracChangeset
for help on using the changeset viewer.