Changeset 357530
- Timestamp:
- 03/09/2011 03:49:32 AM (13 years ago)
- Location:
- wp-e-commerce/branches/3.8-development
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-e-commerce/branches/3.8-development/wpsc-includes/product-template.php
r356413 r357530 577 577 */ 578 578 function wpsc_category_transition() { 579 global $wpdb, $wp_query, $wpsc_query; 580 $current_category_id = null; 581 $previous_category_id = null; 582 $current_product_index = (int)$wp_query->current_post; 583 $previous_product_index = ((int)$wp_query->current_post - 1); 584 585 if ( $previous_product_index >= 0 && isset($wp_query->posts[$previous_product_index]->term_id)) 586 $previous_category_id = $wp_query->posts[$previous_product_index]->term_id; 587 else 588 $previous_category_id = 0; 589 590 if(isset($wp_query->post->term_id)) 591 $current_category_id = $wp_query->post->term_id; 592 if (( $current_category_id != $previous_category_id )&& $previous_category_id != null) 593 return true; 594 else 595 return false; 596 579 //removed because it was not working in 3.8 RC2 see first changest after 580 //http://plugins.trac.wordpress.org/changeset/357529/wp-e-commerce/ 581 return false; 582 597 583 } 598 584 /** -
wp-e-commerce/branches/3.8-development/wpsc-theme/wpsc-products_page.php
r343833 r357530 64 64 <?php /** start the product loop here */?> 65 65 <?php while (wpsc_have_products()) : wpsc_the_product(); ?> 66 67 68 <?php if(wpsc_category_transition()) :?> 69 <h3 class="wpsc_category_name"><?php echo wpsc_current_category_name(); ?></h3> 70 <?php endif; ?> 71 66 72 67 <div class="default_product_display product_view_<?php echo wpsc_the_product_id(); ?> <?php echo wpsc_category_class(); ?> group"> 73 68 <h2 class="prodtitle entry-title">
Note: See TracChangeset
for help on using the changeset viewer.