Changeset 357431
- Timestamp:
- 03/08/2011 10:04:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-e-commerce/branches/3.8-development/wpsc-admin/includes/updating-functions.php
r354335 r357431 372 372 // select the variation set associations 373 373 $variation_set_associations = $wpdb->get_col("SELECT `variation_id` FROM ".WPSC_TABLE_VARIATION_ASSOC." WHERE `associated_id` = '{$original_id}'"); 374 374 //echo '$variation_set_associations<pre>'.print_r($variation_set_associations,1).'</pre>'; 375 375 // select the variation associations if the count of variation sets is greater than zero 376 376 if(($original_id > 0) && (count($variation_set_associations) > 0)) { … … 380 380 continue; 381 381 } 382 382 383 383 foreach($variation_set_associations as $variation_set_id) { 384 384 $base_product_terms[] = wpsc_get_meta($variation_set_id, 'variation_set_id', 'wpsc_variation_set'); … … 415 415 416 416 // select all values this "product" is associated with, then loop through them, getting the term id of the variation using the value ID 417 $variation_associations = $wpdb->get_results("SELECT * FROM ".WPSC_TABLE_VARIATION_COMBINATIONS." WHERE `priceandstock_id` = '{$variation_item->id}'");418 foreach((array)$variation_associations as $association) {417 $variation_associations = $wpdb->get_results("SELECT * FROM ".WPSC_TABLE_VARIATION_COMBINATIONS." WHERE `priceandstock_id` = '{$variation_item->id}'"); 418 foreach((array)$variation_associations as $association) { 419 419 $variation_id = (int)wpsc_get_meta($association->value_id, 'variation_id', 'wpsc_variation'); 420 420 // discard any values that are null, as they break the selecting of the terms 421 if($variation_id > 0 ) {421 if($variation_id > 0) { 422 422 $variation_ids[] = $variation_id; 423 423 } … … 425 425 426 426 // if we have more than zero remaining terms, get the term data, then loop through it to convert it to a more useful set of arrays. 427 if(count($variation_ids) > 0 ) {427 if(count($variation_ids) > 0) { 428 428 $combination_terms = get_terms('wpsc-variation', array( 429 429 'hide_empty' => 0, … … 431 431 'orderby' => 'parent', 432 432 )); 433 433 434 foreach($combination_terms as $term) { 434 435 $term_data['ids'][] = $term->term_id;
Note: See TracChangeset
for help on using the changeset viewer.