Last active
February 14, 2018 06:48
-
-
Save wiratama/35752b5657a23e090e42bdfd58fcdaae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'MoventContentBundle:Content/Layout/base:base.html.twig' %} | |
{% block content %} | |
{% include "MoventSiteBundle:Social:socialinit.html.twig" %} | |
<div class="main innerpage"> | |
<div class="wrapper-center"> | |
<div id="product-{{ object.id }}" class="productdetail"> | |
<div class="recipe-header-breadcrumbs"> | |
{{ sonata_block_render_event('breadcrumb', { 'context': 'content_view', 'category': category}) }} | |
</div> | |
<div class="productmain"> | |
<div class="productimage"> | |
<img class="main" alt="{{ object.imageMainLabel|raw }}" src="{{ movent_media_public_url(object.imageMain, 'image_395x527') }}" /> | |
{% if object.productGallery and object.productGallery|length >= 1 %} | |
<div class="productThumbs"> | |
<img alt="{{ object.imageMainLabel|raw }}" data-large="{{ movent_media_public_url(object.imageMain, 'image_395x527') }}" src="{{ movent_media_public_url(object.imageMain, 'image_113x151') }}" /> | |
{% set gallery = object.productGallery %} | |
{% set index = 1 %} | |
{% for image in gallery.galleryHasMedias if index < 3 %} | |
<img alt="{{ object.imageMainLabel|raw }}" data-large="{{ movent_media_public_url(image.media, 'image_395x527') }}" src="{{ movent_media_public_url(image.media, 'image_113x151') }}" /> | |
{% set index = index + 1 %} | |
{% endfor %} | |
</div> | |
{% endif %} | |
</div> | |
<div class="fleft-500px"> | |
<div class="productinfo"> | |
<h1>{{ object.title }}</h1> | |
{% if object.buyNowId is not null %} | |
<a data-sku-id="{{ object.buyNowId }}" class="productViewBuyNow buynow-btn"><span class="test">Beli Sekarang</span></a> | |
{% endif %} | |
{{ object.abstract }} | |
<div class="productBtnbox"> | |
{% if object.imageNutritionFact %} | |
<a href="{% path object.imageNutritionFact, 'reference' %}" class="infomasi">Informasi gizi</a> | |
{% endif %} | |
</div> | |
</div> | |
{#<div class="resellerbox"> | |
{% if object.productProductReseller|length %} | |
<h1>Reseller</h1> | |
<ul> | |
{% for reseller in object.productProductReseller %} | |
<li> | |
<!--<span class="resellerprice">Rp {{ priceFeed(reseller.priceFeed) }}</span>--> | |
<div class="resellerthumb"> | |
<img src="{{ movent_media_public_url(reseller.image, 'image_115x115') }}" /> | |
</div> | |
<div class="resellerinfo"> | |
<h2>{{ reseller.name }}</h2> | |
<p>{{ reseller.description }}</p> | |
{% if reseller.isPromo %} | |
<a href="{{ reseller.url }}" target="_blank" class="belisekarangpromo"></a> | |
{% else %} | |
<a href="{{ reseller.url }}" target="_blank" class="belisekarang"></a> | |
{% endif %} | |
</div> | |
</li> | |
{% endfor %} | |
</ul> | |
{% endif %} | |
</div>#} | |
</div> | |
{% if object.productRelatedProducts and object.productRelatedProducts|length %} | |
<div class="relatedProducts"> | |
<h3>{{ "Produk Terkait"|trans }}</h3> | |
<div class="items"> | |
{% for relatedProduct in object.productRelatedProducts %} | |
{% if loop.index <=2 %} | |
<div class="item" style="float:left;width: 200px;"> | |
<div class="mov-related-products_image"> | |
<img style="width:50%;" alt="{{ relatedProduct.relatedToProduct.imageMainLabel|raw }}" src="{{ movent_media_public_url(relatedProduct.relatedToProduct.imageMain, 'image_395x527') }}" /> | |
</div> | |
<h4>{{ relatedProduct.relatedToProduct.title|raw|truncate(14, false, ' …') }}</h4> | |
<p>{{ relatedProduct.relatedToProduct.abstract|raw|truncate(80, true, ' …') }}</p> | |
<div class="relatedProduct_buttons"> | |
<p><a href="{{ movent_content_path(relatedProduct.relatedToProduct, relatedProduct.relatedToProduct.canonicalCategory) }}" class="tab-link" style="background:red;">{{"Selengkapnya"|trans}}</a> | |
{% if relatedProduct.relatedToProduct.buyNowId is not null %} | |
<a data-sku-id="{{ relatedProduct.relatedToProduct.buyNowId }}" class="productViewBuyNow tab-link buy-now-button buynow-btn" style="background:red;"> {{"Beli Sekarang"|trans}}</a></p> | |
{% endif %} | |
</div> | |
</div> | |
{% endif %} | |
{% endfor %} | |
</div> | |
</div> | |
{% endif %} | |
</div> | |
{% if object.allowComment %} | |
<div class="fbcommentbox"> | |
{% include "MoventContentBundle:Content/Layout/base:comment.html.twig" with {'width' : '857' } %} | |
</div> | |
{% endif %} | |
</div> | |
</div> | |
</div> | |
{% endblock content %} | |
{% block site_footer_scripts %} | |
{{ parent() }} | |
<script type="text/javascript"> | |
//<![CDATA[ | |
jQuery(document).ready(function($){ | |
$(".infomasi").fancybox(); | |
{#var buy_now = $(".productViewBuyNow"); | |
var lightbox = null; | |
if (buy_now.length) { | |
lightbox = new fusepump.lightbox.buynow(buy_now.attr('data-buynow-id')); | |
buy_now.click(function(e) { | |
e.preventDefault(); | |
lightbox.show(); | |
}); | |
}#} | |
$(".productThumbs img").click(function(){ | |
$(".productThumbs img").removeClass("active"); | |
$(this).addClass("active"); | |
$(".productimage img.main").attr('src',$(this).data('large')); | |
}); | |
}); | |
//]]> | |
</script> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment