tribulant

Product View

Aug 19th, 2011
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 44.31 KB | None | 0 0
  1. <div class="<?php echo $this -> pre; ?>product">
  2.     <?php if (!is_feed() && current_user_can('edit_plugins')) : ?>
  3.         <p><small>
  4.             <?php echo $wpcoHtml -> link(__('Edit Product', $this -> plugin_name), $wpcoHtml -> product_save_url($product -> id)); ?> |
  5.             <?php echo $wpcoHtml -> link(__('Delete Product', $this -> plugin_name), $wpcoHtml -> product_delete_url($product -> id), array('onclick' => "if (!confirm('" . __('Are you sure you wish to remove this product?', $this -> plugin_name) . "')) { return false; }")); ?>
  6.         </small></p>
  7.     <?php endif; ?>
  8.    
  9.     <?php $this -> render('favorites' . DS . 'link', array('product' => $product), true, 'default'); ?>
  10.  
  11.     <div class="<?php echo $this -> pre; ?>images">
  12.         <?php /*
  13.         <?php if ($this -> get_option('cropthumb') == "Y") : ?>
  14.             <?php $imagefull = ABSPATH . 'wp-content' . DS . 'uploads' . DS . $this -> plugin_name . DS . 'images' . DS . $wpcoHtml -> thumb_name($product -> image -> name); ?>
  15.             <?php if (file_exists($imagefull) && filesize($imagefull) > 0) : ?>
  16.                 <div><?php echo $wpcoHtml -> link($wpcoHtml -> image($wpcoHtml -> thumb_name($product -> image -> name), false, $product -> image -> name), $wpcoHtml -> image_url($product -> image -> name), array('class' => 'thickbox', 'rel' => $wpcoHtml -> sanitize($product -> title) . '-images', 'title' => $product -> title)); ?></div>
  17.                 <small><?php echo $captions['product']['clicktoenlarge']; ?></small>
  18.             <?php else : ?>
  19.                 <div><?php echo $wpcoHtml -> image($wpcoHtml -> thumb_name($product -> image -> name), false, $product -> image -> name); ?></div>
  20.             <?php endif; ?>
  21.         <?php else : ?>*/ ?>
  22.             <!-- this part shows the full product image -->
  23.             <div><?php echo $wpcoHtml -> image($product -> image -> name, false, $product -> image -> name); ?></div>
  24.         <?php /*<?php endif; ?>*/ ?>
  25.        
  26.         <?php if (!empty($product -> images)) : ?>
  27.             <?php if ($this -> get_option('gallerytab') == "N" || ($this -> get_option('gallerytab') == "Y" && empty($product -> contents))) : ?>
  28.                 <div class="<?php echo $this -> pre; ?>imglist">                       
  29.                     <ul>
  30.                         <?php $imgcount = 1; ?>
  31.                         <?php foreach ($product -> images as $image) : ?>
  32.                             <?php if ($imgcount <= $this -> get_option('pimgcount')) : ?>
  33.                                 <li><?php echo $wpcoHtml -> link($wpcoHtml -> image($wpcoHtml -> thumb_name($image -> filename, 'small'), false, $image -> filename), $wpcoHtml -> image_url($image -> filename), array('class' => 'thickbox', 'rel' => $wpcoHtml -> sanitize($product -> title) . '-images', 'title' => $image -> title)); ?></li>
  34.                             <?php else : ?>
  35.                                 <?php break; ?>
  36.                             <?php endif; ?>
  37.                             <?php $imgcount++; ?>
  38.                         <?php endforeach; ?>
  39.                     </ul>
  40.                     <br class="<?php echo $this -> pre; ?>cleaner" />
  41.                    
  42.                     <?php if (count($product -> images) > $this -> get_option('pimgcount')) : ?>
  43.                         <div style="margin:0 0 10px 0;"><?php echo $wpcoHtml -> link(__('View all images', $thsi -> plugin_name) . ' &raquo;', '?' . $this -> pre . 'method=images', array()); ?></div>
  44.                     <?php endif; ?>
  45.                 </div>
  46.             <?php endif; ?>
  47.         <?php endif; ?>
  48.     </div>
  49.    
  50.     <?php if ($this -> get_option('product_descriptionposition') == "above") : ?>
  51.         <?php if (empty($product -> contents) || !is_array($product -> contents)) : ?>
  52.             <?php echo wpautop(do_shortcode($product -> description)); ?>
  53.         <?php endif; ?>
  54.     <?php endif; ?>
  55.    
  56.     <?php if ($this -> get_option('showcase') == "N" && $product -> showcase == "N") : ?>
  57.         <!-- NOT SHOWCASE -->
  58.    
  59.         <!-- Price -->
  60.         <div class="pricewrap">
  61.             <?php if ($product -> price_type == "tiers") : ?>
  62.                 <?php $price = @unserialize($product -> price); ?>
  63.                 <?php echo (!empty($product -> sprice) && $product -> sprice != "0.00") ? '<span class="sprice"><strike>' . $wpcoHtml -> currency_price($product -> sprice) . '</strike></span>' : ''; ?>
  64.                 <span id="productprice<?php echo $product -> id; ?>" class="price"><?php echo (!empty($product -> price_type) && $product -> price_type == "tiers" && $product -> price_display != "high") ? __('From', $this -> plugin_name) . ' ' : ''; ?><?php echo $wpcoHtml -> currency_price($Product -> unit_price($product -> id, 999999, null, false, false, true)); ?></span>
  65.             <?php elseif ($product -> price_type == "donate") : ?>
  66.                 <span id="productprice<?php echo $product -> id; ?>" class="price">&nbsp;</span>
  67.                 <?php if (!empty($product -> donate_caption)) : ?>
  68.                     <p class="donatecaption"><?php echo stripslashes($product -> donate_caption); ?></p>
  69.                 <?php endif; ?>
  70.             <?php elseif ($product -> price_type == "square" && !empty($product -> square_price)) : ?>
  71.                 <span id="productprice<?php echo $product -> id; ?>" class="price">&nbsp;</span>
  72.                 <?php if (!empty($product -> square_price_text)) : ?>
  73.                     <p class="squareprice"><small><strong><?php echo stripslashes($product -> square_price_text); ?></strong></small></p>
  74.                 <?php else : ?>
  75.                     <p class="squareprice"><small><strong><?php echo $wpcoHtml -> currency_price($product -> square_price, true, true); ?></strong> <?php _e('per square', $this -> plugin_name); ?> <?php echo $product -> lengthmeasurement; ?></small></p>
  76.                 <?php endif; ?>
  77.             <?php else : ?>
  78.                 <?php echo (!empty($product -> sprice) && $product -> sprice != "0.00") ? '<span class="sprice"><strike>' . $wpcoHtml -> currency_price($product -> sprice) . '</strike></span>' : ''; ?>
  79.                 <?php if (!empty($product -> price) && $product -> price != "0.00") : ?>
  80.                     <span id="productprice<?php echo $product -> id; ?>" class="price productprice"><?php echo $wpcoHtml -> currency_price($product -> price); ?></span>
  81.                 <?php else : ?>
  82.                     <span id="productprice<?php echo $product -> id; ?>" class="price productprice"><?php echo stripslashes($this -> get_option('product_zerotext')); ?></span>
  83.                 <?php endif; ?>
  84.             <?php endif; ?>
  85.         </div>
  86.    
  87.         <?php if ($product -> price_type == "tiers") : ?>                  
  88.             <fieldset class="<?php echo $this -> pre; ?>">
  89.                 <legend><?php _e('Your Price', $this -> plugin_name); ?></legend>
  90.                     <table class="<?php echo $this -> pre; ?>">
  91.                         <tbody>
  92.                             <?php $t = 1; ?>
  93.                             <?php $class = 'erow'; ?>
  94.                             <?php foreach ($price as $tier) : ?>
  95.                             <?php $tierstring = ($t == count($price)) ? $tier['min'] . ' ' . __('or more', $this -> plugin_name) : $tier['min'] . ' ' . __('to', $this -> plugin_name) . ' ' . $tier['max'] ; ?>
  96.                             <tr class="<?php echo $class = (empty($class) || $class == "erow") ? 'arow' : 'erow'; ?>">
  97.                                 <td><?php echo $tierstring; ?></td>
  98.                                 <td>=</td>
  99.                                 <td><b><?php echo $wpcoHtml -> currency_price($tier['price']); ?></b> <?php _e('per unit', $this -> plugin_name); ?></td>
  100.                             </tr>
  101.                             <?php $t++; ?>
  102.                             <?php endforeach; ?>
  103.                         </tbody>
  104.                     </table>
  105.             </fieldset>
  106.         <?php endif; ?>
  107.        
  108.         <?php if (empty($product -> oos) || $product -> oos != true) : ?>  
  109.             <?php echo $wpcoHtml -> addtocart_action($product -> id, false); ?>
  110.                 <?php echo $wpcoForm -> hidden('Item.product_id', array('value' => $product -> id)); ?>
  111.                
  112.                 <?php global $user_ID; ?>
  113.                 <?php echo $wpcoForm -> hidden('Item.user_id', array('value' => $user_ID)); ?> 
  114.                
  115.                 <?php if ($product -> price_type == "square" && !empty($product -> square_price)) : ?>
  116.                     <!-- Price per square meter -->
  117.                     <?php echo $wpcoForm -> text('Item.width', array('width' => "45px", 'onkeyup' => "wpco_updateproductprice('" . $product -> id . "', '" . __('Calculating...', $this -> plugin_name) . "');")); ?><?php echo $product -> lengthmeasurement; ?> <?php _e('X', $this -> plugin_name); ?>
  118.                     <?php echo $wpcoForm -> text('Item.length', array('width' => "45px", 'onkeyup' => "wpco_updateproductprice('" . $product -> id . "', '" . __('Calculating...', $this -> plugin_name) . "');")); ?><?php echo $product -> lengthmeasurement; ?>
  119.                     <?php echo $wpcoForm -> hidden('Item.count', array('value' => 1)); ?>
  120.                 <?php endif; ?>            
  121.        
  122.                 <?php if ($this -> get_option('fieldsintab') == "N" || ($this -> get_option('fieldsintab') == "Y" && empty($product -> contents))) : ?>    
  123.                     <?php if (!empty($product -> styles) && !empty($product -> options)) : ?>
  124.                         <?php foreach ($product -> styles as $style_id) : ?>
  125.                             <?php echo $this -> render_style($style_id, $product -> options[$style_id], true, $product -> id); ?>
  126.                         <?php endforeach; ?>
  127.                     <?php endif; ?>
  128.  
  129.                     <?php if (!empty($product -> cfields)) : ?>
  130.                         <?php foreach ($product -> cfields as $field_id) : ?>
  131.                             <?php if (!empty($field_id)) : ?>
  132.                                 <?php $this -> render_field($field_id, true, false, $product -> id); ?>
  133.                             <?php endif; ?>
  134.                         <?php endforeach; ?>
  135.                     <?php endif; ?>
  136.                 <?php endif; ?>
  137.    
  138.                 <?php if ($this -> get_option('howmany') == "Y" && $product -> price_type != "donate" && $product -> price_type != "square") : ?>
  139.                     <div class="<?php echo $this -> pre; ?>howmany">                       
  140.                         <b><?php _e('How many', "wp-checkout"); ?> <?php echo $product -> measurement; ?><?php _e('?', "wp-checkout"); ?></b>
  141.                         <?php $cvaluet = (empty($product -> min_order)) ? '1' : $product -> min_order; ?>
  142.                         <?php $cvalue = (empty($_POST['Item']['count'])) ? $cvaluet : $_POST['Item']['count']; ?>
  143.                         <?php echo $wpcoForm -> text('Item.count', array('value' => $cvalue, 'width' => '45px')); ?>
  144.                     </div>
  145.                 <?php elseif ($product -> price_type == "donate") : ?>
  146.                     <?php echo $wpcoHtml -> currency_html('<input type="text" name="Item[donate_price]" value="' . $wpcoHtml -> field_value('Item.donate_price') . '" id="Item.donate_price" class="donateprice" onkeyup="wpco_updateproductprice(\'' . $product -> id . '\', \'' . __('Calculating...', $this -> plugin_name) . '\');" />'); ?>
  147.                
  148.                     <!-- Donation Product -->
  149.                    
  150.                    
  151.                     <?php /*<?php echo $wpcoForm -> text('Item.donate_price', array('onkeyup' => "jQuery(this).val(); wpco_updateproductprice('" . $product_id . "');")); ?>*/ ?>
  152.                    
  153.                 <?php else : ?>
  154.                     <?php /*hidden field for quantity as 1*/ ?>
  155.                     <?php echo $wpcoForm -> hidden('Item.count', array('value' => 1)); ?>
  156.                 <?php endif; ?>
  157.                
  158.                 <span class="wpcobuttonwrap">
  159.                     <?php if ($this -> get_option('buynow') == "Y" || (!empty($product -> buynow) && $product -> buynow == "Y")) : ?>
  160.                         <!-- BEG Buy Now -->
  161.                         <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
  162.                             <?php if (!empty($product -> affiliate) && $product -> affiliate == "Y") : ?>
  163.                                 <span id="submit<?php echo $product -> id; ?>"><a class="<?php echo $this -> pre; ?>buylink" target="_<?php echo $product -> affiliatewindow; ?>" href="<?php echo $wpcoHtml -> retainquery($this -> pre . 'method=affiliate&amp;id=' . $product -> id); ?>" title="<?php echo $product -> title; ?>"><?php echo $product -> buttontext; ?></a>
  164.                             <?php else : ?>
  165.                                 <span id="submit<?php echo $product -> id; ?>"><a href="#void" title="<?php _e('Buy this product now', $this -> plugin_name); ?>" onclick="jQuery('#addtocart<?php echo $product -> id; ?>').submit();" class="<?php echo $this -> pre; ?>buylink"><?php echo $product -> buttontext; ?></a></span>
  166.                             <?php endif; ?>
  167.                         <?php else : ?>
  168.                             <span id="submit<?php echo $product -> id; ?>"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
  169.                         <?php endif; ?>
  170.                     <?php elseif (!empty($product -> affiliate) && $product -> affiliate == "Y" && !empty($product -> affiliateurl)) : ?>
  171.                         <!-- BEG Affiliate Product -->
  172.                         <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
  173.                             <span class="productsubmit productsubmittext affiliateproductsubmit" id="submit<?php echo $product -> id; ?>"><a href="<?php echo $product -> affiliateurl; ?>" <?php echo (!empty($product -> affiliatewindow) && $product -> affiliatewindow == "blank") ? 'target="_blank"' : 'target="_self"'; ?> title="<?php echo $product -> buttontext; ?>" class="<?php echo $this -> pre; ?>buylink"><?php echo $product -> buttontext; ?></a></span>
  174.                         <?php else : ?>
  175.                             <span class="productsubmit productsubmitbutton affiliateproductsubmit" id="submit<?php echo $product -> id; ?>"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
  176.                         <?php endif; ?>
  177.                     <?php elseif (false && !empty($product -> price_type) && $product -> price_type == "donate") : ?>
  178.                         <!-- BEG Donation Product -->
  179.                        
  180.                         <!-- END DOnation Product -->
  181.                     <?php else : ?>
  182.                         <!-- BEG Normal Product -->
  183.                         <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
  184.                             <?php if (!empty($product -> affiliate) && $product -> affiliate == "Y") : ?>
  185.                                 <span id="submit<?php echo $product -> id; ?>"><a href="<?php echo $wpcoHtml -> retainquery($this -> pre . 'method=affiliate&amp;id=' . $product -> id); ?>" class="<?php echo $this -> pre; ?>buylink" target="_<?php echo $product -> affiliatewindow; ?>" title="<?php echo $product -> title; ?>"><?php echo $product -> buttontext; ?></a>
  186.                             <?php else : ?>
  187.                                 <?php if ($this -> get_option('cart_addajax') == "Y") : ?>
  188.                                     <span class="productsubmit productsubmittext" id="submit<?php echo $product -> id; ?>"><a href="#void" title="<?php _e('Add this product to your shopping cart', $this -> plugin_name); ?>" onclick="wpco_addtocart(jQuery('#addtocart<?php echo $product -> id; ?>'), '<?php echo $product -> id; ?>', '<?php echo $this -> widget_active('cart'); ?>'); return false;" class="<?php echo $this -> pre; ?>buylink"><?php echo $product -> buttontext; ?></a></span><br />
  189.                                 <?php else : ?>
  190.                                     <span class="productsubmit productsubmittext" id="submit<?php echo $product -> id; ?>"><a href="" onclick="jQuery('#addtocart<?php echo $product -> id; ?>').submit(); return false;" class="<?php echo $this -> pre; ?>buylink" title="<?php _e('Add this product to your shopping cart', $this -> plugin_name); ?>"><?php echo $product -> buttontext; ?></a></span>
  191.                                 <?php endif; ?>
  192.                             <?php endif; ?>
  193.                         <?php else : ?>
  194.                             <?php /*<span id="submit<?php echo $product -> id; ?>" style="display:block;"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>*/ ?>
  195.                             <?php if ($this -> get_option('cart_addajax') == "Y") : ?>
  196.                                 <span id="submit<?php echo $product -> id; ?>" class="productsubmit productsubmitbutton"><input type="button" name="submit" value="<?php echo $product -> buttontext; ?>" onclick="wpco_addtocart(jQuery('#addtocart<?php echo $product -> id; ?>'), '<?php echo $product -> id; ?>', '<?php echo $this -> widget_active('cart'); ?>'); return false;" /></span>
  197.                             <?php else : ?>
  198.                                 <span id="submit<?php echo $product -> id; ?>" class="productsubmit productsubmitbutton"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
  199.                             <?php endif; ?>
  200.                         <?php endif; ?>
  201.                         <span class="<?php echo $this -> pre; ?>loading" id="loading<?php echo $product -> id; ?>" style="display:none; z-index:99;"><img src="<?php echo $this -> url(); ?>/images/loading.gif" alt="loading" /> <?php _e('Adding Item...', $this -> plugin_name); ?></span>
  202.                         <span class="<?php echo $this -> pre; ?>added" style="display:none;" id="added<?php echo $product -> id; ?>"><img src="<?php echo $this -> url(); ?>/images/accept.png" /> <?php _e('Product has been added', $this -> plugin_name); ?></span>
  203.                     <?php endif; ?>
  204.                 </span>
  205.                
  206.                 <?php if ($product -> inhonorof == "Y") : ?>
  207.                     <?php if (!empty($product -> inhonorof) && $product -> inhonorof == "Y") : ?>
  208.                         <?php if ($product -> inhonorofreq == "N") : ?>
  209.                             <div class="<?php echo $this -> pre; ?>inhonorofcheckbox">
  210.                                 <label><input onclick="if (this.checked == true) { jQuery('#<?php echo $this -> pre; ?>inhonorof<?php echo $product -> id; ?>').show(); } else { jQuery('#<?php echo $this -> pre; ?>inhonorof<?php echo $product -> id; ?>').hide(); }" type="checkbox" name="inhonorofreq" value="1" id="inhonorofreq<?php echo $product -> id; ?>" /> <?php _e('Specify beneficiary details?', $this -> plugin_name); ?></label>
  211.                             </div>
  212.                         <?php endif; ?>
  213.                     <?php endif; ?>
  214.                
  215.                     <div style="display:<?php echo (!empty($product -> inhonorofreq) && $product -> inhonorofreq == "Y") ? 'block' : 'none'; ?>;" class="<?php echo $this -> pre; ?>inhonorof" id="<?php echo $this -> pre; ?>inhonorof<?php echo $product -> id; ?>">
  216.                         <fieldset>
  217.                             <legend><?php _e('In Honor Of...', $this -> plugin_name); ?></legend>
  218.                            
  219.                             <table>
  220.                                 <tbody>
  221.                                     <tr>
  222.                                         <td><?php _e('Your Name:', $this -> plugin_name); ?></td>
  223.                                         <td><?php echo $wpcoForm -> text('Item.iof_name'); ?></td>
  224.                                     </tr>
  225.                                     <tr>
  226.                                         <td><?php _e('Beneficiary Name', $this -> plugin_name); ?></td>
  227.                                         <td><?php echo $wpcoForm -> text('Item.iof_benname'); ?></td>
  228.                                     </tr>
  229.                                     <tr>
  230.                                         <td><?php _e('Beneficiary Email', $this -> plugin_name); ?></td>
  231.                                         <td><?php echo $wpcoForm -> text('Item.iof_benemail'); ?></td>
  232.                                     </tr>
  233.                                 </tbody>
  234.                             </table>
  235.                         </fieldset>
  236.                     </div>
  237.                 <?php endif; ?>
  238.                
  239.                 <?php if ($this -> get_option('fieldsintab') == "Y" && (!empty($product -> styles) || !empty($product -> cfields)) && !empty($product -> contents) && (is_array($product -> contents) || is_object($product -> contents))) : ?>
  240.                     <?php if ($this -> get_option('optionslinktb') == "B") : ?>
  241.                         <p class="<?php echo $this -> pre; ?>optionslink"><small><?php echo $wpcoHtml -> link(__('Choose product options/variations &raquo;', $this -> plugin_name), "#void", array('class' => "product-options-link")); ?></small></p>
  242.                     <?php endif; ?>
  243.                 <?php endif; ?>
  244.             <?php else : ?>
  245.                 <p class="<?php echo $this -> pre; ?>oos"><?php echo $captions['product']['oos']; ?></p>
  246.             <?php endif; ?>
  247.                
  248.             <p class="<?php echo $this -> pre; ?>error" id="message<?php echo $product -> id; ?>" style="display:none;"></p>
  249.            
  250.             <?php if (!empty($product -> contents) && (is_array($product -> contents) || is_object($product -> contents))) : ?>
  251.                 <?php $tabscount = 1; ?>
  252.                 <?php $tabscount2 = 1; ?>
  253.                 <div style="clear:both; display:block; height:1px; width:100%;"></div>
  254.            
  255.                 <div id="tabs<?php echo $product -> id; ?>">
  256.                     <!-- BEG Tabs Menu -->
  257.                     <ul>
  258.                         <li><a href="#tabs<?php echo $product -> id; ?>-1"><?php _e('Description', $this -> plugin_name); ?></a></li>
  259.                         <?php $tabscount2++; ?>
  260.                         <?php foreach ($product -> contents as $content) : ?>
  261.                             <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php echo $content -> title; ?></a></li>
  262.                             <?php $tabscount2++; ?>
  263.                         <?php endforeach; ?>
  264.                         <?php if (empty($product -> oos) || $product -> oos == false) : ?>
  265.                             <?php if (!$this -> get_option('fieldsintab') || $this -> get_option('fieldsintab') == "Y") : ?>
  266.                                 <?php if (!empty($product -> styles) || !empty($product -> cfields)) : ?>
  267.                                     <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Options', $this -> plugin_name); ?></a></li>
  268.                                     <?php $productoptionstab = $tabscount2; ?>
  269.                                     <?php $tabscount2++; ?>
  270.                                 <?php endif; ?>
  271.                             <?php endif; ?>
  272.                         <?php endif; ?>
  273.                         <?php if (!$this -> get_option('gallerytab') || $this -> get_option('gallerytab') == "Y") : ?>
  274.                             <?php if (!empty($product -> images)) : ?>
  275.                                 <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Gallery', $this -> plugin_name); ?></a></li>
  276.                                 <?php $tabscount2++; ?>
  277.                             <?php endif; ?>
  278.                         <?php endif; ?>
  279.                         <?php if (!empty($product -> related) && $this -> get_option('relatedintab') == "Y") : ?>
  280.                             <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Related Products', $this -> plugin_name); ?></a></li>
  281.                             <?php $tabscount2++; ?>
  282.                         <?php endif; ?>
  283.                     </ul>
  284.                     <!-- END Tabs Menu -->
  285.                
  286.                     <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
  287.                         <h3><?php _e('Description', $this -> plugin_name); ?></h3>
  288.                         <div>
  289.                             <?php echo wpautop(do_shortcode($product -> description)); ?>
  290.                            
  291.                             <?php if ($this -> get_option('unitextbox') == "Y") : ?>
  292.                                 <?php $message = $this -> get_option('unitextboxmessage'); ?>
  293.                                 <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
  294.                                     <div class="<?php echo $this -> pre; ?>unitextbox">
  295.                                         <?php echo $message; ?>
  296.                                     </div>
  297.                                 <?php endif; ?>
  298.                             <?php endif; ?>
  299.                         </div>
  300.                     </div>
  301.                     <?php $tabscount++; ?>
  302.                     <?php foreach ($product -> contents as $content) : ?>
  303.                         <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
  304.                             <h3><?php echo $content -> title; ?></h3>
  305.                             <div>
  306.                                 <?php echo wpautop(stripslashes(do_shortcode($content -> content))); ?>
  307.                                
  308.                                 <?php if ($this -> get_option('unitextbox') == "Y") : ?>
  309.                                 <?php $message = $this -> get_option('unitextboxmessage'); ?>
  310.                                 <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
  311.                                     <div class="<?php echo $this -> pre; ?>unitextbox">
  312.                                         <?php echo $message; ?>
  313.                                     </div>
  314.                                 <?php endif; ?>
  315.                             <?php endif; ?>
  316.                             </div>
  317.                         </div>
  318.                         <?php $tabscount++; ?>
  319.                     <?php endforeach; ?>
  320.                     <!-- BEG Custom Fields & Variations in Tab -->
  321.                     <?php if (empty($product -> oos) || $product -> oos == false) : ?>
  322.                         <?php if (!$this -> get_option('fieldsintab') || $this -> get_option('fieldsintab') == "Y") : ?>
  323.                             <?php if (!empty($product -> styles) || !empty($product -> cfields)) : ?>
  324.                                 <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
  325.                                     <h3><?php _e('Options', $this -> plugin_name); ?></h3>
  326.                                     <div>
  327.                                         <?php if (!empty($product -> styles) && !empty($product -> options)) : ?>
  328.                                             <?php foreach ($product -> styles as $style_id) : ?>
  329.                                                 <?php $wpcoDb -> model = $Style -> model; ?>
  330.                                                 <?php if ($style = $wpcoDb -> find(array('id' => $style_id))) : ?>
  331.                                                     <?php echo $this -> render_style($style_id, $product -> options[$style_id], true, $product -> id); ?>
  332.                                                 <?php endif; ?>
  333.                                             <?php endforeach; ?>
  334.                                         <?php endif; ?>
  335.                                        
  336.                                         <?php if (!empty($product -> cfields)) : ?>
  337.                                             <?php foreach ($product -> cfields as $field_id) : ?>
  338.                                                 <?php if (!empty($field_id)) : ?>
  339.                                                     <?php $wpcoDb -> model = $wpcoField -> model; ?>
  340.                                                     <?php if ($field = $wpcoDb -> find(array('id' => $field_id))) : ?>
  341.                                                         <?php $_POST[$field -> slug] = $_POST['Item'][$field -> slug]; ?>
  342.                                                         <?php $this -> render_field($field_id, true, false, $product -> id); ?>
  343.                                                     <?php endif; ?>
  344.                                                 <?php endif; ?>
  345.                                             <?php endforeach; ?>
  346.                                         <?php endif; ?>
  347.                                        
  348.                                         <!-- <?php if ($this -> get_option('buynow') == "Y" || (!empty($product -> buynow) && $product -> buynow == "Y")) : ?>
  349.                                             <p><?php echo $wpcoForm -> submit($product -> buttontext); ?></p>
  350.                                         <?php else : ?>
  351.                                             <p><?php echo $wpcoForm -> submit($product -> buttontext); ?></p>
  352.                                         <?php endif; ?> -->
  353. <!-- Added here neha                                         -->
  354.                                         <?php if ($this -> get_option('buynow') == "Y" || (!empty($product -> buynow) && $product -> buynow == "Y")) : ?>
  355.                                             <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
  356.                                                 <?php if (!empty($product -> affiliate) && $product -> affiliate == "Y") : ?>
  357.                                                     <span id="submit<?php echo $product -> id; ?>"><a class="<?php echo $this -> pre; ?>buylink" target="_<?php echo $product -> affiliatewindow; ?>" href="<?php echo $wpcoHtml -> retainquery($this -> pre . 'method=affiliate&amp;id=' . $product -> id); ?>" title="<?php echo $product -> title; ?>"><?php echo $product -> buttontext; ?></a>
  358.                                                 <?php else : ?>
  359.                                                     <span id="submit<?php echo $product -> id; ?>"><a href="#void" title="<?php _e('Buy this product now', $this -> plugin_name); ?>" onclick="jQuery('#addtocart<?php echo $product -> id; ?>').submit();" class="<?php echo $this -> pre; ?>buylink"><?php echo $product -> buttontext; ?></a></span>
  360.                                                 <?php endif; ?>
  361.                                             <?php else : ?>
  362.                                                 <span id="submit<?php echo $product -> id; ?>"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
  363.                                             <?php endif; ?>
  364.                                         <?php else : ?>
  365.                                             <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
  366.                                                 <?php if (!empty($product -> affiliate) && $product -> affiliate == "Y") : ?>
  367.                                                     <span id="submit<?php echo $product -> id; ?>"><a href="<?php echo $wpcoHtml -> retainquery($this -> pre . 'method=affiliate&amp;id=' . $product -> id); ?>" class="<?php echo $this -> pre; ?>buylink" target="_<?php echo $product -> affiliatewindow; ?>" title="<?php echo $product -> title; ?>"><?php echo $product -> buttontext; ?></a>
  368.                                                 <?php else : ?>
  369.                                                     <?php if ($this -> get_option('cart_addajax') == "Y") : ?>
  370.                                                         <span id="submit<?php echo $product -> id; ?>"><a href="#void" title="<?php _e('Add this product to your shopping cart', $this -> plugin_name); ?>" onclick="wpco_addtocart(jQuery('#addtocart<?php echo $product -> id; ?>'), '<?php echo $product -> id; ?>', '<?php echo $this -> widget_active('cart'); ?>'); return false;" class="<?php echo $this -> pre; ?>buylink"><?php echo $product -> buttontext; ?></a></span><br />
  371.                                                     <?php else : ?>
  372.                                                         <span class="productsubmit" id="submit<?php echo $product -> id; ?>"><a href="" onclick="jQuery('#addtocart<?php echo $product -> id; ?>').submit(); return false;" class="<?php echo $this -> pre; ?>buylink" title="<?php _e('Add this product to your shopping cart', $this -> plugin_name); ?>"><?php echo $product -> buttontext; ?></a></span>
  373.                                                     <?php endif; ?>
  374.                                                 <?php endif; ?>
  375.                                             <?php else : ?>
  376.                                                 <?php /*<span id="submit<?php echo $product -> id; ?>" style="display:block;"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>*/ ?>
  377.                                                 <?php if ($this -> get_option('cart_addajax') == "Y") : ?>
  378.                                                     <span id="submit<?php echo $product -> id; ?>" class="productsubmit productsubmitbutton"><input type="button" name="submit" value="<?php echo $product -> buttontext; ?>" onclick="wpco_addtocart(jQuery('#addtocart<?php echo $product -> id; ?>'), '<?php echo $product -> id; ?>', '<?php echo $this -> widget_active('cart'); ?>'); return false;" /></span>
  379.                                                 <?php else : ?>
  380.                                                     <span id="submit<?php echo $product -> id; ?>" class="productsubmit productsubmitbutton"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
  381.                                                 <?php endif; ?>
  382.                                             <?php endif; ?>
  383.                                             <span class="<?php echo $this -> pre; ?>loading" id="loading<?php echo $product -> id; ?>" style="display:none; z-index:99;"><img src="<?php echo $this -> url(); ?>/images/loading.gif" alt="loading" /> <?php _e('Adding Item...', $this -> plugin_name); ?></span>
  384.                                             <span class="<?php echo $this -> pre; ?>added" style="display:none;" id="added<?php echo $product -> id; ?>"><img src="<?php echo $this -> url(); ?>/images/accept.png" /> <?php _e('Product has been added', $this -> plugin_name); ?></span>
  385.                                         <?php endif; ?>
  386.                                         <?php if ($this -> get_option('unitextbox') == "Y") : ?>
  387.                                             <?php $message = $this -> get_option('unitextboxmessage'); ?>
  388.                                             <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
  389.                                                 <div class="<?php echo $this -> pre; ?>unitextbox">
  390.                                                     <?php echo $message; ?>
  391.                                                 </div>
  392.                                             <?php endif; ?>
  393.                                         <?php endif; ?>
  394.                                     </div>
  395.                                 </div>
  396.                                 <?php $tabscount++; ?>
  397.                             <?php endif; ?>
  398.                         <?php endif; ?>
  399.                     <?php endif; ?>
  400.                     <!-- END Custom Fields & Variations in Tab -->
  401.                     <!-- BEG Gallery/extra Images in Tab -->
  402.                     <?php if (!$this -> get_option('gallerytab') || $this -> get_option('gallerytab') == "Y") : ?>
  403.                         <?php if (!empty($product -> images)) : ?>
  404.                             <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
  405.                                 <h3><?php _e('Gallery', $this -> plugin_name); ?></h3>
  406.                                 <div>
  407.                                     <div class="<?php echo $this -> pre; ?>imglist <?php echo $this -> pre; ?>imglistfull">
  408.                                         <ul>
  409.                                             <?php foreach ($product -> images as $image) : ?>
  410.                                                 <li><?php echo $wpcoHtml -> link($wpcoHtml -> image($wpcoHtml -> thumb_name($image -> filename, 'small'), array('folder' => "images"), $image -> filename), $wpcoHtml -> image_url($image -> filename), array('class' => 'thickbox', 'rel' => $wpcoHtml -> sanitize($product -> title) . '-images', 'title' => $image -> title)); ?></li>
  411.                                             <?php endforeach; ?>
  412.                                         </ul>
  413.                                         <br class="<?php echo $this -> pre; ?>cleaner" />
  414.                                     </div>
  415.                                    
  416.                                     <?php if ($this -> get_option('unitextbox') == "Y") : ?>
  417.                                         <?php $message = $this -> get_option('unitextboxmessage'); ?>
  418.                                         <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
  419.                                             <div class="<?php echo $this -> pre; ?>unitextbox">
  420.                                                 <?php echo $message; ?>
  421.                                             </div>
  422.                                         <?php endif; ?>
  423.                                     <?php endif; ?>
  424.                                 </div>
  425.                             </div>
  426.                             <?php $tabscount++; ?>
  427.                         <?php endif; ?>
  428.                     <?php endif; ?>
  429.                     <!-- END Gallery/extra Images in Tab -->
  430.                     <!-- BEG Related Products in Tab -->
  431.                     <?php if (!empty($product -> related) && $this -> get_option('relatedintab') == "Y") : ?>
  432.                         <?php $rproducts = array(); ?>
  433.                         <?php foreach ($product -> related as $rproduct) : ?>
  434.                             <?php $wpcoDb -> model = $Product -> model; ?>
  435.                             <?php $rproducts[] = $wpcoDb -> find(array('id' => $rproduct -> related_id)); ?>
  436.                         <?php endforeach; ?>
  437.                         <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
  438.                             <h3 id="related"><?php _e('Related Products', $this -> plugin_name); ?></h3>
  439.                             <div>
  440.                                 <?php $this -> render('products' . DS . 'loop', array('products' => $rproducts, 'related' => true, 'tabber' => true, 'noaddtob' => true), true, 'default'); ?>
  441.                             </div>
  442.                         </div>
  443.                         <?php $tabscount++; ?>
  444.                     <?php endif; ?>
  445.                     <!-- END Related Products in Tab -->
  446.                 </div>
  447.                 <!-- END Tabber -->
  448.             <?php endif; ?>
  449.         <?php if (empty($product -> oos) || $product -> oos == false) : ?>
  450.                 <?php if ($this -> get_option('buynow') == "Y" || (!empty($product -> buynow) && $product -> buynow == "Y")) : ?>
  451.                     <input type="hidden" name="buynow" value="Y" />
  452.                     <input type="hidden" name="fromproductpage" value="Y" />
  453.                 <?php endif; ?>
  454.             </form>
  455.         <?php endif; ?>
  456.        
  457.         <?php if ($this -> get_option('fieldsintab') == "Y" && (!empty($product -> styles) || !empty($product -> cfields)) && !empty($product -> contents) && (is_array($product -> contents) || is_object($product -> contents))) : ?>
  458.             <?php if ($this -> get_option('optionslinktb') == "T") : ?>
  459.                 <fieldset class="<?php echo $this -> pre; ?> <?php echo $this -> pre; ?>optionslinkfieldset">
  460.                     <legend><?php _e('Product Options', $this -> plugin_name); ?></legend>
  461.                     <span class="<?php echo $this -> pre; ?>optionslink"><?php echo $wpcoHtml -> link(__('Click for Options &raquo;', $this -> plugin_name), "#void", array('class' => "product-options-link")); ?></span>
  462.                 </fieldset>
  463.             <?php endif; ?>
  464.         <?php endif; ?>
  465.     <?php else : ?>    
  466.         <!-- SHOWCASE -->
  467.         <?php $showcasemsg = $this -> get_option('showcasemsg'); ?>
  468.         <p><?php echo (empty($product -> showcasemsg)) ? $showcasemsg : $product -> showcasemsg; ?></p>
  469.        
  470.         <?php if (!empty($product -> contents) && (is_array($product -> contents) || is_object($product -> contents))) : ?>
  471.             <?php $tabscount = 1; ?>
  472.             <?php $tabscount2 = 1; ?>
  473.             <div style="clear:both; display:block; height:1px; width:100%;"></div>
  474.        
  475.             <div id="tabs<?php echo $product -> id; ?>">
  476.                 <!-- BEG Tabs Menu -->
  477.                 <ul>
  478.                     <li><a href="#tabs<?php echo $product -> id; ?>-1"><?php _e('Description', $this -> plugin_name); ?></a></li>
  479.                     <?php $tabscount2++; ?>
  480.                     <?php foreach ($product -> contents as $content) : ?>
  481.                         <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php echo $content -> title; ?></a></li>
  482.                         <?php $tabscount2++; ?>
  483.                     <?php endforeach; ?>
  484.                     <?php if (!$this -> get_option('gallerytab') || $this -> get_option('gallerytab') == "Y") : ?>
  485.                         <?php if (!empty($product -> images)) : ?>
  486.                             <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Gallery', $this -> plugin_name); ?></a></li>
  487.                             <?php $tabscount2++; ?>
  488.                         <?php endif; ?>
  489.                     <?php endif; ?>
  490.                     <?php if (!empty($product -> related) && $this -> get_option('relatedintab') == "Y") : ?>
  491.                         <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Related Products', $this -> plugin_name); ?></a></li>
  492.                         <?php $tabscount2++; ?>
  493.                     <?php endif; ?>
  494.                 </ul>
  495.                 <!-- END Tabs Menu -->
  496.            
  497.                 <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
  498.                     <h3><?php _e('Description', $this -> plugin_name); ?></h3>
  499.                     <div>
  500.                         <?php echo wpautop(do_shortcode($product -> description)); ?>
  501.                        
  502.                         <?php if ($this -> get_option('unitextbox') == "Y") : ?>
  503.                             <?php $message = $this -> get_option('unitextboxmessage'); ?>
  504.                             <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
  505.                                 <div class="<?php echo $this -> pre; ?>unitextbox">
  506.                                     <?php echo $message; ?>
  507.                                 </div>
  508.                             <?php endif; ?>
  509.                         <?php endif; ?>
  510.                     </div>
  511.                 </div>
  512.                 <?php $tabscount++; ?>
  513.                 <?php foreach ($product -> contents as $content) : ?>
  514.                     <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
  515.                         <h3><?php echo $content -> title; ?></h3>
  516.                         <div>
  517.                             <?php echo wpautop(stripslashes(do_shortcode($content -> content))); ?>
  518.                            
  519.                             <?php if ($this -> get_option('unitextbox') == "Y") : ?>
  520.                             <?php $message = $this -> get_option('unitextboxmessage'); ?>
  521.                             <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
  522.                                 <div class="<?php echo $this -> pre; ?>unitextbox">
  523.                                     <?php echo $message; ?>
  524.                                 </div>
  525.                             <?php endif; ?>
  526.                         <?php endif; ?>
  527.                         </div>
  528.                     </div>
  529.                     <?php $tabscount++; ?>
  530.                 <?php endforeach; ?>
  531.                
  532.                 <!-- GALLERY IN TAB -->
  533.                 <?php if (!$this -> get_option('gallerytab') || $this -> get_option('gallerytab') == "Y") : ?>
  534.                     <?php if (!empty($product -> images)) : ?>
  535.                         <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
  536.                             <h3><?php _e('Gallery', $this -> plugin_name); ?></h3>
  537.                             <div>
  538.                                 <div class="<?php echo $this -> pre; ?>imglist <?php echo $this -> pre; ?>imglistfull">
  539.                                     <ul>
  540.                                         <?php foreach ($product -> images as $image) : ?>
  541.                                             <li><?php echo $wpcoHtml -> link($wpcoHtml -> image($wpcoHtml -> thumb_name($image -> filename, 'small'), array('folder' => "images"), $image -> filename), $wpcoHtml -> image_url($image -> filename), array('class' => 'thickbox', 'rel' => $wpcoHtml -> sanitize($product -> title) . '-images', 'title' => $image -> title)); ?></li>
  542.                                         <?php endforeach; ?>
  543.                                     </ul>
  544.                                     <br class="<?php echo $this -> pre; ?>cleaner" />
  545.                                 </div>
  546.                                
  547.                                 <?php if ($this -> get_option('unitextbox') == "Y") : ?>
  548.                                     <?php $message = $this -> get_option('unitextboxmessage'); ?>
  549.                                     <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
  550.                                         <div class="<?php echo $this -> pre; ?>unitextbox">
  551.                                             <?php echo $message; ?>
  552.                                         </div>
  553.                                     <?php endif; ?>
  554.                                 <?php endif; ?>
  555.                             </div>
  556.                         </div>
  557.                         <?php $tabscount++; ?>
  558.                     <?php endif; ?>
  559.                 <?php endif; ?>
  560.                
  561.                 <!-- RELATED PRODUCTS -->
  562.                 <?php if (!empty($product -> related) && $this -> get_option('relatedintab') == "Y") : ?>
  563.                     <?php $rproducts = array(); ?>
  564.                     <?php foreach ($product -> related as $rproduct) : ?>
  565.                         <?php $wpcoDb -> model = $Product -> model; ?>
  566.                         <?php $rproducts[] = $wpcoDb -> find(array('id' => $rproduct -> related_id)); ?>
  567.                     <?php endforeach; ?>
  568.                     <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
  569.                         <h3 id="related"><?php _e('Related Products', $this -> plugin_name); ?></h3>
  570.                         <div>
  571.                             <?php $this -> render('products' . DS . 'loop', array('products' => $rproducts, 'related' => true, 'tabber' => true, 'noaddtob' => true), true, 'default'); ?>
  572.                         </div>
  573.                     </div>
  574.                     <?php $tabscount++; ?>
  575.                 <?php endif; ?>
  576.             </div>
  577.             <!-- END TABBER -->
  578.         <?php endif; ?>
  579.     <?php endif; ?>
  580.  
  581.     <?php if (!empty($product -> categories) && $this -> get_option('product_showcategories') == "Y") : ?> 
  582.         <fieldset class="<?php echo $this -> pre; ?>">
  583.             <?php if (count($product -> categories) == 1) : ?>
  584.                 <legend><?php echo $captions['product']['category']; ?></legend>
  585.             <?php else : ?>
  586.                 <legend><?php echo $captions['product']['categories']; ?></legend>
  587.             <?php endif; ?>
  588.            
  589.             <?php $c = 1; ?>
  590.             <?php foreach ($product -> categories as $category_id) : ?>
  591.                 <?php $wpcoDb -> model = $Category -> model; ?>
  592.                 <?php if ($category = $wpcoDb -> find(array('id' => $category_id))) : ?>
  593.                     <a href="<?php echo get_permalink($category -> post_id); ?>" title="<?php echo $category -> title; ?>"><?php echo $category -> title; ?></a>
  594.                     <?php echo ($c < count($product -> categories)) ? ', ' : ''; ?>
  595.                 <?php endif; ?>
  596.                 <?php $c++; ?>
  597.             <?php endforeach; ?>
  598.         </fieldset>
  599.     <?php endif; ?>
  600.    
  601.     <?php if ($this -> get_option('unitextbox') == "Y" && $this -> get_option('unitextfieldset') == "Y") : ?>
  602.         <?php $message = $this -> get_option('unitextboxmessage'); ?>
  603.         <?php if (!empty($message)) : ?>
  604.             <fieldset class="<?php echo $this -> pre; ?>">
  605.                 <legend><?php _e('Attention', $this -> plugin_name); ?></legend>
  606.                 <div class="<?php echo $this -> pre; ?>unitextbox">
  607.                     <?php echo $message; ?>
  608.                 </div>
  609.             </fieldset>
  610.         <?php endif; ?>
  611.     <?php endif; ?>
  612.    
  613.     <?php if (!empty($product -> supplier_id) && $this -> get_option('hidesuppliers') == "N") : ?>
  614.         <fieldset class="<?php echo $this -> pre; ?>">
  615.             <legend><?php echo $captions['product']['supplier']; ?></legend>
  616.             <?php if ($this -> get_option('supplierpages') == "Y" && !empty($product -> supplier -> post_id)) : ?>
  617.                 <?php if ($product -> supplier -> image == "Y" && !empty($product -> supplier -> imagename)) : ?>
  618.                     <?php echo $wpcoHtml -> link($wpcoHtml -> image($product -> supplier -> imagename, array('folder' => "suppliers"), $product -> supplier -> imagename), get_permalink($product -> supplier -> post_id), array('title' => $product -> supplier -> name)); ?>
  619.                 <?php else : ?>
  620.                     <?php echo $wpcoHtml -> link($product -> supplier -> name, get_permalink($product -> supplier -> post_id), array('title' => $product -> supplier -> name)); ?>
  621.                 <?php endif; ?>
  622.             <?php else : ?>
  623.                 <?php echo $product -> supplier -> name; ?>
  624.             <?php endif; ?>
  625.         </fieldset>
  626.     <?php endif; ?>
  627.    
  628.     <?php if (!empty($product -> kws) && is_array($product -> kws) && $this -> get_option('product_showkeywords') == "Y") : ?>
  629.         <fieldset class="<?php echo $this -> pre; ?>">
  630.             <legend><?php echo $captions['product']['keywords']; ?></legend>
  631.             <div class="<?php echo $this -> pre; ?>keywords">
  632.                 <?php $k = 1; ?>
  633.                 <?php foreach ($product -> kws as $kw) : ?>
  634.                     <?php echo $wpcoHtml -> link($kw, rtrim(get_permalink($this -> get_option('allproductsppid')), '/') . '/?' . $this -> pre . 'searchterm=' . urlencode($kw), array('title' => $kw)); ?>
  635.                     <?php echo ($k < count($product -> kws)) ? ', ' : ''; ?>
  636.                     <?php $k++; ?>
  637.                 <?php endforeach; ?>
  638.             </div>
  639.         </fieldset>
  640.     <?php endif; ?>
  641.    
  642.     <?php if (!empty($product -> min_order)) : ?>
  643.         <fieldset class="<?php echo $this -> pre; ?>">
  644.             <legend><?php _e('Minimum Order', $this -> plugin_name); ?></legend>
  645.             <?php echo $product -> min_order; ?> <?php _e('units', $this -> plugin_name); ?>
  646.         </fieldset>
  647.     <?php endif; ?>
  648.    
  649.     <?php if ($this -> get_option('unitextbox') == "Y") : ?>
  650.         <?php $message = $this -> get_option('unitextboxmessage'); ?>
  651.         <?php if (!empty($message)) : ?>
  652.             <div class="<?php echo $this -> pre; ?>unitextbox">
  653.                 <?php echo $message; ?>
  654.             </div>
  655.         <?php endif; ?>
  656.     <?php endif; ?>
  657.    
  658.     <?php if ($this -> get_option('product_descriptionposition') == "below") : ?>
  659.         <?php if (empty($product -> contents) || !is_array($product -> contents)) : ?>
  660.             <?php echo wpautop(do_shortcode($product -> description)); ?>
  661.         <?php endif; ?>
  662.     <?php endif; ?>
  663.    
  664.     <?php if (!empty($product -> related) && ($this -> get_option('relatedintab') == "N" || empty($product -> contents))) : ?>
  665.         <br class="<?php echo $this -> pre; ?>cleaner" />
  666.    
  667.         <?php $rproducts = array(); ?>
  668.         <?php foreach ($product -> related as $rproduct) : ?>
  669.             <?php $wpcoDb -> model = $Product -> model; ?>
  670.             <?php $rproducts[] = $wpcoDb -> find(array('id' => $rproduct -> related_id)); ?>
  671.         <?php endforeach; ?>
  672.         <h3 id="related"><?php _e('Related Products', $this -> plugin_name); ?></h3>
  673.         <?php $this -> render('products' . DS . 'loop', array('products' => $rproducts, 'related' => true, 'tabber' => false), true, 'default'); ?>
  674.     <?php endif; ?>
  675. </div>
  676.  
  677. <?php if (!is_feed()) : ?>
  678.     <script type="text/javascript">
  679.     <?php if ($tabscount > 1) : ?>
  680.         jQuery(document).ready(function() {
  681.             $tabs = jQuery('#tabs<?php echo $product -> id; ?>').tabs();
  682.            
  683.             jQuery('.product-options-link').click(function() {
  684.                 wpco_scroll(jQuery('#tabs<?php echo $product -> id; ?>'));
  685.                 $tabs.tabs('select', '<?php echo $productoptionstab; ?>');
  686.                 return false;
  687.             });
  688.         });
  689.     <?php endif; ?>
  690.     </script>
  691. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment