Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="<?php echo $this -> pre; ?>product">
- <?php if (!is_feed() && current_user_can('edit_plugins')) : ?>
- <p><small>
- <?php echo $wpcoHtml -> link(__('Edit Product', $this -> plugin_name), $wpcoHtml -> product_save_url($product -> id)); ?> |
- <?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; }")); ?>
- </small></p>
- <?php endif; ?>
- <?php $this -> render('favorites' . DS . 'link', array('product' => $product), true, 'default'); ?>
- <div class="<?php echo $this -> pre; ?>images">
- <?php /*
- <?php if ($this -> get_option('cropthumb') == "Y") : ?>
- <?php $imagefull = ABSPATH . 'wp-content' . DS . 'uploads' . DS . $this -> plugin_name . DS . 'images' . DS . $wpcoHtml -> thumb_name($product -> image -> name); ?>
- <?php if (file_exists($imagefull) && filesize($imagefull) > 0) : ?>
- <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>
- <small><?php echo $captions['product']['clicktoenlarge']; ?></small>
- <?php else : ?>
- <div><?php echo $wpcoHtml -> image($wpcoHtml -> thumb_name($product -> image -> name), false, $product -> image -> name); ?></div>
- <?php endif; ?>
- <?php else : ?>*/ ?>
- <!-- this part shows the full product image -->
- <div><?php echo $wpcoHtml -> image($product -> image -> name, false, $product -> image -> name); ?></div>
- <?php /*<?php endif; ?>*/ ?>
- <?php if (!empty($product -> images)) : ?>
- <?php if ($this -> get_option('gallerytab') == "N" || ($this -> get_option('gallerytab') == "Y" && empty($product -> contents))) : ?>
- <div class="<?php echo $this -> pre; ?>imglist">
- <ul>
- <?php $imgcount = 1; ?>
- <?php foreach ($product -> images as $image) : ?>
- <?php if ($imgcount <= $this -> get_option('pimgcount')) : ?>
- <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>
- <?php else : ?>
- <?php break; ?>
- <?php endif; ?>
- <?php $imgcount++; ?>
- <?php endforeach; ?>
- </ul>
- <br class="<?php echo $this -> pre; ?>cleaner" />
- <?php if (count($product -> images) > $this -> get_option('pimgcount')) : ?>
- <div style="margin:0 0 10px 0;"><?php echo $wpcoHtml -> link(__('View all images', $thsi -> plugin_name) . ' »', '?' . $this -> pre . 'method=images', array()); ?></div>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- </div>
- <?php if ($this -> get_option('product_descriptionposition') == "above") : ?>
- <?php if (empty($product -> contents) || !is_array($product -> contents)) : ?>
- <?php echo wpautop(do_shortcode($product -> description)); ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if ($this -> get_option('showcase') == "N" && $product -> showcase == "N") : ?>
- <!-- NOT SHOWCASE -->
- <!-- Price -->
- <div class="pricewrap">
- <?php if ($product -> price_type == "tiers") : ?>
- <?php $price = @unserialize($product -> price); ?>
- <?php echo (!empty($product -> sprice) && $product -> sprice != "0.00") ? '<span class="sprice"><strike>' . $wpcoHtml -> currency_price($product -> sprice) . '</strike></span>' : ''; ?>
- <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>
- <?php elseif ($product -> price_type == "donate") : ?>
- <span id="productprice<?php echo $product -> id; ?>" class="price"> </span>
- <?php if (!empty($product -> donate_caption)) : ?>
- <p class="donatecaption"><?php echo stripslashes($product -> donate_caption); ?></p>
- <?php endif; ?>
- <?php elseif ($product -> price_type == "square" && !empty($product -> square_price)) : ?>
- <span id="productprice<?php echo $product -> id; ?>" class="price"> </span>
- <?php if (!empty($product -> square_price_text)) : ?>
- <p class="squareprice"><small><strong><?php echo stripslashes($product -> square_price_text); ?></strong></small></p>
- <?php else : ?>
- <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>
- <?php endif; ?>
- <?php else : ?>
- <?php echo (!empty($product -> sprice) && $product -> sprice != "0.00") ? '<span class="sprice"><strike>' . $wpcoHtml -> currency_price($product -> sprice) . '</strike></span>' : ''; ?>
- <?php if (!empty($product -> price) && $product -> price != "0.00") : ?>
- <span id="productprice<?php echo $product -> id; ?>" class="price productprice"><?php echo $wpcoHtml -> currency_price($product -> price); ?></span>
- <?php else : ?>
- <span id="productprice<?php echo $product -> id; ?>" class="price productprice"><?php echo stripslashes($this -> get_option('product_zerotext')); ?></span>
- <?php endif; ?>
- <?php endif; ?>
- </div>
- <?php if ($product -> price_type == "tiers") : ?>
- <fieldset class="<?php echo $this -> pre; ?>">
- <legend><?php _e('Your Price', $this -> plugin_name); ?></legend>
- <table class="<?php echo $this -> pre; ?>">
- <tbody>
- <?php $t = 1; ?>
- <?php $class = 'erow'; ?>
- <?php foreach ($price as $tier) : ?>
- <?php $tierstring = ($t == count($price)) ? $tier['min'] . ' ' . __('or more', $this -> plugin_name) : $tier['min'] . ' ' . __('to', $this -> plugin_name) . ' ' . $tier['max'] ; ?>
- <tr class="<?php echo $class = (empty($class) || $class == "erow") ? 'arow' : 'erow'; ?>">
- <td><?php echo $tierstring; ?></td>
- <td>=</td>
- <td><b><?php echo $wpcoHtml -> currency_price($tier['price']); ?></b> <?php _e('per unit', $this -> plugin_name); ?></td>
- </tr>
- <?php $t++; ?>
- <?php endforeach; ?>
- </tbody>
- </table>
- </fieldset>
- <?php endif; ?>
- <?php if (empty($product -> oos) || $product -> oos != true) : ?>
- <?php echo $wpcoHtml -> addtocart_action($product -> id, false); ?>
- <?php echo $wpcoForm -> hidden('Item.product_id', array('value' => $product -> id)); ?>
- <?php global $user_ID; ?>
- <?php echo $wpcoForm -> hidden('Item.user_id', array('value' => $user_ID)); ?>
- <?php if ($product -> price_type == "square" && !empty($product -> square_price)) : ?>
- <!-- Price per square meter -->
- <?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); ?>
- <?php echo $wpcoForm -> text('Item.length', array('width' => "45px", 'onkeyup' => "wpco_updateproductprice('" . $product -> id . "', '" . __('Calculating...', $this -> plugin_name) . "');")); ?><?php echo $product -> lengthmeasurement; ?>
- <?php echo $wpcoForm -> hidden('Item.count', array('value' => 1)); ?>
- <?php endif; ?>
- <?php if ($this -> get_option('fieldsintab') == "N" || ($this -> get_option('fieldsintab') == "Y" && empty($product -> contents))) : ?>
- <?php if (!empty($product -> styles) && !empty($product -> options)) : ?>
- <?php foreach ($product -> styles as $style_id) : ?>
- <?php echo $this -> render_style($style_id, $product -> options[$style_id], true, $product -> id); ?>
- <?php endforeach; ?>
- <?php endif; ?>
- <?php if (!empty($product -> cfields)) : ?>
- <?php foreach ($product -> cfields as $field_id) : ?>
- <?php if (!empty($field_id)) : ?>
- <?php $this -> render_field($field_id, true, false, $product -> id); ?>
- <?php endif; ?>
- <?php endforeach; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if ($this -> get_option('howmany') == "Y" && $product -> price_type != "donate" && $product -> price_type != "square") : ?>
- <div class="<?php echo $this -> pre; ?>howmany">
- <b><?php _e('How many', "wp-checkout"); ?> <?php echo $product -> measurement; ?><?php _e('?', "wp-checkout"); ?></b>
- <?php $cvaluet = (empty($product -> min_order)) ? '1' : $product -> min_order; ?>
- <?php $cvalue = (empty($_POST['Item']['count'])) ? $cvaluet : $_POST['Item']['count']; ?>
- <?php echo $wpcoForm -> text('Item.count', array('value' => $cvalue, 'width' => '45px')); ?>
- </div>
- <?php elseif ($product -> price_type == "donate") : ?>
- <?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) . '\');" />'); ?>
- <!-- Donation Product -->
- <?php /*<?php echo $wpcoForm -> text('Item.donate_price', array('onkeyup' => "jQuery(this).val(); wpco_updateproductprice('" . $product_id . "');")); ?>*/ ?>
- <?php else : ?>
- <?php /*hidden field for quantity as 1*/ ?>
- <?php echo $wpcoForm -> hidden('Item.count', array('value' => 1)); ?>
- <?php endif; ?>
- <span class="wpcobuttonwrap">
- <?php if ($this -> get_option('buynow') == "Y" || (!empty($product -> buynow) && $product -> buynow == "Y")) : ?>
- <!-- BEG Buy Now -->
- <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
- <?php if (!empty($product -> affiliate) && $product -> affiliate == "Y") : ?>
- <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&id=' . $product -> id); ?>" title="<?php echo $product -> title; ?>"><?php echo $product -> buttontext; ?></a>
- <?php else : ?>
- <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>
- <?php endif; ?>
- <?php else : ?>
- <span id="submit<?php echo $product -> id; ?>"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
- <?php endif; ?>
- <?php elseif (!empty($product -> affiliate) && $product -> affiliate == "Y" && !empty($product -> affiliateurl)) : ?>
- <!-- BEG Affiliate Product -->
- <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
- <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>
- <?php else : ?>
- <span class="productsubmit productsubmitbutton affiliateproductsubmit" id="submit<?php echo $product -> id; ?>"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
- <?php endif; ?>
- <?php elseif (false && !empty($product -> price_type) && $product -> price_type == "donate") : ?>
- <!-- BEG Donation Product -->
- <!-- END DOnation Product -->
- <?php else : ?>
- <!-- BEG Normal Product -->
- <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
- <?php if (!empty($product -> affiliate) && $product -> affiliate == "Y") : ?>
- <span id="submit<?php echo $product -> id; ?>"><a href="<?php echo $wpcoHtml -> retainquery($this -> pre . 'method=affiliate&id=' . $product -> id); ?>" class="<?php echo $this -> pre; ?>buylink" target="_<?php echo $product -> affiliatewindow; ?>" title="<?php echo $product -> title; ?>"><?php echo $product -> buttontext; ?></a>
- <?php else : ?>
- <?php if ($this -> get_option('cart_addajax') == "Y") : ?>
- <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 />
- <?php else : ?>
- <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>
- <?php endif; ?>
- <?php endif; ?>
- <?php else : ?>
- <?php /*<span id="submit<?php echo $product -> id; ?>" style="display:block;"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>*/ ?>
- <?php if ($this -> get_option('cart_addajax') == "Y") : ?>
- <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>
- <?php else : ?>
- <span id="submit<?php echo $product -> id; ?>" class="productsubmit productsubmitbutton"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
- <?php endif; ?>
- <?php endif; ?>
- <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>
- <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>
- <?php endif; ?>
- </span>
- <?php if ($product -> inhonorof == "Y") : ?>
- <?php if (!empty($product -> inhonorof) && $product -> inhonorof == "Y") : ?>
- <?php if ($product -> inhonorofreq == "N") : ?>
- <div class="<?php echo $this -> pre; ?>inhonorofcheckbox">
- <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>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- <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; ?>">
- <fieldset>
- <legend><?php _e('In Honor Of...', $this -> plugin_name); ?></legend>
- <table>
- <tbody>
- <tr>
- <td><?php _e('Your Name:', $this -> plugin_name); ?></td>
- <td><?php echo $wpcoForm -> text('Item.iof_name'); ?></td>
- </tr>
- <tr>
- <td><?php _e('Beneficiary Name', $this -> plugin_name); ?></td>
- <td><?php echo $wpcoForm -> text('Item.iof_benname'); ?></td>
- </tr>
- <tr>
- <td><?php _e('Beneficiary Email', $this -> plugin_name); ?></td>
- <td><?php echo $wpcoForm -> text('Item.iof_benemail'); ?></td>
- </tr>
- </tbody>
- </table>
- </fieldset>
- </div>
- <?php endif; ?>
- <?php if ($this -> get_option('fieldsintab') == "Y" && (!empty($product -> styles) || !empty($product -> cfields)) && !empty($product -> contents) && (is_array($product -> contents) || is_object($product -> contents))) : ?>
- <?php if ($this -> get_option('optionslinktb') == "B") : ?>
- <p class="<?php echo $this -> pre; ?>optionslink"><small><?php echo $wpcoHtml -> link(__('Choose product options/variations »', $this -> plugin_name), "#void", array('class' => "product-options-link")); ?></small></p>
- <?php endif; ?>
- <?php endif; ?>
- <?php else : ?>
- <p class="<?php echo $this -> pre; ?>oos"><?php echo $captions['product']['oos']; ?></p>
- <?php endif; ?>
- <p class="<?php echo $this -> pre; ?>error" id="message<?php echo $product -> id; ?>" style="display:none;"></p>
- <?php if (!empty($product -> contents) && (is_array($product -> contents) || is_object($product -> contents))) : ?>
- <?php $tabscount = 1; ?>
- <?php $tabscount2 = 1; ?>
- <div style="clear:both; display:block; height:1px; width:100%;"></div>
- <div id="tabs<?php echo $product -> id; ?>">
- <!-- BEG Tabs Menu -->
- <ul>
- <li><a href="#tabs<?php echo $product -> id; ?>-1"><?php _e('Description', $this -> plugin_name); ?></a></li>
- <?php $tabscount2++; ?>
- <?php foreach ($product -> contents as $content) : ?>
- <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php echo $content -> title; ?></a></li>
- <?php $tabscount2++; ?>
- <?php endforeach; ?>
- <?php if (empty($product -> oos) || $product -> oos == false) : ?>
- <?php if (!$this -> get_option('fieldsintab') || $this -> get_option('fieldsintab') == "Y") : ?>
- <?php if (!empty($product -> styles) || !empty($product -> cfields)) : ?>
- <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Options', $this -> plugin_name); ?></a></li>
- <?php $productoptionstab = $tabscount2; ?>
- <?php $tabscount2++; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (!$this -> get_option('gallerytab') || $this -> get_option('gallerytab') == "Y") : ?>
- <?php if (!empty($product -> images)) : ?>
- <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Gallery', $this -> plugin_name); ?></a></li>
- <?php $tabscount2++; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (!empty($product -> related) && $this -> get_option('relatedintab') == "Y") : ?>
- <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Related Products', $this -> plugin_name); ?></a></li>
- <?php $tabscount2++; ?>
- <?php endif; ?>
- </ul>
- <!-- END Tabs Menu -->
- <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
- <h3><?php _e('Description', $this -> plugin_name); ?></h3>
- <div>
- <?php echo wpautop(do_shortcode($product -> description)); ?>
- <?php if ($this -> get_option('unitextbox') == "Y") : ?>
- <?php $message = $this -> get_option('unitextboxmessage'); ?>
- <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
- <div class="<?php echo $this -> pre; ?>unitextbox">
- <?php echo $message; ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- </div>
- </div>
- <?php $tabscount++; ?>
- <?php foreach ($product -> contents as $content) : ?>
- <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
- <h3><?php echo $content -> title; ?></h3>
- <div>
- <?php echo wpautop(stripslashes(do_shortcode($content -> content))); ?>
- <?php if ($this -> get_option('unitextbox') == "Y") : ?>
- <?php $message = $this -> get_option('unitextboxmessage'); ?>
- <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
- <div class="<?php echo $this -> pre; ?>unitextbox">
- <?php echo $message; ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- </div>
- </div>
- <?php $tabscount++; ?>
- <?php endforeach; ?>
- <!-- BEG Custom Fields & Variations in Tab -->
- <?php if (empty($product -> oos) || $product -> oos == false) : ?>
- <?php if (!$this -> get_option('fieldsintab') || $this -> get_option('fieldsintab') == "Y") : ?>
- <?php if (!empty($product -> styles) || !empty($product -> cfields)) : ?>
- <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
- <h3><?php _e('Options', $this -> plugin_name); ?></h3>
- <div>
- <?php if (!empty($product -> styles) && !empty($product -> options)) : ?>
- <?php foreach ($product -> styles as $style_id) : ?>
- <?php $wpcoDb -> model = $Style -> model; ?>
- <?php if ($style = $wpcoDb -> find(array('id' => $style_id))) : ?>
- <?php echo $this -> render_style($style_id, $product -> options[$style_id], true, $product -> id); ?>
- <?php endif; ?>
- <?php endforeach; ?>
- <?php endif; ?>
- <?php if (!empty($product -> cfields)) : ?>
- <?php foreach ($product -> cfields as $field_id) : ?>
- <?php if (!empty($field_id)) : ?>
- <?php $wpcoDb -> model = $wpcoField -> model; ?>
- <?php if ($field = $wpcoDb -> find(array('id' => $field_id))) : ?>
- <?php $_POST[$field -> slug] = $_POST['Item'][$field -> slug]; ?>
- <?php $this -> render_field($field_id, true, false, $product -> id); ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php endforeach; ?>
- <?php endif; ?>
- <!-- <?php if ($this -> get_option('buynow') == "Y" || (!empty($product -> buynow) && $product -> buynow == "Y")) : ?>
- <p><?php echo $wpcoForm -> submit($product -> buttontext); ?></p>
- <?php else : ?>
- <p><?php echo $wpcoForm -> submit($product -> buttontext); ?></p>
- <?php endif; ?> -->
- <!-- Added here neha -->
- <?php if ($this -> get_option('buynow') == "Y" || (!empty($product -> buynow) && $product -> buynow == "Y")) : ?>
- <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
- <?php if (!empty($product -> affiliate) && $product -> affiliate == "Y") : ?>
- <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&id=' . $product -> id); ?>" title="<?php echo $product -> title; ?>"><?php echo $product -> buttontext; ?></a>
- <?php else : ?>
- <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>
- <?php endif; ?>
- <?php else : ?>
- <span id="submit<?php echo $product -> id; ?>"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
- <?php endif; ?>
- <?php else : ?>
- <?php if ($this -> get_option('loop_btntxt') == "txt") : ?>
- <?php if (!empty($product -> affiliate) && $product -> affiliate == "Y") : ?>
- <span id="submit<?php echo $product -> id; ?>"><a href="<?php echo $wpcoHtml -> retainquery($this -> pre . 'method=affiliate&id=' . $product -> id); ?>" class="<?php echo $this -> pre; ?>buylink" target="_<?php echo $product -> affiliatewindow; ?>" title="<?php echo $product -> title; ?>"><?php echo $product -> buttontext; ?></a>
- <?php else : ?>
- <?php if ($this -> get_option('cart_addajax') == "Y") : ?>
- <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 />
- <?php else : ?>
- <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>
- <?php endif; ?>
- <?php endif; ?>
- <?php else : ?>
- <?php /*<span id="submit<?php echo $product -> id; ?>" style="display:block;"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>*/ ?>
- <?php if ($this -> get_option('cart_addajax') == "Y") : ?>
- <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>
- <?php else : ?>
- <span id="submit<?php echo $product -> id; ?>" class="productsubmit productsubmitbutton"><?php echo $wpcoForm -> submit($product -> buttontext); ?></span>
- <?php endif; ?>
- <?php endif; ?>
- <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>
- <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>
- <?php endif; ?>
- <?php if ($this -> get_option('unitextbox') == "Y") : ?>
- <?php $message = $this -> get_option('unitextboxmessage'); ?>
- <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
- <div class="<?php echo $this -> pre; ?>unitextbox">
- <?php echo $message; ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- </div>
- </div>
- <?php $tabscount++; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php endif; ?>
- <!-- END Custom Fields & Variations in Tab -->
- <!-- BEG Gallery/extra Images in Tab -->
- <?php if (!$this -> get_option('gallerytab') || $this -> get_option('gallerytab') == "Y") : ?>
- <?php if (!empty($product -> images)) : ?>
- <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
- <h3><?php _e('Gallery', $this -> plugin_name); ?></h3>
- <div>
- <div class="<?php echo $this -> pre; ?>imglist <?php echo $this -> pre; ?>imglistfull">
- <ul>
- <?php foreach ($product -> images as $image) : ?>
- <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>
- <?php endforeach; ?>
- </ul>
- <br class="<?php echo $this -> pre; ?>cleaner" />
- </div>
- <?php if ($this -> get_option('unitextbox') == "Y") : ?>
- <?php $message = $this -> get_option('unitextboxmessage'); ?>
- <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
- <div class="<?php echo $this -> pre; ?>unitextbox">
- <?php echo $message; ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- </div>
- </div>
- <?php $tabscount++; ?>
- <?php endif; ?>
- <?php endif; ?>
- <!-- END Gallery/extra Images in Tab -->
- <!-- BEG Related Products in Tab -->
- <?php if (!empty($product -> related) && $this -> get_option('relatedintab') == "Y") : ?>
- <?php $rproducts = array(); ?>
- <?php foreach ($product -> related as $rproduct) : ?>
- <?php $wpcoDb -> model = $Product -> model; ?>
- <?php $rproducts[] = $wpcoDb -> find(array('id' => $rproduct -> related_id)); ?>
- <?php endforeach; ?>
- <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
- <h3 id="related"><?php _e('Related Products', $this -> plugin_name); ?></h3>
- <div>
- <?php $this -> render('products' . DS . 'loop', array('products' => $rproducts, 'related' => true, 'tabber' => true, 'noaddtob' => true), true, 'default'); ?>
- </div>
- </div>
- <?php $tabscount++; ?>
- <?php endif; ?>
- <!-- END Related Products in Tab -->
- </div>
- <!-- END Tabber -->
- <?php endif; ?>
- <?php if (empty($product -> oos) || $product -> oos == false) : ?>
- <?php if ($this -> get_option('buynow') == "Y" || (!empty($product -> buynow) && $product -> buynow == "Y")) : ?>
- <input type="hidden" name="buynow" value="Y" />
- <input type="hidden" name="fromproductpage" value="Y" />
- <?php endif; ?>
- </form>
- <?php endif; ?>
- <?php if ($this -> get_option('fieldsintab') == "Y" && (!empty($product -> styles) || !empty($product -> cfields)) && !empty($product -> contents) && (is_array($product -> contents) || is_object($product -> contents))) : ?>
- <?php if ($this -> get_option('optionslinktb') == "T") : ?>
- <fieldset class="<?php echo $this -> pre; ?> <?php echo $this -> pre; ?>optionslinkfieldset">
- <legend><?php _e('Product Options', $this -> plugin_name); ?></legend>
- <span class="<?php echo $this -> pre; ?>optionslink"><?php echo $wpcoHtml -> link(__('Click for Options »', $this -> plugin_name), "#void", array('class' => "product-options-link")); ?></span>
- </fieldset>
- <?php endif; ?>
- <?php endif; ?>
- <?php else : ?>
- <!-- SHOWCASE -->
- <?php $showcasemsg = $this -> get_option('showcasemsg'); ?>
- <p><?php echo (empty($product -> showcasemsg)) ? $showcasemsg : $product -> showcasemsg; ?></p>
- <?php if (!empty($product -> contents) && (is_array($product -> contents) || is_object($product -> contents))) : ?>
- <?php $tabscount = 1; ?>
- <?php $tabscount2 = 1; ?>
- <div style="clear:both; display:block; height:1px; width:100%;"></div>
- <div id="tabs<?php echo $product -> id; ?>">
- <!-- BEG Tabs Menu -->
- <ul>
- <li><a href="#tabs<?php echo $product -> id; ?>-1"><?php _e('Description', $this -> plugin_name); ?></a></li>
- <?php $tabscount2++; ?>
- <?php foreach ($product -> contents as $content) : ?>
- <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php echo $content -> title; ?></a></li>
- <?php $tabscount2++; ?>
- <?php endforeach; ?>
- <?php if (!$this -> get_option('gallerytab') || $this -> get_option('gallerytab') == "Y") : ?>
- <?php if (!empty($product -> images)) : ?>
- <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Gallery', $this -> plugin_name); ?></a></li>
- <?php $tabscount2++; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (!empty($product -> related) && $this -> get_option('relatedintab') == "Y") : ?>
- <li><a href="#tabs<?php echo $product -> id; ?>-<?php echo $tabscount2; ?>"><?php _e('Related Products', $this -> plugin_name); ?></a></li>
- <?php $tabscount2++; ?>
- <?php endif; ?>
- </ul>
- <!-- END Tabs Menu -->
- <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
- <h3><?php _e('Description', $this -> plugin_name); ?></h3>
- <div>
- <?php echo wpautop(do_shortcode($product -> description)); ?>
- <?php if ($this -> get_option('unitextbox') == "Y") : ?>
- <?php $message = $this -> get_option('unitextboxmessage'); ?>
- <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
- <div class="<?php echo $this -> pre; ?>unitextbox">
- <?php echo $message; ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- </div>
- </div>
- <?php $tabscount++; ?>
- <?php foreach ($product -> contents as $content) : ?>
- <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
- <h3><?php echo $content -> title; ?></h3>
- <div>
- <?php echo wpautop(stripslashes(do_shortcode($content -> content))); ?>
- <?php if ($this -> get_option('unitextbox') == "Y") : ?>
- <?php $message = $this -> get_option('unitextboxmessage'); ?>
- <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
- <div class="<?php echo $this -> pre; ?>unitextbox">
- <?php echo $message; ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- </div>
- </div>
- <?php $tabscount++; ?>
- <?php endforeach; ?>
- <!-- GALLERY IN TAB -->
- <?php if (!$this -> get_option('gallerytab') || $this -> get_option('gallerytab') == "Y") : ?>
- <?php if (!empty($product -> images)) : ?>
- <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
- <h3><?php _e('Gallery', $this -> plugin_name); ?></h3>
- <div>
- <div class="<?php echo $this -> pre; ?>imglist <?php echo $this -> pre; ?>imglistfull">
- <ul>
- <?php foreach ($product -> images as $image) : ?>
- <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>
- <?php endforeach; ?>
- </ul>
- <br class="<?php echo $this -> pre; ?>cleaner" />
- </div>
- <?php if ($this -> get_option('unitextbox') == "Y") : ?>
- <?php $message = $this -> get_option('unitextboxmessage'); ?>
- <?php if (!empty($message) && $this -> get_option('unitextboxintabs') == "Y") : ?>
- <div class="<?php echo $this -> pre; ?>unitextbox">
- <?php echo $message; ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- </div>
- </div>
- <?php $tabscount++; ?>
- <?php endif; ?>
- <?php endif; ?>
- <!-- RELATED PRODUCTS -->
- <?php if (!empty($product -> related) && $this -> get_option('relatedintab') == "Y") : ?>
- <?php $rproducts = array(); ?>
- <?php foreach ($product -> related as $rproduct) : ?>
- <?php $wpcoDb -> model = $Product -> model; ?>
- <?php $rproducts[] = $wpcoDb -> find(array('id' => $rproduct -> related_id)); ?>
- <?php endforeach; ?>
- <div id="tabs<?php echo $product -> id; ?>-<?php echo $tabscount; ?>">
- <h3 id="related"><?php _e('Related Products', $this -> plugin_name); ?></h3>
- <div>
- <?php $this -> render('products' . DS . 'loop', array('products' => $rproducts, 'related' => true, 'tabber' => true, 'noaddtob' => true), true, 'default'); ?>
- </div>
- </div>
- <?php $tabscount++; ?>
- <?php endif; ?>
- </div>
- <!-- END TABBER -->
- <?php endif; ?>
- <?php endif; ?>
- <?php if (!empty($product -> categories) && $this -> get_option('product_showcategories') == "Y") : ?>
- <fieldset class="<?php echo $this -> pre; ?>">
- <?php if (count($product -> categories) == 1) : ?>
- <legend><?php echo $captions['product']['category']; ?></legend>
- <?php else : ?>
- <legend><?php echo $captions['product']['categories']; ?></legend>
- <?php endif; ?>
- <?php $c = 1; ?>
- <?php foreach ($product -> categories as $category_id) : ?>
- <?php $wpcoDb -> model = $Category -> model; ?>
- <?php if ($category = $wpcoDb -> find(array('id' => $category_id))) : ?>
- <a href="<?php echo get_permalink($category -> post_id); ?>" title="<?php echo $category -> title; ?>"><?php echo $category -> title; ?></a>
- <?php echo ($c < count($product -> categories)) ? ', ' : ''; ?>
- <?php endif; ?>
- <?php $c++; ?>
- <?php endforeach; ?>
- </fieldset>
- <?php endif; ?>
- <?php if ($this -> get_option('unitextbox') == "Y" && $this -> get_option('unitextfieldset') == "Y") : ?>
- <?php $message = $this -> get_option('unitextboxmessage'); ?>
- <?php if (!empty($message)) : ?>
- <fieldset class="<?php echo $this -> pre; ?>">
- <legend><?php _e('Attention', $this -> plugin_name); ?></legend>
- <div class="<?php echo $this -> pre; ?>unitextbox">
- <?php echo $message; ?>
- </div>
- </fieldset>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (!empty($product -> supplier_id) && $this -> get_option('hidesuppliers') == "N") : ?>
- <fieldset class="<?php echo $this -> pre; ?>">
- <legend><?php echo $captions['product']['supplier']; ?></legend>
- <?php if ($this -> get_option('supplierpages') == "Y" && !empty($product -> supplier -> post_id)) : ?>
- <?php if ($product -> supplier -> image == "Y" && !empty($product -> supplier -> imagename)) : ?>
- <?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)); ?>
- <?php else : ?>
- <?php echo $wpcoHtml -> link($product -> supplier -> name, get_permalink($product -> supplier -> post_id), array('title' => $product -> supplier -> name)); ?>
- <?php endif; ?>
- <?php else : ?>
- <?php echo $product -> supplier -> name; ?>
- <?php endif; ?>
- </fieldset>
- <?php endif; ?>
- <?php if (!empty($product -> kws) && is_array($product -> kws) && $this -> get_option('product_showkeywords') == "Y") : ?>
- <fieldset class="<?php echo $this -> pre; ?>">
- <legend><?php echo $captions['product']['keywords']; ?></legend>
- <div class="<?php echo $this -> pre; ?>keywords">
- <?php $k = 1; ?>
- <?php foreach ($product -> kws as $kw) : ?>
- <?php echo $wpcoHtml -> link($kw, rtrim(get_permalink($this -> get_option('allproductsppid')), '/') . '/?' . $this -> pre . 'searchterm=' . urlencode($kw), array('title' => $kw)); ?>
- <?php echo ($k < count($product -> kws)) ? ', ' : ''; ?>
- <?php $k++; ?>
- <?php endforeach; ?>
- </div>
- </fieldset>
- <?php endif; ?>
- <?php if (!empty($product -> min_order)) : ?>
- <fieldset class="<?php echo $this -> pre; ?>">
- <legend><?php _e('Minimum Order', $this -> plugin_name); ?></legend>
- <?php echo $product -> min_order; ?> <?php _e('units', $this -> plugin_name); ?>
- </fieldset>
- <?php endif; ?>
- <?php if ($this -> get_option('unitextbox') == "Y") : ?>
- <?php $message = $this -> get_option('unitextboxmessage'); ?>
- <?php if (!empty($message)) : ?>
- <div class="<?php echo $this -> pre; ?>unitextbox">
- <?php echo $message; ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- <?php if ($this -> get_option('product_descriptionposition') == "below") : ?>
- <?php if (empty($product -> contents) || !is_array($product -> contents)) : ?>
- <?php echo wpautop(do_shortcode($product -> description)); ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (!empty($product -> related) && ($this -> get_option('relatedintab') == "N" || empty($product -> contents))) : ?>
- <br class="<?php echo $this -> pre; ?>cleaner" />
- <?php $rproducts = array(); ?>
- <?php foreach ($product -> related as $rproduct) : ?>
- <?php $wpcoDb -> model = $Product -> model; ?>
- <?php $rproducts[] = $wpcoDb -> find(array('id' => $rproduct -> related_id)); ?>
- <?php endforeach; ?>
- <h3 id="related"><?php _e('Related Products', $this -> plugin_name); ?></h3>
- <?php $this -> render('products' . DS . 'loop', array('products' => $rproducts, 'related' => true, 'tabber' => false), true, 'default'); ?>
- <?php endif; ?>
- </div>
- <?php if (!is_feed()) : ?>
- <script type="text/javascript">
- <?php if ($tabscount > 1) : ?>
- jQuery(document).ready(function() {
- $tabs = jQuery('#tabs<?php echo $product -> id; ?>').tabs();
- jQuery('.product-options-link').click(function() {
- wpco_scroll(jQuery('#tabs<?php echo $product -> id; ?>'));
- $tabs.tabs('select', '<?php echo $productoptionstab; ?>');
- return false;
- });
- });
- <?php endif; ?>
- </script>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment