Advertisement
Guest User

Content-Product.php

a guest
Mar 27th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.32 KB | None | 0 0
  1. <?php while (have_posts()) : the_post(); ?>
  2.    
  3.     <div class="product-media">
  4.         <!-- =================================== Product Viewer -->
  5.         <div class="cycle-slideshow product-media-viewer" data-cycle-fx="fade" data-cycle-timeout="0" data-cycle-pager="#no-template-pager" data-cycle-pager-template="">
  6.  
  7.             <?php $images = get_field('product_images'); ?>
  8.            
  9.             <!-- Product Viewer // Medium images-->
  10.             <?php
  11.                 if ($images) {
  12.  
  13.                     foreach ($images as $image) {
  14.                         $medium = $image['sizes']['medium'];
  15.                         $id = $image['id'];
  16.  
  17.                         echo '<img src="' . $medium . '" data-large="' . $large . '" data-id="' . $id . '" />';
  18.                     }
  19.  
  20.                 } else  {
  21.  
  22.                     if (has_post_thumbnail()) {
  23.                         echo get_the_post_thumbnail($post_id, 'medium');
  24.                     }
  25.  
  26.                 }
  27.                
  28.             ?>
  29.  
  30.         </div>
  31.        
  32.         <!-- Product Viewer // Thumbnails -->
  33.         <?php
  34.             if ($images) {
  35.                 echo '<div id=no-template-pager class="cycle-pager external">';
  36.  
  37.                     foreach ($images as $image) {
  38.                         $small = $image['sizes']['thumbnail'];
  39.                         $id = $image['id'];
  40.  
  41.  
  42.                         echo '<img src="' . $small . '" data-id="' . $id . '" />';
  43.                     }
  44.  
  45.                 echo '</div>';
  46.             }
  47.         ?>
  48.  
  49.  
  50.     </div>
  51.  
  52.     <!-- =================================== Product Viewer // Zoom Images -->
  53.     <div class="product-zoom-viewer">
  54.         <div class="pz-inner">
  55.             <span class="product-zoom-close">Close</span>
  56.             <div class="pz-slider">
  57.                 <?php
  58.  
  59.                     if ($images) {
  60.                         foreach ($images as $image) {
  61.                             $large = $image['sizes']['large'];
  62.                             $id = $image['id'];
  63.  
  64.  
  65.                             echo '<img src="' . $large . '" data-id="' . $id . '" />';
  66.                         }
  67.  
  68.                     } else  {
  69.  
  70.  
  71.  
  72.                     }
  73.                 ?> 
  74.             </div>
  75.             <a class="pz-pag pz-pag-prev" href=# id="zoom-prev">Previous</a>
  76.             <a class="pz-pag pz-pag-next" href=# id="zoom-next">Next</a>
  77.         </div>
  78.     </div>
  79.  
  80.     <!-- =================================== Product Info -->
  81.     <aside class="product-info">
  82.         <div class="product-info-inner">
  83.             <?php
  84.                 if(get_field('company'))    {
  85.                     echo '<span class="made-by">' . get_field('company') . '</span>';
  86.                 }
  87.             ?>
  88.  
  89.             <h3 class="pv-product-name">
  90.                 <?php
  91.                     mp_product_title($product_id, true, false, false, '', '', '');
  92.  
  93.                     // if (mp_product_price(false) != null || mp_product_price(false) != undefined || mp_product_price(false) != '') {
  94.                         echo ' - ';
  95.                     // }
  96.  
  97.                     mp_product_price(true, $post->ID, false);
  98.                 ?>
  99.             </h3>
  100.  
  101.             <div class="product-description">
  102.                 <?php the_content(); ?>
  103.             </div>
  104.  
  105.             <div class="product-actions">
  106.                 <?php mp_product_meta(true, 'single'); ?>
  107.             </div>
  108.  
  109.             <div class="product-social">
  110.                 <!-- AddThis Button BEGIN -->
  111.                 <div class="addthis_toolbox addthis_default_style">
  112.                 <a class="addthis_button_tweet"></a>
  113.                 <a class="addthis_button_pinterest_pinit" pi:pinit:layout="horizontal" pi:pinit:url="http://www.addthis.com/features/pinterest" pi:pinit:media="http://www.addthis.com/cms-content/images/features/pinterest-lg.png"></a>
  114.                 <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
  115.                 </div>
  116.                 <script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
  117.                 <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5127b14929060fb5"></script>
  118.                 <!-- AddThis Button END -->            
  119.             </div>
  120.         </div> 
  121.     </aside>
  122.  
  123.  
  124. <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement