File: /virtual/nagasaki/public_html/shop/wp-content/themes/riffles_ver1.1/thumbnail-box.php
<?php
/**
* @package Riffles
* @link http://www.u-hg.com/
* @author RiffleHatch
* @copyright Copyright (c)2014 RiffleHatch
*/
?>
<?php if(function_exists('usces_the_item')): ?>
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product">
<?php usces_the_item(); usces_have_skus(); ?>
<a itemprop="url" href="<?php the_permalink(); ?>">
<article class="thumbnail-box">
<?php global $usces;
$post_id = $post->ID;
$code = get_post_meta($post_id, '_itemCode', true);
$pictid = (int)$usces->get_mainpictid($code);
?>
<?php if (isset($_COOKIE["imgswitch"])): ?>
<?php $image_src = wp_get_attachment_image_src( $pictid,array(600,600) );
echo '<img itemprop="image" src="'.$image_src[0].'" alt="'.esc_attr($code).'" width="'.$image_src[1].'" height="'.$image_src[2].'"/>' ;
?>
<?php elseif (is_mymobile()): ?>
<?php $image_src = wp_get_attachment_image_src( $pictid,array(150,150) );
echo '<img itemprop="image" src="'.$image_src[0].'" alt="'.esc_attr($code).'" width="'.$image_src[1].'" height="'.$image_src[2].'"/>' ;
?>
<?php else: ?>
<?php $image_src = wp_get_attachment_image_src( $pictid,array(292,292) );
echo '<img itemprop="image" src="'.$image_src[0].'" alt="'.esc_attr($code).'" width="'.$image_src[1].'" height="'.$image_src[2].'"/>' ;
?>
<?php endif; ?>
<h2 itemprop="name"><?php usces_the_itemName(); ?></h2>
<p class="price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price"><?php usces_the_itemPriceCr(); ?></span>
<?php usces_guid_tax(); ?>
<?php if(!usces_have_zaiko_anyone()): ?>
<?php
$status = usces_get_itemZaiko( 'id' );
switch( $status ){
case 2:
echo '<span class="soldout">'.__("Sold Out", "usces").'</span>' ;
break;
case 3:
echo '<span class="soldout">'.__("Out Of Stock", "usces").'</span>' ;
break;
}
?></p>
<?php endif; ?>
</article></a>
</li>
<?php endif; ?>