Advertisement
Guest User

romafruits

a guest
Jan 10th, 2014
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.27 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Template for displaying all single products.
  4. *
  5. * Override this template by copying it to yourtheme/woocommerce/single-product.php
  6. *
  7. * @author WooThemes
  8. * @package WooCommerce/Templates
  9. * @version 1.6.4
  10. */
  11.  
  12. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  13.  
  14. get_header('shop'); ?>
  15. <div class="inner_container">
  16. <div class="left_col">
  17.  
  18. <dl>
  19. <dt><a href="http://localhost/roma/?page_id=37">New Arrivals</a></dt>
  20. <dd id="Section1">
  21. <p>
  22. Lorem ipsum
  23. </p>
  24. </dd>
  25. <?PHP $args = array( 'taxonomy' => 'product_cat','hide_empty' => 0,'parent' =>'0', 'order' =>'ASC', 'orderby' => 'term_id');
  26. $terms = get_terms('product_cat', $args);
  27. $count = count($terms); $i=2;
  28.  
  29. foreach ($terms as $term) {
  30. @$catlnk=get_term_link($term,'product_cat');
  31.  
  32. $args = array( 'taxonomy' => 'product_cat','hide_empty' => 0,'parent' =>$term->term_id, 'order' =>'ASC', 'orderby' => 'term_id');
  33. $termsub = get_terms('product_cat', $args);
  34. $countsub = count($termsub);
  35.  
  36.  
  37. ?>
  38. <dt><a href="<?PHP if($countsub != "0") {?>#Section<?PHP echo @$i; } else { echo $catlnk; }?>"><?PHP echo $term->name;?></a></dt>
  39. <?PHP if($countsub != "0") { ?>
  40. <dd id="Section<?PHP echo @$i;?>">
  41. <?PHP foreach ($termsub as $termsb) {
  42. @$scatlnk=get_term_link($termsb,'product_cat');
  43. ?><p>
  44. <a href="<?PHP echo @$scatlnk;?>"><?PHP echo $termsb->name;?></a>
  45. </p>
  46. <?PHP } ?>
  47. </dd>
  48. <?PHP } $i++; } ?>
  49.  
  50.  
  51.  
  52. </dl>
  53.  
  54. </div>
  55.  
  56. <div class="rt_col">
  57. <div class="breadcrumbs">
  58. <?PHP do_action('woocommerce_before_main_content');
  59. ?>
  60. </div>
  61. <?php while ( have_posts() ) : the_post(); ?>
  62. <h1 class="prod_det_tit"><?PHP the_title();?></h1>
  63.  
  64. <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'></script>
  65.  
  66.  
  67. <script type="text/javascript">
  68. function showT( image )
  69. {
  70. document.getElementById( 'ima' ).setAttribute('src',image )
  71. }
  72.  
  73. </script>
  74. <script>
  75. $(function() {
  76.  
  77. $("#example-one").organicTabs();
  78.  
  79. $("#example-two").organicTabs({
  80. "speed": 200
  81. });
  82.  
  83. });
  84. </script> <div class="large_product">
  85. <?PHP if ( has_post_thumbnail() ) {
  86.  
  87. $image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );
  88. $image_link = wp_get_attachment_url( get_post_thumbnail_id() );
  89. $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array(
  90. 'title' => $image_title
  91. ) );
  92. $attachment_count = count( $product->get_gallery_attachment_ids() );
  93.  
  94. if ( $attachment_count > 0 ) {
  95. $gallery = '[product-gallery]';
  96. } else {
  97. $gallery = '';
  98. }
  99.  
  100. echo get_the_post_thumbnail( $post->ID, apply_filters( 'roma-product-600', 'shop_single' ), array(
  101. 'id' => 'ima'
  102. ) );
  103. ?>
  104. <!--<img id="ima" src="<?PHP echo $image_link ;?>" width="600">-->
  105. <?PHP } else {
  106.  
  107. echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<img src="%s" alt="Placeholder" />', woocommerce_placeholder_img_src() ), $post->ID );
  108.  
  109. } ?>
  110.  
  111. <div class="large_product_price">N31,000</div>
  112. <div class="gift_bot"></div>
  113. <div class="thumbs_list">
  114. <?PHP
  115. $attachment_ids = $product->get_gallery_attachment_ids();
  116. if ( $attachment_ids ) {
  117. ?><ul><?php
  118.  
  119. $loop = 0;
  120. $columns = apply_filters( 'woocommerce_product_thumbnails_columns', 3 );
  121.  
  122. foreach ( $attachment_ids as $attachment_id ) {
  123.  
  124. $classes = array( 'zoom' );
  125.  
  126. if ( $loop == 0 || $loop % $columns == 0 )
  127. $classes[] = 'first';
  128.  
  129. if ( ( $loop + 1 ) % $columns == 0 )
  130. $classes[] = 'last';
  131.  
  132. $image_link = wp_get_attachment_url( $attachment_id );
  133.  
  134. if ( ! $image_link )
  135. continue;
  136.  
  137. $image = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) );
  138. $image_class = esc_attr( implode( ' ', $classes ) );
  139. $image_title = esc_attr( get_the_title( $attachment_id ) );
  140.  
  141. ?>
  142. <li class="current"><a href="#" onmouseover="showT( '<?PHP echo $image_link;?>' )"><img src="<?PHP echo $image_link;?>" width="50" height="50" align="middle"></a></li>
  143. <?PHP
  144. $loop++;
  145. }
  146.  
  147. ?>
  148. </ul>
  149. <?PHP } ?>
  150. </div>
  151. </div>
  152.  
  153.  
  154. <?php //woocommerce_get_template_part( 'content', 'single-product' ); ?>
  155. <?php endwhile; // end of the loop. ?>
  156.  
  157. <?php
  158. /**
  159. * woocommerce_after_main_content hook
  160. *
  161. * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
  162. */
  163. do_action('woocommerce_after_main_content');
  164.  
  165.  
  166. ?>
  167. <div class="socialsharing">
  168. <!-- AddThis Button BEGIN -->
  169. <div class="pint_icon" >
  170.  
  171. <a href="http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?PHP echo $image_link ;?>&description=<?php the_title(); ?>" class="pin-it-button" count-layout="none">
  172.  
  173. <img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>
  174.  
  175.  
  176. </div>
  177. <div class="social_tweet" >
  178. <a href="https://twitter.com/share" class="twitter-share-button" data-related="jasoncosta" data-lang="en" data-url="<?php the_permalink(); ?>" >Tweet</a>
  179. </div>
  180. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  181.  
  182. <div id="fb-root"></div>
  183. <script>(function(d, s, id) {
  184. var js, fjs = d.getElementsByTagName(s)[0];
  185. if (d.getElementById(id)) return;
  186. js = d.createElement(s); js.id = id;
  187. js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  188. fjs.parentNode.insertBefore(js, fjs);
  189. }(document, 'script', 'facebook-jssdk'));</script>
  190. <div class="fb-like" data-href="http://www.facebook.com/sharer/sharer.php?s=100&p[url]=<?php the_permalink(); ?>&p[images][0]=<?php echo $featured_image_url[0]; ?>&p[title]=<?php the_title(); ?>&p[summary]=<?php echo $post->post_excerpt; ?>" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false" ></div>
  191.  
  192. <!-- AddThis Button END -->
  193. </div>
  194. <div class="tabular" id="page-wrap">
  195.  
  196.  
  197.  
  198. <div id="example-two">
  199.  
  200. <ul class="nav">
  201. <li class="nav-one"><a href="#one" class="current">PRODUCT DESCRIPTION</a></li>
  202. <li class="nav-two"><a href="#two">CONTACT DETAILS</a></li>
  203.  
  204. </ul>
  205.  
  206. <div class="list-wrap">
  207.  
  208. <div class="tab_content" id="one">
  209. <?php the_content(); ?>
  210. <div class="product_number">
  211. <strong>Product Number:</strong> <?php echo $product->get_sku(); ?><br>
  212. <strong>Sizes Available:</strong> N/A
  213. <?php $product->list_attributes(); ?>
  214.  
  215. </div>
  216. <ul>
  217. <li><div class="yith-wcwl-add-to-wishlist"><div class="yith-wcwl-add-button show"><a href="http://localhost/roma/wp-content/plugins/yith-woocommerce-wishlist/yith-wcwl-ajax.php?action=add_to_wishlist&amp;add_to_wishlist=66" data-product-id="66" data-product-type="simple" class="add_to_wishlist"><span id="icon_wl"></span>Add to Wishlist</a><img src="http://localhost/roma/wp-admin/images/wpspin_light.gif" class="ajax-loading" id="add-items-ajax-loading" alt="" style="visibility:hidden" width="16" height="16"></div><div class="yith-wcwl-wishlistaddedbrowse hide" style="display: none; position: relative; top: 0px; left: 0px;"><span class="feedback">Product added!</span> <a href="http://localhost/roma/?product=serenity-dinnerware">Browse Wishlist</a></div><div class="yith-wcwl-wishlistexistsbrowse hide" style="display: none; position: relative; top: 0px; left: 0px;"><span class="feedback">The product is already in the wishlist!</span> <a href="http://localhost/roma/?product=serenity-dinnerware">Browse Wishlist</a></div><div style="clear:both"></div><div class="yith-wcwl-wishlistaddresponse"></div></div><div class="clear"></div> <script type="text/javascript">
  218. if( !jQuery( '#yith-wcwl-popup-message' ).length ) {
  219. jQuery( 'body' ).prepend(
  220. '<div id="yith-wcwl-popup-message" style="display:none;">' +
  221. '<div id="yith-wcwl-message"></div>' +
  222. '</div>'
  223. );
  224. }
  225. </script></li>
  226. <li><A HREF="mailto:?subject=look at this website&body=Hi, I found this website and thought you might like it <?php the_permalink(); ?>"><span id="icon_email"></span>Email</a></li>
  227. <li><A HREF="javascript:window.print()"><span id="icon_print"></span>Print</a></li>
  228. </ul>
  229.  
  230. </div>
  231.  
  232. <div id="two" class="tab_content hide">
  233. content hje weasdf sadf sadfsfdsd
  234.  
  235. </div>
  236.  
  237.  
  238.  
  239. </div> <!-- END List Wrap -->
  240.  
  241. </div> <!-- END Organic Tabs (Example One) -->
  242.  
  243. <p>&nbsp;</p>
  244.  
  245.  
  246.  
  247. </div>
  248.  
  249.  
  250. <?php
  251. /**
  252. * woocommerce_after_single_product_summary hook
  253. *
  254. * @hooked woocommerce_output_product_data_tabs - 10
  255. * @hooked woocommerce_output_related_products - 20
  256. */
  257. //do_action( 'woocommerce_after_single_product_summary' );
  258. ?>
  259.  
  260. </div>
  261. </div>
  262.  
  263. </div>
  264. <?php get_footer('shop'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement