<?php
/**
* The Template for displaying all single products.
*
* Override this template by copying it to yourtheme/woocommerce/single-product.php
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
get_header('shop'); ?>
<div class="inner_container">
<div class="left_col">
<dl>
<dt><a href="http://localhost/roma/?page_id=37">New Arrivals</a></dt>
<dd id="Section1">
<p>
Lorem ipsum
</p>
</dd>
<?PHP $args = array( 'taxonomy' => 'product_cat','hide_empty' => 0,'parent' =>'0', 'order' =>'ASC', 'orderby' => 'term_id');
$terms = get_terms('product_cat', $args);
$count = count($terms); $i=2;
foreach ($terms as $term) {
@$catlnk=get_term_link($term,'product_cat');
$args = array( 'taxonomy' => 'product_cat','hide_empty' => 0,'parent' =>$term->term_id, 'order' =>'ASC', 'orderby' => 'term_id');
$termsub = get_terms('product_cat', $args);
$countsub = count($termsub);
?>
<dt><a href="<?PHP if($countsub != "0") {?>#Section<?PHP echo @$i; } else { echo $catlnk; }?>"><?PHP echo $term->name;?></a></dt>
<?PHP if($countsub != "0") { ?>
<dd id="Section<?PHP echo @$i;?>">
<?PHP foreach ($termsub as $termsb) {
@$scatlnk=get_term_link($termsb,'product_cat');
?><p>
<a href="<?PHP echo @$scatlnk;?>"><?PHP echo $termsb->name;?></a>
</p>
<?PHP } ?>
</dd>
<?PHP } $i++; } ?>
</dl>
</div>
<div class="rt_col">
<div class="breadcrumbs">
<?PHP do_action('woocommerce_before_main_content');
?>
</div>
<?php while ( have_posts() ) : the_post(); ?>
<h1 class="prod_det_tit"><?PHP the_title();?></h1>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'></script>
<script type="text/javascript">
function showT( image )
{
document.getElementById( 'ima' ).setAttribute('src',image )
}
</script>
<script>
$(function() {
$("#example-one").organicTabs();
$("#example-two").organicTabs({
"speed": 200
});
});
</script> <div class="large_product">
<?PHP if ( has_post_thumbnail() ) {
$image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );
$image_link = wp_get_attachment_url( get_post_thumbnail_id() );
$image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array(
'title' => $image_title
) );
$attachment_count = count( $product->get_gallery_attachment_ids() );
if ( $attachment_count > 0 ) {
$gallery = '[product-gallery]';
} else {
$gallery = '';
}
echo get_the_post_thumbnail( $post->ID, apply_filters( 'roma-product-600', 'shop_single' ), array(
'id' => 'ima'
) );
?>
<!--<img id="ima" src="<?PHP echo $image_link ;?>" width="600">-->
<?PHP } else {
echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<img src="%s" alt="Placeholder" />', woocommerce_placeholder_img_src() ), $post->ID );
} ?>
<div class="large_product_price">N31,000</div>
<div class="gift_bot"></div>
<div class="thumbs_list">
<?PHP
$attachment_ids = $product->get_gallery_attachment_ids();
if ( $attachment_ids ) {
?><ul><?php
$loop = 0;
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 3 );
foreach ( $attachment_ids as $attachment_id ) {
$classes = array( 'zoom' );
if ( $loop == 0 || $loop % $columns == 0 )
$classes[] = 'first';
if ( ( $loop + 1 ) % $columns == 0 )
$classes[] = 'last';
$image_link = wp_get_attachment_url( $attachment_id );
if ( ! $image_link )
continue;
$image = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) );
$image_class = esc_attr( implode( ' ', $classes ) );
$image_title = esc_attr( get_the_title( $attachment_id ) );
?>
<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>
<?PHP
$loop++;
}
?>
</ul>
<?PHP } ?>
</div>
</div>
<?php //woocommerce_get_template_part( 'content', 'single-product' ); ?>
<?php endwhile; // end of the loop. ?>
<?php
/**
* woocommerce_after_main_content hook
*
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
*/
do_action('woocommerce_after_main_content');
?>
<div class="socialsharing">
<!-- AddThis Button BEGIN -->
<div class="pint_icon" >
<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">
<img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>
</div>
<div class="social_tweet" >
<a href="https://twitter.com/share" class="twitter-share-button" data-related="jasoncosta" data-lang="en" data-url="<?php the_permalink(); ?>" >Tweet</a>
</div>
<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>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<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>
<!-- AddThis Button END -->
</div>
<div class="tabular" id="page-wrap">
<div id="example-two">
<ul class="nav">
<li class="nav-one"><a href="#one" class="current">PRODUCT DESCRIPTION</a></li>
<li class="nav-two"><a href="#two">CONTACT DETAILS</a></li>
</ul>
<div class="list-wrap">
<div class="tab_content" id="one">
<?php the_content(); ?>
<div class="product_number">
<strong>Product Number:</strong> <?php echo $product->get_sku(); ?><br>
<strong>Sizes Available:</strong> N/A
<?php $product->list_attributes(); ?>
</div>
<ul>
<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&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">
if( !jQuery( '#yith-wcwl-popup-message' ).length ) {
jQuery( 'body' ).prepend(
'<div id="yith-wcwl-popup-message" style="display:none;">' +
'<div id="yith-wcwl-message"></div>' +
'</div>'
);
}
</script></li>
<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>
<li><A HREF="javascript:window.print()"><span id="icon_print"></span>Print</a></li>
</ul>
</div>
<div id="two" class="tab_content hide">
content hje weasdf sadf sadfsfdsd
</div>
</div> <!-- END List Wrap -->
</div> <!-- END Organic Tabs (Example One) -->
<p> </p>
</div>
<?php
/**
* woocommerce_after_single_product_summary hook
*
* @hooked woocommerce_output_product_data_tabs - 10
* @hooked woocommerce_output_related_products - 20
*/
//do_action( 'woocommerce_after_single_product_summary' );
?>
</div>
</div>
</div>
<?php get_footer('shop'); ?>