Guest User

Untitled

a guest
May 7th, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.10 KB | None | 0 0
  1. <?php
  2. global $wp_query;
  3. $image_width = get_option('product_image_width');
  4. $image_height = get_option('product_image_height');
  5. ?>
  6. <div id="grid_view_products_page_container">
  7. <?php wpsc_output_breadcrumbs(); ?>
  8.  
  9. <?php do_action('wpsc_top_of_products_page'); // Plugin hook for adding things to the top of the products page, like the live search ?>
  10.  
  11. <?php if(wpsc_display_categories()): ?>
  12. <?php if(get_option('wpsc_category_grid_view') == 1) :?>
  13. <div class="wpsc_categories wpsc_category_grid group">
  14. <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> 1)); ?>
  15. <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item <?php wpsc_print_category_classes_section(); ?>" title="<?php wpsc_print_category_name();?>">
  16. <?php wpsc_print_category_image(148, 148); ?>
  17. <?php wpsc_print_category_name();?>
  18. </a>
  19. <?php wpsc_print_subcategory("", ""); ?>
  20. <?php wpsc_end_category_query(); ?>
  21.  
  22. </div><!--close wpsc_categories-->
  23. <?php else:?>
  24. <ul class="wpsc_categories">
  25. <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
  26. <li>
  27. <?php wpsc_print_category_image(32, 32); ?>
  28.  
  29. <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_link <?php wpsc_print_category_classes_section(); ?>"><?php wpsc_print_category_name();?></a>
  30. <?php if(get_option('wpsc_category_description')) :?>
  31. <?php wpsc_print_category_description("<div class='wpsc_subcategory'>", "</div>"); ?>
  32. <?php endif;?>
  33.  
  34. <?php wpsc_print_subcategory("<ul>", "</ul>"); ?>
  35. </li>
  36. <?php wpsc_end_category_query(); ?>
  37. </ul>
  38. <?php endif; ?>
  39. <?php endif; ?>
  40.  
  41. <?php if(wpsc_display_products()): ?>
  42. <?php if(wpsc_is_in_category()) : ?>
  43. <div class="wpsc_category_details">
  44. <?php if(get_option('show_category_thumbnails') && wpsc_category_image()) : ?>
  45. <img src="<?php echo wpsc_category_image(); ?>" alt="<?php echo wpsc_category_name(); ?>" title="<?php echo wpsc_category_name(); ?>" />
  46. <?php endif; ?>
  47.  
  48. <?php if(get_option('wpsc_category_description') && wpsc_category_description()) : ?>
  49. <?php echo wpsc_category_description(); ?>
  50. <?php endif; ?>
  51. </div><!--close wpsc_category_details-->
  52. <?php endif; ?>
  53.  
  54.  
  55. <?php if(wpsc_has_pages_top()) : ?>
  56. <div class="wpsc_page_numbers_top group">
  57. <?php wpsc_pagination(); ?>
  58. </div><!--close wpsc_page_numbers_top-->
  59. <?php endif; ?>
  60.  
  61.  
  62. <div class="product_grid_display group">
  63. <?php while (wpsc_have_products()) : wpsc_the_product(); ?>
  64. <div class="product_grid_item product_view_<?php echo wpsc_the_product_id(); ?>">
  65.  
  66. <?php if(wpsc_the_product_thumbnail()) :?>
  67. <div class="item_image">
  68. <a href="<?php echo wpsc_the_product_permalink(); ?>">
  69. <img style="width:<?php echo get_option('product_image_width'); ?>px;height:<?php echo get_option('product_image_height'); ?>px" class="product_image" id="product_image_<?php echo wpsc_the_product_id(); ?>" alt="<?php echo wpsc_the_product_title(); ?>" src="<?php echo wpsc_the_product_thumbnail(); ?>" />
  70. </a>
  71. </div><!--close imte_image-->
  72. <?php else: ?>
  73. <div class="item_no_image">
  74. <a href="<?php echo wpsc_the_product_permalink(); ?>">
  75. <img class="no-image" id="product_image_<?php echo wpsc_the_product_id(); ?>" alt="No Image" title="<?php echo wpsc_the_product_title(); ?>" src="<?php echo WPSC_CORE_THEME_URL; ?>wpsc-images/noimage.png" width="<?php echo get_option('product_image_width'); ?>" height="<?php echo get_option('product_image_height'); ?>" />
  76. </a>
  77. </div><!--close item_no_image-->
  78. <?php endif; ?>
  79.  
  80. <?php if(wpsc_product_on_special()) : ?><span class="sale"><?php _e('Sale', 'wpsc'); ?></span><?php endif; ?>
  81. <?php if(get_option('show_images_only') != 1): ?>
  82. <div class="grid_product_info">
  83. <h2 class="prodtitle"><a href="<?php echo wpsc_the_product_permalink(); ?>" title="<?php echo wpsc_the_product_title(); ?>"><?php echo wpsc_the_product_title(); ?></a></h2>
  84.  
  85. <?php if((wpsc_the_product_description() != '') && (get_option('display_description') == 1)): ?>
  86. <div class="grid_description"><?php echo wpsc_the_product_description(); ?></div>
  87. <?php endif; ?>
  88. <div class="price_container">
  89. <?php if(wpsc_product_on_special()) : ?>
  90. <p class="pricedisplay <?php echo wpsc_the_product_id(); ?>"><?php _e('Old Price', 'wpsc'); ?>:<span class="oldprice"><?php echo wpsc_product_normal_price(); ?></span></p>
  91. <?php endif; ?>
  92. <p class="pricedisplay <?php echo wpsc_the_product_id(); ?>"><?php _e('Price', 'wpsc'); ?>:<span id='product_price_<?php echo wpsc_the_product_id(); ?>' class="currentprice pricedisplay"><?php echo wpsc_the_product_price(); ?></span></p>
  93. <?php if(wpsc_show_pnp()) : ?>
  94. <p class="pricedisplay"><?php _e('Shipping', 'wpsc'); ?>:<span class="pp_price"><?php echo wpsc_product_postage_and_packaging(); ?></span></p>
  95. <?php endif; ?>
  96. </div><!--close price_container-->
  97. <?php if(get_option('display_moredetails') == 1) : ?>
  98. <a href="<?php echo wpsc_the_product_permalink(); ?>" class="more_details">More Details</a>
  99. <?php endif; ?>
  100. </div><!--close grid_product_info-->
  101. <div class="grid_more_info">
  102. <form class="product_form" enctype="multipart/form-data" action="<?php echo wpsc_this_page_url(); ?>" method="post" name="product_<?php echo wpsc_the_product_id(); ?>" id="product_<?php echo wpsc_the_product_id(); ?>" >
  103. <?php do_action ( 'wpsc_product_form_fields_begin' ); ?>
  104. <input type="hidden" value="add_to_cart" name="wpsc_ajax_action"/>
  105. <input type="hidden" value="<?php echo wpsc_the_product_id(); ?>" name="product_id"/>
  106.  
  107.  
  108. <?php if(get_option('display_variations') == 1) : ?>
  109. <?php /** the variation group HTML and loop */ ?>
  110. <?php if (wpsc_have_variation_groups()) : ?>
  111. <fieldset><legend><?php _e('Product Options', 'wpsc'); ?></legend>
  112. <div class="wpsc_variation_forms">
  113. <table>
  114. <?php while (wpsc_have_variation_groups()) : wpsc_the_variation_group(); ?>
  115. <tr><td class="col1"><label for="<?php echo wpsc_vargrp_form_id(); ?>"><?php echo wpsc_the_vargrp_name(); ?>:</label></td>
  116. <?php /** the variation HTML and loop */?>
  117. <td class="col2"><select class="wpsc_select_variation" name="variation[<?php echo wpsc_vargrp_id(); ?>]" id="<?php echo wpsc_vargrp_form_id(); ?>">
  118. <?php while (wpsc_have_variations()) : wpsc_the_variation(); ?>
  119. <option value="<?php echo wpsc_the_variation_id(); ?>" <?php echo wpsc_the_variation_out_of_stock(); ?>><?php echo wpsc_the_variation_name(); ?></option>
  120. <?php endwhile; ?>
  121. </select></td></tr>
  122. <?php endwhile; ?>
  123. </table>
  124. </div><!--close wpsc_variation_forms-->
  125. </fieldset>
  126. <?php /** the variation group HTML and loop ends here */?>
  127. <?php endif; ?>
  128. <?php endif ?>
  129. <?php if((get_option('display_addtocart') == 1) && (get_option('addtocart_or_buynow') !='1')) :?>
  130. <?php if(wpsc_product_has_stock()) : ?>
  131. <input type="submit" value="<?php _e('Add To Cart', 'wpsc'); ?>" name="Buy" class="wpsc_buy_button" id="product_<?php echo wpsc_the_product_id(); ?>_submit_button"/>
  132. <?php else : ?>
  133. <p class="soldout"><?php _e('Sorry, sold out!', 'wpsc'); ?></p>
  134. <?php endif ; ?>
  135. <?php endif; ?>
  136.  
  137.  
  138. <div class="wpsc_loading_animation">
  139. <img title="Loading" alt="Loading" src="<?php echo wpsc_loading_animation_url(); ?>" />
  140. <?php _e('Updating cart...', 'wpsc'); ?>
  141. </div><!--close wpsc_loading_animation-->
  142. <?php do_action ( 'wpsc_product_form_fields_end' ); ?>
  143. </form>
  144. </div><!--close grid_more_info-->
  145.  
  146. <?php if((get_option('display_addtocart') == 1) && (get_option('addtocart_or_buynow') == '1')) :?>
  147. <?php echo wpsc_buy_now_button(wpsc_the_product_id()); ?>
  148. <?php endif ; ?>
  149.  
  150. <?php endif; ?>
  151. </div><!--close product_grid_item-->
  152. <?php if((get_option('grid_number_per_row') > 0) && ((($wp_query->current_post +1) % get_option('grid_number_per_row')) == 0)) :?>
  153. <div class="grid_view_clearboth"></div>
  154. <?php endif ; ?>
  155.  
  156.  
  157.  
  158. <?php endwhile; ?>
  159.  
  160. <?php if(wpsc_product_count() == 0):?>
  161. <p><?php _e('There are no products in this group.', 'wpsc'); ?></p>
  162. <?php endif ; ?>
  163.  
  164.  
  165. </div><!--close product_grid_display-->
  166.  
  167. <?php if(wpsc_has_pages_bottom()) : ?>
  168. <div class="wpsc_page_numbers_bottom group">
  169. <?php wpsc_pagination(); ?>
  170. </div><!--close wpsc_page_numbers_bottom-->
  171. <?php endif; ?>
  172. <?php endif; ?>
  173.  
  174. <?php do_action( 'wpsc_theme_footer' ); ?>
  175.  
  176. </div><!--close grid_view_products_page_container-->
Advertisement
Add Comment
Please, Sign In to add comment