<?php
/**
* The template for displaying product content in the single-product.php template
*
* This template can be overridden by copying it to yourtheme/woocommerce/content-single-product.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woothemes.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<?php
global $product;
?>
<div class="item_card_block">
<div class="container">
<div class="item_card">
<?php get_template_part("parts/bread");?>
<h4 class="title"><?php the_title();?></h4>
<div class="item_card_box">
<div class="item_card_images ">
<?php
$attachment_ids = $product->get_gallery_attachment_ids();
$big="";
$small="";
if($attachment_ids)
{
foreach ( $attachment_ids as $attachment_id )
{
$image_link = wp_get_attachment_url( $attachment_id );
$big.='<div class="item_card_big_bitch">
<img src="'.$image_link.'" alt="">
</div>';
$small.='<div class="item_card_small_bitch">
<img src="'.$image_link.'" alt="">
</div>';
}
?>
<div class="item_card_big slider-for">
<?php echo $big;?>
</div>
<div class="item_card_small slider-nav">
<?php echo $small;?>
</div>
<?php
}
else
{
?>
<div class="item_card_big slider-for">
<?php echo thumb(get_the_ID(),"full");?>
</div>
<?php
}
?>
</div>
<div class="item_card_description">
<div class="item_card_title">
<h5><?php the_title();?></h5>
<p><?php
if ( $product->is_in_stock() )
{
echo'В наличии';
}
else
echo'Нет в наличии';
?> </p>
</div>
<div class="item_card_tab">
<div class="item_card_description_head">
<ul>
<li data-tab="tab1"><a href="javascript:void(0)">Описание товара</a></li>
<li data-tab="tab2" class="more_delivery"><a href="javascript:void(0)">Доставка и оплата</a></li>
</ul>
</div>
<div class="item_card_description_body">
<div class="icd" id="tab1">
<?php the_content();?>
<div class="item_card_description_price">
<?php
if($product->is_on_sale())
{
echo'<span>'.$product->get_regular_price().'</span>';
echo'<h6>'.$product->get_sale_price().' руб</h6>';
}
else
echo'<h6>'.$product->get_regular_price().' руб</h6>';
?>
<!--Вот тут напиример вывести вариацию, если она есть, которая в свою очередь влияла бы на цену-->
</div>
<div class="btn_more addtocart">
<p><a data-id="<?php echo get_the_ID();?>" href="<?php echo $product->add_to_cart_url();?>">Добавить в корзину</a></p>
</div>
</div>
<div class="icd" id="tab2">
<h5>Способы доставки</h5>
<ul>
<li>— курьером по Новосибирску</li>
<li>— почтой России</li>
<li>— курьерской службой ПЭК</li>
</ul>
<h5>Способы оплаты</h5>
<ul>
<li>— банковской картой на сайте</li>
<li>— банковским переводом</li>
<li>— наличными при получении</li>
</ul>
<p><a href="<?php bloginfo('url');?>/dostavka-i-oplata/" target="_blank">Подробнее о доставке и оплате</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
<?php get_template_part("parts/related");?>
</div>
</div>
<?php get_template_part("parts/delivery_block");?>
<?php get_template_part("parts/before_footer");?>
Линия 104...