var date1 = new Date();
var date2 = new Date('30.10.2015 19:53');
$data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
Добавить после:$data['discount_amount'] = $this->currency->format($this->tax->calculate(($product_info['price'] - $product_info['special']), $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
<li>
<h2><?php echo $special; ?></h2>
</li>
Добавить после:<li class="discount_amount">
<?php echo 'Вы экономите '.$discount_amount; ?>
</li>
$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
Добавить после:$discount_amount = $this->currency->format($this->tax->calculate(($result['price'] - $result['special']), $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
Найти:'price' => $price,
'special' => $special,
Добавить после:'discount_amount' => $discount_amount,
<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>
Добавить после:<span class="discount_amount"><?php echo 'Вы экономите '.$product['discount_amount']; ?></span>
return 301 https://$server_name$request_uri;
location / {
try_files $uri $uri/ /index.php?$args;
}
location / {
...
location / {
try_files $uri $uri/ /index.php?$args;
}
...
}
server {
# Слушаем 80й порт
listen 80;
# Обслуживаем доменное имя, www тут же слушать не надо - будут дубликаты контента, печаль для SEO
server_name example.com;
# Корневая директория проекта
root /var/www/example.com/httpdocs;
# Индексы
index index.php index.html;
# Обработка запросов
# $uri - существует ли конкретный файл
# $uri/ - существует ли директория
# /index.php?$args - если это не запрос на существующий файл или директорию, то перебрасываем на роутер WordPress (это и есть то, что надо для пермалинков)
location / {
try_files $uri $uri/ /index.php?$args;
}
# Обрабатываем PHP
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass unix:/var/run/php5-fpm.sock; # или php7.0-fpm.sock
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Все остальное
# Запрещаем доступ к .htaccess
location ~ /\.ht {
deny all;
}
# Просим кешировать статику на Х дней, не писать в логи
location ~*
^.+\.(js|css|swf|xml|txt|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
log_not_found off;
expires 30d;
}
}
# Отдельно слушаем домен с www и редиректим на основной
server {
# Слушаем 80й порт
listen 80;
# Обслуживаем доменное имя c www
server_name www.example.com;
# Отправляем запрос на основной домен
return 301 $scheme://example.com$request_uri;
}
Кто что посоветует?
<ul class="products">
<?php
$product_ids_on_sale = wc_get_product_ids_on_sale();
$args = array(
'post_type' => 'product',
'post__in' => array_merge( array( 0 ), $product_ids_on_sale )
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) {
while ( $loop->have_posts() ) : $loop->the_post();
wc_get_template_part( 'content', 'product' );
endwhile;
} else {
echo __( 'Продуктов не найдено' );
}
wp_reset_postdata();
?>
</ul><!--/.products-->
require_once('fpdf.php');
require_once('fpdi.php');
$pdf =& new FPDI();
$pages_count = $pdf->setSourceFile('your_file.pdf');
for($i = 1; $i <= $pages_count; $i++)
{
$pdf->AddPage();
$tplIdx = $pdf->importPage($i);
$pdf->useTemplate($tplIdx, 0, 0);
$pdf->SetFont('Arial');
$pdf->SetTextColor(255,0,0);
$pdf->SetXY(25, 25);
$pdf->Write(0, "This is just a simple text");
}
$(function(){
$('.your-class').slick({
slidesToShow: 4,
slidesToScroll: 1,
appendArrows: $('.your-class-arrow'),
prevArrow: '<button id="prev" type="button" class="btn btn-juliet"><i class="fa fa-chevron-left" aria-hidden="true"></i> Туда</button>',
nextArrow: '<button id="next" type="button" class="btn btn-juliet">Сюда <i class="fa fa-chevron-right" aria-hidden="true"></i></button>'
});
});
<div class="your-class">
<div>your content</div>
<div>your content</div>
<div>your content</div>
</div>
<div class="your-class-arrow"></div>