Co-authored-by: Andrei <fcs.andrew@gmail.com> Reviewed-on: #35pull/36/head
parent
e1542909fa
commit
348c9bbf68
@ -0,0 +1,48 @@ |
||||
<div class="modal__item modal__to-know modal__item--no-title"> |
||||
<button class="modal__close"> |
||||
<img src="/wp-content/themes/cosmopet/static/img/svg/main/black-x.svg" alt=""> |
||||
</button> |
||||
<div class="modal__header"> |
||||
<p class="modal__small-title">{{ fn ('pll_e', 'Узнать о поступлении') }}</p> |
||||
<p class="modal__text"> |
||||
{{ fn ('pll_e', 'Оставьте свой e-mail, и мы оповестим вас, когда продукт появится') }} |
||||
</p> |
||||
|
||||
<form action="" class="modal__form-sub"> |
||||
<div class="label"> |
||||
<label for="mail" class="label__title"> |
||||
{{ fn ('pll_e', 'mail') }} |
||||
</label> |
||||
</div> |
||||
<input type="hidden" name="sub_product" value="" id="sub_product_name"> |
||||
<input type="hidden" name="action" value="to_know_form"> |
||||
<input type="text" class="form__input" id="mail" placeholder="Email"> |
||||
<div class="checkbox checkbox--small active"> |
||||
<div class="checkbox__state"></div> |
||||
<input type="checkbox" name="" checked id="" class="checkbox__input"> |
||||
<label for="" class="checkbox__label"> |
||||
{{ fn ('pll_e', 'Я ознакомился с <a href="#">политикой обработки персональных данных</a> и <a href="#">пользовательским соглашением') }}</a> |
||||
</label> |
||||
</div> |
||||
|
||||
<input type="submit" value="Оставить почту" class="button button--white button--red-48-px button--100-perc active modal-form-sub__submit"> |
||||
</form> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
<div class="modal__item modal__to-know-submit modal__item--no-title"> |
||||
<button class="modal__close"> |
||||
<img src="/wp-content/themes/cosmopet/static/img/svg/main/black-x.svg" alt=""> |
||||
</button> |
||||
<div class="modal__header"> |
||||
<p class="modal__small-title">{{ fn ('pll_e', 'Подписка на товар оформлена') }}</p> |
||||
<p class="modal__text"> |
||||
{{ fn ('pll_e', 'На ваш e-mail <span id="email_current"></span> придет письмо, как только продукт появится в наличии.') }} |
||||
</p> |
||||
<button class="button button--white button--red-48-px button--100-perc active modal-form-sub__submit m__close"> |
||||
{{ fn ('pll_e', 'Продолжить покупки') }} |
||||
</button> |
||||
</div> |
||||
|
||||
</div> |
@ -1 +0,0 @@ |
||||
123 |
@ -1,63 +0,0 @@ |
||||
<?php |
||||
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) { |
||||
exit; |
||||
} |
||||
|
||||
if (is_product()) { |
||||
|
||||
include_module('shop'); |
||||
include_component('shop', 'single-product'); |
||||
|
||||
$context = Timber::get_context(); |
||||
$post = Timber::get_post(); |
||||
$context['post'] = $post; |
||||
|
||||
|
||||
$context['wc_breadcrumbs'] = array(); |
||||
|
||||
if (function_exists('woocommerce_breadcrumb')) { |
||||
$args = array( |
||||
'delimiter' => '', |
||||
'wrap_before' => '', |
||||
'wrap_after' => '', |
||||
'before' => '', |
||||
'after' => '', |
||||
'home' => _x('Home', 'breadcrumb', 'woocommerce'), |
||||
); |
||||
|
||||
$breadcrumbs = new WC_Breadcrumb(); |
||||
$breadcrumbs->generate(); |
||||
|
||||
$formatted_breadcrumbs = array(); |
||||
foreach ($breadcrumbs->get_breadcrumb() as $crumb) { |
||||
$formatted_breadcrumbs[] = array( |
||||
'text' => $crumb[0], |
||||
'url' => $crumb[1] |
||||
); |
||||
} |
||||
|
||||
$context['wc_breadcrumbs'] = $formatted_breadcrumbs; |
||||
} |
||||
|
||||
|
||||
$product_id = get_the_ID(); |
||||
$product = wc_get_product($product_id); |
||||
|
||||
$context['product'] = $product; |
||||
|
||||
$context['related_products'] = array(); |
||||
$related_products_ids = wc_get_related_products($product_id, 5); |
||||
|
||||
if ($related_products_ids) { |
||||
foreach ($related_products_ids as $related_id) { |
||||
$related_product = wc_get_product($related_id); |
||||
if ($related_product) { |
||||
$context['related_products'][] = $related_product; |
||||
} |
||||
} |
||||
} |
||||
|
||||
Timber::render('modules/shop/components/single-product/component-template.twig', $context); |
||||
} |
@ -1,19 +0,0 @@ |
||||
<?php |
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) { |
||||
exit; |
||||
} |
||||
|
||||
get_header(); |
||||
|
||||
$template_path = 'templates/shop/single-product.php'; |
||||
if (file_exists(get_template_directory() . '/' . $template_path)) { |
||||
include_once get_template_directory() . '/' . $template_path; |
||||
} else { |
||||
|
||||
while (have_posts()) : the_post(); |
||||
wc_get_template_part('content', 'single-product'); |
||||
endwhile; |
||||
} |
||||
|
||||
get_footer(); |
Loading…
Reference in new issue