Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {strip}
- {$cols = 1} {$is_sidebar_left = 0} {$is_sidebar_right = 0}
- {if $theme_settings.product_sidebar_left && (!$wa->isMobile() || ($wa->isMobile() && $wa->cookie("is_desktop_for_mobile") == 1 && $theme_settings.switch_version))}
- {$cols = $cols + 1}
- {$is_sidebar_left = 1}
- {/if}
- {if $theme_settings.product_sidebar_right && (!$wa->isMobile() || ($wa->isMobile() && $wa->cookie("is_desktop_for_mobile") == 1 && $theme_settings.switch_version))}
- {$cols = $cols + 1}
- {$is_sidebar_right = 1}
- {/if}
- {$is_show_reviews = false}
- {if $theme_settings.display_product_card_reviews}
- {$is_show_reviews = true}
- {/if}
- {$is_show_description = false}
- {if $theme_settings.display_product_card_description && $product.description}
- {$is_show_description = true}
- {/if}
- {$is_show_features = false}
- {if $theme_settings.display_product_card_features && $product.features}
- {$is_show_features = true}
- {/if}
- {$is_show_comments_vk = $theme_settings.product_info_comments_vk_show && $theme_settings.product_info_comments_vk_app_id}
- {$is_show_comments_fb = $theme_settings.product_info_comments_fb_show && $theme_settings.product_info_comments_fb_app_id}
- <div class="cols-{$cols}">
- <div class="sidebars-outer">
- {if $is_sidebar_right}
- {include file='sidebar-right.html'}
- {/if}
- {if $is_sidebar_left}
- {include file='sidebar-left.html'}
- {/if}
- </div>
- <div id="page-content" class="{if $is_sidebar_left} with-left-sidebar{/if} {if $is_sidebar_right} with-right-sidebar{/if}">
- <article class="product_card" itemscope itemtype="http://schema.org/Product">
- <div class="content">
- <div class="content-block">
- <div class="display-table">
- <a class="product_print" href="javascript:window.print()">
- <span class="link-action-icon icon-before">[`Print`]</span>
- </a>
- <h1 class="product_name" itemprop="name">{$product.name|escape}</h1>
- </div>
- <div class="display-table">
- {if $theme_settings.show_product_rates}
- {if $product.rating > 0}
- <span class="product_rate rating nowrap" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" title="{sprintf('[`Average user rating: %s / 5`]', $product.rating)}">
- {$wa->shop->ratingHtml($product.rating, 16)}
- <span itemprop="ratingValue" style="display: none;">{$product.rating}</span>
- <span itemprop="reviewCount" style="display: none;">{$reviews_total_count}</span>
- </span>
- {else}
- <span class="product_rate rating nowrap">
- <i class="icon16 star-empty"></i>
- <i class="icon16 star-empty"></i>
- <i class="icon16 star-empty"></i>
- <i class="icon16 star-empty"></i>
- <i class="icon16 star-empty"></i>
- </span>
- {/if}
- {/if}
- {if $theme_settings.favorites_products || $theme_settings.compare_products}
- <div class="product_cart-actions">
- {if $theme_settings.favorites_products}
- {$favorites = $wa->cookie('favorites_list')}
- {if $favorites}
- {$favorites_list = ","|explode:$favorites}
- {else}
- {$favorites_list = []}
- {/if}
- <span data-product="{$product.id}" class="js-add-to-favorites pr-action add-to-favorite {if in_array($product.id, $favorites_list)} active{/if}">
- <i class="fa fa-heart"></i>
- <span class="pr-action-text">[`To favorites`]</span>
- </span>
- {/if}
- {if $theme_settings.compare_products}
- <span data-name="{$product.name|escape}" data-img="{$wa->shop->productImgUrl($product, '60')}" data-url="{$product.frontend_url}" data-product="{$product.id}" class="js-add-to-compare pr-action add-to-compare {if $wa->shop->inComparison($product.id)} active{/if}">
- <i class="fa fa-files-o"></i>
- <span class="pr-action-text">[`Compare`]</span>
- </span>
- {/if}
- </div>
- {/if}
- </div>
- </div>
- <div class="product_main js-product">
- {include file="product.gallery.html" inline}
- <div class="product_main-right">
- <div class="cart ">
- {include file="product.cart.html" inline}
- </div>
- <!-- plugin hook: 'frontend_product.block_aux' -->
- {* @event frontend_product.%plugin_id%.block_aux *}
- {if !empty($frontend_product)}
- <div class="cart_aux">
- {foreach $frontend_product as $_}{$_.block_aux}{/foreach}
- </div>
- {/if}
- <!-- plugin hook: 'frontend_product.menu' -->
- {* @event frontend_product.%plugin_id%.menu *}
- {foreach $frontend_product as $_}{$_.menu}{/foreach}
- {if $theme_settings.product_card_plugin_hook_block == 'right_block'}
- <!-- plugin hook: 'frontend_product.block' -->
- {* @event frontend_product.%plugin_id%.block *}
- {foreach $frontend_product as $_}{$_.block}{/foreach}
- {/if}
- </div>
- </div>
- </div>
- {if $theme_settings.product_infoblocks}
- {include file="product.bullets.html"}
- {/if}
- {$is_normal_tabs = ($theme_settings.product_card_type_main_content == "normal_tabs")}
- {$is_anchor_tabs = ($theme_settings.product_card_type_main_content == "anchor_tabs")}
- {$is_none_tabs = ($theme_settings.product_card_type_main_content == "none_tabs")}
- <div class="content">
- {if ($is_normal_tabs || $is_anchor_tabs) && ($is_show_description || $is_show_features || $is_show_reviews || count($product.pages) > 0) || $is_show_comments_fb || $is_show_comments_vk}
- <ul class="tabs js-tabs ul-block">
- {if $is_show_description}
- <li class="{if $is_normal_tabs}js-tab {/if}{if $is_anchor_tabs}js-move-to-tab {/if}tabs_el" data-tab-content="product-description">[`Review`]</li>
- {/if}
- {if $is_show_features}
- <li class="{if $is_normal_tabs}js-tab {/if}{if $is_anchor_tabs}js-move-to-tab {/if} tabs_el" data-tab-content="product-options">[`Characteristics`]</li>
- {/if}
- {if $is_show_reviews}
- <li class="{if $is_normal_tabs}js-tab {/if}{if $is_anchor_tabs}js-move-to-tab {/if} tabs_el" data-tab-content="product-reviews">[`Reviews`] <span class="hint">({$reviews_total_count})</span></li>
- {/if}
- {if $is_show_comments_vk}
- <li class="{if $is_normal_tabs}js-tab {/if}{if $is_anchor_tabs}js-move-to-tab {/if} tabs_el" data-tab-content="comments-vk">
- {if $theme_settings.product_info_comments_vk_title}{$theme_settings.product_info_comments_vk_title}{else}[`Discussions`]{/if}
- <i class="fa fa-vk tabs_el-vk" aria-hidden="true"></i>
- </li>
- {/if}
- {if $is_show_comments_fb}
- <li class="{if $is_normal_tabs}js-tab {/if}{if $is_anchor_tabs}js-move-to-tab {/if} tabs_el" data-tab-content="comments-fb">
- {if $theme_settings.product_info_comments_fb_title}{$theme_settings.product_info_comments_fb_title}{else}[`Discussions`]{/if}</span>
- <i class="fa fa-facebook-f tabs_el-fb"></i>
- </li>
- {/if}
- {if count($product.pages) > 0}
- {foreach $product.pages as $page}
- <li class="{if $is_normal_tabs}js-tab {/if}{if $is_anchor_tabs}js-move-to-tab {/if} tabs_el" data-tab-content="product-page-{$page.id}">{$page.name|escape}</li>
- {/foreach}
- {/if}
- {if $theme_settings.product_add_info_title}
- <li class="{if $is_normal_tabs}js-tab {/if}{if $is_anchor_tabs}js-move-to-tab {/if} tabs_el" data-tab-content="product-page-addinfo">{$theme_settings.product_add_info_title|escape}</li>
- {/if}
- </ul>
- {/if}
- {if $is_show_description || $is_show_features || $is_show_reviews || count($product.pages) > 0 || $is_show_comments_fb || $is_show_comments_vk}
- <div class="tab-contents">
- {if $is_show_description}
- <div id="product-description" class="js-tab-content content-block product_description{if $is_normal_tabs} tab-content_el{/if}">
- {if $wa->isMobile() || empty($is_normal_tabs)}
- <div class="product-tab_head"><h2>[`Description`]</h2></div>
- {/if}
- {if $theme_settings.product_card_show_brand_content && $theme_settings.plugin_brands == 'brands_pro' && class_exists('shopBrandViewHelper')}
- {$_brand_pro = shopBrandViewHelper::getProductBrand($product)}
- {if !empty($_brand_pro) && $_brand_pro.image_url}
- <div class="product_desc-brand">
- <a class="product_brand-img" href="{$_brand_pro.frontend_url}"><img alt="{$_brand_pro.name|escape}" src="{$_brand_pro.image_url}"></a>
- </div>
- {/if}
- {else if $theme_settings.product_card_show_brand_content && $theme_settings.plugin_brands == 'brands' && class_exists('shopProductbrandsPlugin')}
- {$_b = shopProductbrandsPlugin::productBrand($product.id)}
- {if !empty($_b) && $_b.image}
- <div class="product_desc-brand">
- <a class="product_brand-img" href="{$_b.url}"><img alt="{$_b.name|escape}" src="{$wa_url}wa-data/public/shop/brands/{$_b.id}/{$_b.id}.200{$_b.image}"></a>
- </div>
- {/if}
- {/if}
- <div itemprop="description">{$product.description}</div>
- </div>
- {/if}
- {if $is_show_features}
- <div id="product-options" class="js-tab-content content-block {if $is_normal_tabs} tab-content_el{/if}">
- {if $wa->isMobile() || $is_normal_tabs != 1}
- <div class="product-tab_head"><h2>[`Characteristics`]</h2></div>
- {/if}
- <table class="product_features">
- {$product_features_list = $product.features}
- {if class_exists('shopGroupattrPlugin')}
- {$product_features_list = shopGroupattrPlugin::process($product, $features)}
- {/if}
- {if class_exists('shopSeofilterViewHelper')}
- {$product_features_list = shopSeofilterViewHelper::wrapFeatureValues($product_features_list)}
- {/if}
- {foreach $product_features_list as $f_code => $f_value}
- <tr class="product_features-item {if $features[$f_code].type == 'divider'} divider{/if}">
- <td class="product_features-title">
- <span>{$features[$f_code].name|escape}</span>
- </td>
- {$_is_good_param = ($f_code|in_array:["weight", "model", "width", "height", "depth", "color", "manufacturer"])}
- {$_itemprop = ""}
- {if $_is_good_param}
- {$_itemprop = $f_code}
- {/if}
- {if $theme_settings.feature_brand_code && $theme_settings.feature_brand_code == $f_code}
- {$_itemprop = "brand"}
- {/if}
- <td class="product_features-value"{if $_itemprop} itemprop="{$_itemprop}"{/if}>
- {if is_array($f_value)}
- {if $features[$f_code].type == 'color'}
- {implode('<br /> ', $f_value)}
- {else}
- {implode(', ', $f_value)}
- {/if}
- {else}
- {$f_value}
- {/if}
- </td>
- </tr>
- {/foreach}
- </table>
- </div>
- {/if}
- {if $is_show_reviews}
- <section id="product-reviews" class="js-tab-content content-block{if $is_normal_tabs} tab-content_el{/if}">
- <h2>{sprintf('[`%s reviews`]', $product.name|escape)}</h2>
- {if !empty($rates)}
- <p class="rating">
- [`Average customer rating:`]
- <span class="nowrap">{$wa->shop->ratingHtml($product.rating, 16)}</span> (<a href="reviews/">{$reviews_total_count}</a>)
- {if $product.rating > 0}<span class="hint product_rate-count">{sprintf('[`%s out of 5 stars`]', $product.rating)}</span>{/if}
- </p>
- <table class="rating-distribution">
- {$_total_count = 0}
- {foreach $rates as $_rate => $_count}
- {$_total_count = $_total_count + $_count}
- {/foreach}
- {* foreach $rates as $_rate => $_count *}
- {for $i = 5 to 0 step -1}
- {if empty($rates[$i]) || !$rates[$i]}{$_count = 0}{else}{$_count = $rates[$i]}{/if}
- {if $i || $_count}
- <tr>
- <td class="min-width hint">{$_count}</td>
- <td>
- <div class="bar">
- <div class="filling bg-sd-color" style="width: {if $_total_count > 0}{str_replace(',','.', 100*$_count/$_total_count)}{else}0{/if}%;{if !$i} background: #ddd;{/if}"></div>
- </div>
- </td>
- <td>
- <span class="rating">{for $j=1 to $i}<i class="icon10 star"></i>{forelse}<span class="hint">[`no rate`]</span>{/for}</span>
- </td>
- </tr>
- {/if}
- {/for}
- </table>
- {/if}
- <div class="js-reviews-content" data-url-product="{$wa->shop->productUrl($product)}">
- {if $reviews}
- {foreach $reviews as $review}
- {include file="review.html" inline}
- {/foreach}
- {else}
- [`About this product reviews yet. Be the first!`]
- {/if}
- </div>
- </section>
- {/if}
- {if $is_show_comments_vk}
- <div class="content-block js-tab-content{if $is_normal_tabs} tab-content_el{/if}" id="comments-vk">
- {include file="`$wa_active_theme_path`/product.comments.vk.html"}
- </div>
- {/if}
- {if $is_show_comments_fb}
- <div class="content-block js-tab-content{if $is_normal_tabs} tab-content_el{/if}" id="comments-fb">
- {include file="`$wa_active_theme_path`/product.comments.fb.html"}
- </div>
- {/if}
- {if count($product.pages) > 0}
- {foreach $product.pages as $page}
- <div id="product-page-{$page.id}" class="js-tab-content content-block{if $is_normal_tabs} tab-content_el{/if}">
- {if $wa->isMobile() || $is_normal_tabs != 1}
- <div class="product-tab_head"><h2>{$page.name|escape}</h2></div>
- {/if}
- {$page.content}
- </div>
- {/foreach}
- {/if}
- {if $theme_settings.product_add_info_title}
- <div id="product-page-addinfo" class="content-block{if $is_normal_tabs} js-tab-content tab-content_el{/if}">
- {$wa->block("product_addinfo")}
- </div>
- {/if}
- </div>
- {/if}
- {if $theme_settings.product_card_plugin_hook_block != 'right_block'}
- {* @event frontend_product.%plugin_id%.block *}
- {foreach $frontend_product as $_}
- {$_.block}
- {/foreach}
- {/if }
- {if ($theme_settings.show_product_categories && count($product.categories) > 1) || ($theme_settings.show_product_tags && $product.tags)}
- <div class="content-block">
- <!-- categories -->
- {if $theme_settings.show_product_categories && count($product.categories) > 1}
- <div class="product_categories">
- [`Categories`]:
- {foreach $product.categories as $c}{if $c.status}
- <a href="{$wa->getUrl('/frontend/category', ['category_url' => $c.full_url])}">{$c.name|escape}</a>
- {/if}{/foreach}
- </div>
- {/if}
- <!-- tags -->
- {if $theme_settings.show_product_tags && $product.tags}
- <div class="product_tags">
- [`Tags`]:
- <span class="tags cloud bs-color">
- {if class_exists('shopTageditorPlugin')}
- {foreach shopTageditorPlugin::tags($product.tags) as $t}
- <a href="{$wa->getUrl('/frontend/tag', ['tag' => $t.uri_name])}">{$t.name|escape}</a>
- {/foreach}
- {else}
- {foreach $product.tags as $t}
- <a href="{$wa->getUrl('/frontend/tag', ['tag' => urlencode($t)])}">{$t}</a>
- {/foreach}
- {/if}
- </span>
- </div>
- {/if}
- </div>
- {/if}
- </div>
- </article>
- {$count_crossselling = (int) $theme_settings.crossselling_count}
- {if empty($count_crossselling)}{$count_crossselling = 12}{/if}
- {$crossselling = $product->crossSelling($count_crossselling)}
- {$count_upselling = (int) $theme_settings.upselling_count}
- {if empty($count_upselling)}{$count_upselling = 12}{/if}
- {$upselling = $product->upSelling($count_upselling)}
- {$viewed_list = $wa->cookie('viewed_list')}
- {if isset($theme_settings.product_card_list_view_type) && !empty($theme_settings.product_card_list_view_type)}
- {$CategoryProductsView = $theme_settings.product_card_list_view_type}
- {/if}
- {if $crossselling || $upselling || ( $theme_settings.viewed_products && $theme_settings.product_card_views_products && $viewed_list)}
- <div class="content product_related-products">
- {if $crossselling}
- <section>
- <div class="product_related-title__outer">
- <h3 class="product_related-title">{sprintf('[`Customers who bought %s also bought`]', $product.name|escape)}</h3>
- </div>
- {if $wa->isMobile() && !($wa->cookie("is_desktop_for_mobile") == 1 && $theme_settings.switch_version)}
- {include file="list-thumbs-mini.html" products=$crossselling ulclass=""}
- {else}
- {include file="list-thumbs.html" products=$crossselling ulclass=""}
- {/if}
- </section>
- {/if}
- {if $upselling}
- <section>
- <div class="product_related-title__outer">
- <h3 class="product_related-title">
- [`See also`]
- {$compare_ids = array_merge(array($product.id), array_keys($upselling))}
- <a class="product_related-compare sd-color link-half" onClick="javascript:window.location='{$wa->getUrl('/frontend/compare', ['id' => implode(',', $compare_ids)])}';">[`Compare all`]</a>
- </h3>
- </div>
- {if $wa->isMobile() && !($wa->cookie("is_desktop_for_mobile") == 1 && $theme_settings.switch_version)}
- {include file="list-thumbs-mini.html" products=$upselling ulclass=""}
- {else}
- {include file="list-thumbs.html" products=$upselling ulclass=""}
- {/if}
- </section>
- {/if}
- {if $theme_settings.viewed_products && $viewed_list && ($theme_settings.product_card_views_products || $wa->isMobile())}
- {$viewed_list_arr = ","|explode:$viewed_list}
- {$viewed_list_arr_lasted = []}
- {$counter = 1}
- {foreach $viewed_list_arr as $id}
- {$viewed_list_arr_lasted[] = $id}
- {if $counter++ == 5}
- {break}
- {/if}
- {/foreach}
- {$products = $wa->shop->products($viewed_list_arr_lasted)}
- {$products_result = []}
- {foreach $viewed_list_arr as $id}
- {foreach $products as $product}
- {if $product.id == $id}
- {$products_result[$id] = $product}
- {/if}
- {/foreach}
- {/foreach}
- <section>
- <div class="product_related-title__outer">
- <h3 class="product_related-title">[`Viewed products`]</h3>
- </div>
- {if $wa->isMobile() && !($wa->cookie("is_desktop_for_mobile") == 1 && $theme_settings.switch_version)}
- {include file="list-thumbs-mini.html" products=$products_result ulclass=""}
- {else}
- {include file="list-thumbs.html" products=$products_result ulclass=""}
- {/if}
- </section>
- {/if}
- </div>
- {/if}
- </div>
- </div>
- <script>
- ( function($) {
- var url = $('.js-reviews-content').data("url-product").replace(/\/#\/[^#]*|\/#|\/$/g, '') + '/reviews/';
- $.get(url, function(data) {
- var content = $(data).find('.js-reviews-outer');
- $('.js-reviews-content').html(content);
- });
- })(jQuery);
- </script>
- {/strip}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement