Guest User

Untitled

a guest
Nov 24th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.91 KB | None | 0 0
  1. <?php get_header('shop'); ?>
  2. <?php get_sidebar('shop'); ?>
  3.  
  4.  
  5. <?php // if (function_exists('jigoshop_breadcrumb')) jigoshop_breadcrumb(); ?>
  6.  
  7. <?php if ( have_posts() ) while ( have_posts() ) : the_post();
  8.  
  9.     global $_product;
  10.    
  11.     $_product = &new jigoshop_product( $post->ID );
  12.    
  13.     if (!$_product->is_visible() && $post->post_parent > 0) : wp_safe_redirect(get_permalink($post->post_parent)); exit; endif;
  14.    
  15.     if (!$_product->is_visible()) : wp_safe_redirect(home_url()); exit; endif;
  16.    
  17.     jigoshop::show_messages();
  18.     ?>
  19.  
  20.         <div id="product-page">
  21.            
  22.             <?php if ($_product->is_on_sale()) echo '<span class="sale_msg">Sale!</span>'; ?>
  23.            
  24.             <?php jigoshop_get_template( 'product/images.php' ); ?>
  25.            
  26.             <div class="summary">
  27.                
  28.                
  29.  
  30.                 <h1 class="product_title entry-title"><?php the_title(); ?></h1>
  31.                
  32.                 <div class="description">
  33.                 <?php jigoshop_get_template( 'product/description.php' ); ?>
  34.                 </div>
  35.                
  36.                 <p class="price"><?php echo $_product->get_price_html(); ?></p>
  37.  
  38.                 <?php
  39.                     if ( $_product->is_type('simple') ) jigoshop_get_template( 'product/simple/add-to-cart.php' );
  40.                     elseif ( $_product->is_type('downloadable') ) jigoshop_get_template( 'product/downloadable/add-to-cart.php' );
  41.                     elseif ( $_product->is_type('grouped') ) jigoshop_get_template( 'product/grouped/add-to-cart.php' );
  42.                     elseif ( $_product->is_type('virtual') ) jigoshop_get_template( 'product/virtual/add-to-cart.php' );
  43.                 ?>
  44.                
  45.                 <div class="category"><?php echo $_product->get_categories( ', ', '< Back to ', ''); ?></div>
  46.                
  47.                
  48.             </div>
  49.            
  50.            
  51.                
  52.             <?php do_action('after_product'); ?>
  53.            
  54.             <?php //jigoshop_get_template( 'product/related.php' ); ?>
  55.            
  56.         <div id="nextprev">
  57.             <div id="next"><? next_post('%', 'next', 'no');?></div>
  58.             <div id="prev"><? previous_post('%', 'last', 'no');?></div>
  59.         </div>
  60.        
  61.         </div>
  62.  
  63. <?php endwhile; ?>
  64.  
  65. <?php get_footer('shop'); ?>
Add Comment
Please, Sign In to add comment