templates/front/product/view.html.twig line 1
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="manifest" href="{{ asset('assets/manifest.json') }}">
{# <link rel="icon" href="assets/images/favicon/2.png" type="image/x-icon" />#}
{# <link rel="apple-touch-icon" href="assets/images/favicon/2.png" />#}
<meta name="theme-color" content="#F45C2C" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="pcboomboom.rs" />
<meta name="msapplication-TileImage" content="{{ asset('assets/images/logo/favicon_io (2)/favicon.ico') }}" />
<meta name="msapplication-TileColor" content="#FFFFFF" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="
{% if product.metaDescription is not null%}
{{ product.metaDescription |trans }}
{% else %}
{{ constant('App\\Classes\\Data\\MetaTagsData::DESC') }}
{% endif %}">
<meta name="keywords" content="
{% if product.metaKeywords is not null%}
{{ product.metaKeywords |trans }}
{% else %}
{{ constant('App\\Classes\\Data\\MetaTagsData::KEYWORDS') }}
{% endif %}">
<meta name="author" content="pcboomboom.rs">
<link rel="icon" href="{{ asset('assets/images/logo/favicon_io (2)/favicon.ico') }}" type="image/x-icon">
<!-- Ako želite podržati i mobilne uređaje -->
<link rel="apple-touch-icon" href="{{ asset('assets/images/logo/favicon_io (2)/apple-touch-icon.png') }}">
<!-- facebook -->
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ product.title |trans }} | pcboomboom.rs" />
<meta property="og:url" content="{{ app.request.uri }}" />
<meta property="og:image" content="{{ asset(product.mainImage.thumbnail500) }}"/>
<meta property="og:site_name" content="pcboomboom.rs - {{ constant('App\\Classes\\Data\\MetaTagsData::TITLE') }}"/>
<meta property="fb:admins" content="1285367254" />
<meta property="og:description" content="" />
<!-- ./facebook -->
<title>{{ product.title |trans }} - {{ constant('App\\Classes\\Data\\MetaTagsData::TITLE') }} | pcboomboom.rs</title>
<!-- Google font -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap" rel="stylesheet">
<!-- bootstrap css -->
<link id="rtl-link" rel="stylesheet" type="text/css" href="{{ asset('assets/shop/assets/css/vendors/bootstrap.css') }}">
<!-- font-awesome css -->
<link rel="stylesheet" type="text/css" href="{{ asset('assets/shop/assets/css/vendors/font-awesome.css') }}">
<!-- feather icon css -->
<link rel="stylesheet" type="text/css" href="{{ asset('assets/shop/assets/css/vendors/feather-icon.css') }}">
<!--Plugin CSS file with desired skin-->
<link rel="stylesheet" href="{{ asset('assets/shop/assets/css/vendors/ion.rangeSlider.min.css') }}">
<!-- animation css -->
<link rel="stylesheet" type="text/css" href="{{ asset('assets/shop/assets/css/vendors/animate.css') }}">
<!-- slick css -->
<link rel="stylesheet" type="text/css" href="{{ asset('assets/shop/assets/css/vendors/slick/slick.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('assets/shop/assets/css/vendors/slick/slick-theme.css') }}">
<!-- Theme css -->
<link id="color-link" rel="stylesheet" type="text/css" href="{{ asset('assets/shop/assets/css/demo2.css') }}">
<link id="color-link" rel="stylesheet" type="text/css" href="{{ asset('assets/shop/assets/css/demo1.css') }}">
</head>
<body class="theme-color1 light ltr">
{% include 'front/include/header.html.twig' %}
<!-- mobile fix menu -->
{% include 'front/include/mobile_menu.html.twig' %}
<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v14.0" nonce="kV2PhO6v"></script>
<section class="breadcrumb-section section-b-space d-print-none">
<ul class="circles">
<li><img src="{{ asset('assets/shop/assets/circles/1.svg') }}"></li>
<li><img src="{{ asset('assets/shop/assets/circles/2.svg') }}"></li>
<li><img src="{{ asset('assets/shop/assets/circles/3.svg') }}"></li>
<li><img src="{{ asset('assets/shop/assets/circles/4.svg') }}"></li>
<li><img src="{{ asset('assets/shop/assets/circles/5.svg') }}"></li>
<li><img src="{{ asset('assets/shop/assets/circles/6.svg') }}"></li>
<li><img src="{{ asset('assets/shop/assets/circles/7.svg') }}"></li>
<li><img src="{{ asset('assets/shop/assets/circles/8.svg') }}"></li>
<li><img src="{{ asset('assets/shop/assets/circles/9.svg') }}"></li>
<li><img src="{{ asset('assets/shop/assets/circles/10.svg') }}"></li>
</ul>
<div class="container">
<div class="row">
<div class="col-12">
<h3>PROIZVOD</h3>
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="{{ path('app_shop_home') }}">
<i class="fas fa-home"></i>
</a>
</li>
<li class="breadcrumb-item" aria-current="page"><a href="{{ path('app_shop_all') }}" class="text-dark">PRODAVNICA</a></li>
{% if category.parent is not null %}
{% if category.parent.parent is not null %}
{% if category.parent.parent.parent is not null %}
{% if category.parent.parent.parent.parent is not null %}
<li class="breadcrumb-item" aria-current="page"><a href="{{ path('app_shop', {id:category.parent.parent.parent.parent.id}) }}" class="text-dark">{{ category.parent.parent.parent.parent.title }}</a></li>
{% endif %}
<li class="breadcrumb-item" aria-current="page"><a href="{{ path('app_shop', {id:category.parent.parent.parent.id}) }}" class="text-dark">{{ category.parent.parent.parent.title }}</a></li>
{% endif %}
<li class="breadcrumb-item" aria-current="page"><a href="{{ path('app_shop', {id:category.parent.parent.id}) }}" class="text-dark">{{ category.parent.parent.title }}</a></li>
{% endif %}
<li class="breadcrumb-item" aria-current="page"><a href="{{ path('app_shop', {id:category.parent.id}) }}" class="text-dark">{{ category.parent.title }}</a></li>
{% endif %}
<li class="breadcrumb-item" aria-current="page"><a href="{{ path('app_shop', {id:category.id}) }}" class="text-dark">{{ category.title }}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ product.title |trans }}</li>
</ol>
</div>
</div>
</div>
</section>
<section>
<div class="container">
<div class="row gx-4 gy-5">
<div class="col-12">
<div class="details-items">
<div class="row g-4">
<div class="col-md-6">
<div class="row">
<div class="col-lg-2 d-print-none">
<div class="details-image-vertical black-slide rounded">
<div>
<img src="{{ asset(product.mainImage.thumbnail100) }}"
class="img-fluid blur-up lazyload" alt="">
</div>
{% if not product.image.empty %}
{% for img in product.image %}
<div>
<img src="{{ asset(img.thumbnail100) }}"
class="img-fluid blur-up lazyload" alt="">
</div>
{% endfor %}
{% endif %}
</div>
</div>
<div class="col-lg-10">
<div class="details-image-1 ratio_asos">
<div>
<img src="{{ asset(product.mainImage.thumbnail500) }}" id="zoom_00"
data-zoom-image="{{ asset(product.mainImage.thumbnail500) }}"
class="img-fluid w-100 image_zoom_cls-0 blur-up lazyload" alt="">
</div>
{% if not product.image.empty %}
{% for img in product.image %}
<div>
<img src="{{ asset(img.thumbnail500) }}" id="zoom_0{{ loop.index }}"
data-zoom-image="{{ asset(img.thumbnail500) }}"
class="img-fluid w-100 image_zoom_cls-0 blur-up lazyload" alt="">
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="cloth-details-size">
<div class="details-image-concept">
<h3 class="text-muted">{{ product.category.title }}</h3>
<h2>{{ product.title }} <a href="{{ path('app_product_pdf', {id:product.id}) }}"><i class="fa fa-file-pdf mx-2"></i></a></h2>
</div>
<div class="label-section">
{% if product.new %}
<span class="label label-black">Novo</span>
{% endif %}
{% if product.discount %}
<span class="label label-theme">Popust</span>
{% endif %}
{% if product.superProduct %}
<span class="label label-theme">Super proizvod</span>
{% endif %}
{% if product.outOfStock %}
<span class="label label-theme">Nema na stanju</span>
{% endif %}
{% if product.isOutlet %}
<span class="label label-black">Outlet</span>
{% endif %}
</div>
{% if product.discount %}
<h3 class="price-detail">{{ ((product.pricePDV | number_format(2, '.', ','))) }} RSD
<del>{{ ((product.price * ((product.vat/100) + 1)) | round) | number_format(2, '.', ',') }} RSD</del>
</h3>
{% else %}
<h3 class="price-detail">{{ ((product.pricePDV | number_format(2, '.', ','))) }} RSD</h3>
{% endif %}
<div id="selectSize" class="addeffect-section product-description border-product">
<h6 class="product-title size-text">Proizvođač</h6>
<div class="size-box">
<h6 class="product-title hurry-title d-block">{{ product.factory.title }}</h6>
</div>
{# <h6 class="product-title size-text">Dobavljač</h6>#}
{# <div class="size-box">#}
{# <h6 class="product-title hurry-title d-block">{{ product.vendor.title }}</h6>#}
{# </div>#}
<h6 class="product-title size-text">Atributi</h6>
{% set attributes = product.attribute %}
{% if not attributes.empty %}
{% set attributes = attributes|slice(0,9) %}
{% set chunkSize = 3 %}
{% set totalChunks = (attributes|length / chunkSize)|round(0, 'ceil') %}
{% for i in 0..(totalChunks - 1) %}
<div class="size-box">
{% for atr in attributes|slice(i * chunkSize, chunkSize) %}
<span class="label label-theme">{{ atr.title }} - {{ atr.value }}</span>
{% endfor %}
</div>
{% endfor %}
{% endif %}
<h6 class="product-title size-text">Šifra proizvoda</h6>
<div class="size-box">
<h6 class="product-title hurry-title d-block">#{{ product.sku }} - {{ product.vendor.id }}</h6>
</div>
<h6 class="product-title size-text">Barkod</h6>
<div class="size-box">
<h6 class="product-title hurry-title d-block">{{ product.barcode }}</h6>
</div>
{# <h6 class="product-title size-text">Te</h6>#}
{# <div class="size-box">#}
{# <h6 class="product-title hurry-title d-block">{{ product.weight | round }} kg</h6>#}
{# </div>#}
{% if product.connected is not null %}
<div class="color-image">
<div class="image-select">
<h5>Povezani proizvod:</h5>
<ul class="image-section">
<li>
<a href="{{ path('app_shop_product_view', {id: product.connected.id }) }}">
<img src="{{ asset(product.connected.mainImage.thumbnail100) }}"
class="img-fluid blur-up lazyload" alt="">
</a>
</li>
</ul>
</div>
</div>
{% endif %}
<h6 class="product-title product-title-2 d-block d-print-none">Količina</h6>
{% if not product.outOfStock %}
<form id="add-to-cart-form" method="post">
<input name="pid" type="hidden" id="pid" value="{{ product.id }}"/>
<div class="qty-box d-print-none">
<div class="input-group">
<span class="input-group-prepend">
<button type="button" class="btn quantity-left-minus" data-type="minus" data-field="">
<i class="fas fa-minus"></i>
</button>
</span>
<input type="text" name="quantity" class="form-control input-number" value="1">
<span class="input-group-prepend">
<button type="button" class="btn quantity-right-plus" data-type="plus" data-field="">
<i class="fas fa-plus"></i>
</button>
</span>
</div>
</div>
</div>
<div class="product-buttons d-print-none">
{% if app.user %}
<a href="#" class="btn btn-solid" id="wishList" data-product-id="{{ product.id }}">
<i class="fa fa-bookmark fz-16 me-2"></i>
<span>Dodajte u omiljene</span>
</a>
{% endif %}
<button type="submit" id="cartEffect" class="btn btn-solid hover-solid btn-animation">
<i class="fa fa-shopping-cart"></i>
<span style="font-weight: bold;">Dodajte u korpu</span>
</button>
</div>
</form>
{% else %}
<input name="pid" type="hidden" id="pid" value="{{ product.id }}"/>
<div class="qty-box d-print-none">
<div class="input-group">
<span class="input-group-prepend">
<button type="button" disabled class="btn quantity-left-minus" data-type="minus" data-field="">
<i class="fas fa-minus"></i>
</button>
</span>
<input type="text" name="quantity" disabled class="form-control input-number"
value="1">
<span class="input-group-prepend">
<button type="button" class="btn quantity-right-plus"
data-type="plus" disabled data-field="">
<i class="fas fa-plus"></i>
</button>
</span>
</div>
</div>
</div>
<div class="product-buttons d-print-none">
{% if app.user %}
<a href="#" class="btn btn-solid" id="wishList" data-product-id="{{ product.id }}">
<i class="fa fa-bookmark fz-16 me-2"></i>
<span>Dodajte u omiljene</span>
</a>
{% endif %}
<button type="submit" id="cartEffect" disabled
class="btn btn-solid hover-solid btn-animation">
<i class="fa fa-shopping-cart"></i>
<span style="font-weight: bold;">Dodajte u korpu</span>
</button>
</div>
{% endif %}
<ul class="product-count shipping-order d-print-none">
<li>
<img src="{{ asset('assets/shop/assets/images/gif/truck.png') }}" class="img-fluid blur-up lazyload" alt="image">
{# <span class="lang">{{ product.deliveryDesc }}</span> / <span class="lang"> {{ product.daysDelivery }} radna dana </span>#}
{# <span class="lang"> {{ product.priceDelivery | number_format(2, '.', ',') }} RSD</span>#}
<span class="lang"><span class="lang"> Isporuka do 7 radnih dana. </span>
<span class="lang"> Dostavu plaćate naknadno kuriru pri preuzimanju pošiljke.</span>
</li>
</ul>
<div class="border-product d-print-none">
<h6 class="product-title d-block">Podelite</h6>
<div class="product-icon">
<ul class="product-social">
<li>
{# <div data-href="https://pcboomboom.rs{{ path('app_shop_product_view', {id: product.id }) }}" data-layout="button_count" data-size="small">#}
{# <a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fpcboomboom.rs%2Fproizvod" class="fb-xfbml-parse-ignore">#}
{# <i class="fab fa-facebook-f"></i>#}
{# </a>#}
{# </div>#}
<div class="fb-share-button" data-href="https://pcboomboom.rs{{ path('app_shop_product_view', {id: product.id }) }}" data-layout="button_count" data-size="small"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&src=sdkpreparse" class="fb-xfbml-parse-ignore">Podelite</a></div>
{# <div class="fb-share-button" data-href="http://prikolicacentar.rs/proizvod/{{ product.id }}/" data-layout="button_count" data-size="small"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&src=sdkpreparse" class="fb-xfbml-parse-ignore">Share</a></div>#}
{# <div data-href="http://pcboomboom.rs/proizvod" data-layout="button_count" data-size="small"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&src=sdkpreparse" class="fb-xfbml-parse-ignore"><i class="fab fa-facebook-f"></i></a></div>#}
{# <div data-href="http://pcboomboom.rs/proizvod/{{ product.id }}/" data-layout="button_count" data-size="small"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&src=sdkpreparse" class="fb-xfbml-parse-ignore"><i class="fab fa-facebook-f"></i></a></div>#}
{#
<a href="#">
<i class="fab fa-facebook-f"></i>
</a>
</li>
<li>
<a href="https://www.google.com/">
<i class="fab fa-google-plus-g"></i>
</a>
</li>
<li>
<a href="https://twitter.com/">
<i class="fab fa-twitter"></i>
</a>
</li>
<li>
<a href="https://www.instagram.com/">
<i class="fab fa-instagram"></i>
</a>
</li>
<li class="pe-0">
<a href="https://www.google.com/">
<i class="fas fa-rss"></i>
</a>
</li>
</ul>
</div>
</div>
{# <div class="border-product">#}
{# <div class="product-icon">#}
{# <ul class="product-social">#}
{# <li>#}
{# <div class="fb-share-button" data-href="http://pcboomboom.rs/proizvod" data-layout="button_count" data-size="small"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&src=sdkpreparse" class="fb-xfbml-parse-ignore">Share</a></div>#}
{# <div class="fb-share-button" data-href="http://pcboomboom.rs/proizvod/{{ product.id }}/" data-layout="button_count" data-size="small"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&src=sdkpreparse" class="fb-xfbml-parse-ignore">Share</a></div>#}
{# </li>#}
{# </ul>#}
{# </div>#}
{# </div>#}
</div>
</div>
</div>
</div>
</div>
<div id="toast-container" style="position: fixed; top: 20px; right: 20px; z-index: 9999;"></div>
<div class="col-12 mb-4">
<div class="cloth-review">
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<button class="nav-link active" id="nav-speci-tab" data-bs-toggle="tab" data-bs-target="#desc" type="button">Specifikacija</button>
<button class="nav-link d-print-none" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#opt" type="button">Deklaracija</button>
<button class="nav-link d-print-none" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#review" type="button">Komentari</button>
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="desc">
<div class="mb-4 table-responsive">
{{ product.description |raw }}
</div>
</div>
<div class="tab-pane fade " id="opt">
<div class="table-responsive mb-4">
{{ product.options |raw }}
</div>
</div>
<div class="tab-pane fade" id="review">
<div class="row g-4">
{% if app.user %}
<form class="row" id="commentForm">
<div class="col-lg-2">
<div class="d-block my-3">
<div class="form-check custome-radio-box">
<input class="form-check-input" type="radio" name="rating" id="credit" value="1">
<label class="form-check-label" for="credit">
<ul class="rating d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
</ul>
</label>
</div>
</div>
<div class="d-block my-3">
<div class="form-check custome-radio-box">
<input class="form-check-input" type="radio" name="rating" id="credit" value="2">
<label class="form-check-label" for="credit">
<ul class="rating d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
</ul>
</label>
</div>
</div>
<div class="d-block my-3">
<div class="form-check custome-radio-box">
<input class="form-check-input" type="radio" name="rating" id="credit" value="3">
<label class="form-check-label" for="credit">
<ul class="rating d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
</ul>
</label>
</div>
</div>
<div class="d-block my-3">
<div class="form-check custome-radio-box">
<input class="form-check-input" type="radio" name="rating" id="credit" value="4">
<label class="form-check-label" for="credit">
<ul class="rating d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
</ul>
</label>
</div>
</div>
<div class="d-block my-3">
<div class="form-check custome-radio-box">
<input class="form-check-input" type="radio" name="rating" id="credit" value="5">
<label class="form-check-label" for="credit">
<ul class="rating d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
</ul>
</label>
</div>
</div>
</div>
<div class="col-lg-10">
<div class="review-box">
<div class="row g-4">
<div class="col-12 col-md-6">
<input hidden="hidden" name="member" value="{{ app.user.id }}">
<label class="mb-1" for="name">Ime</label>
<input type="text" class="form-control" id="name"
placeholder="Unesite Vaše ime" required value="{{ app.user.fullName }}">
</div>
<div class="col-12 col-md-6">
<label class="mb-1" for="id">Email</label>
<input type="email" class="form-control" id="id"
placeholder="Unesite Vaš email" required value="{{ app.user.email }}">
</div>
<div class="col-12">
<label class="mb-1" for="comments">Komentar</label>
<textarea name="comment" class="form-control" placeholder="Ostavite komentar" id="comments" style="height: 100px" required></textarea>
</div>
<div class="col-12">
<button type="submit" class="btn default-light-theme default-theme default-theme-2">Sačuvajte</button>
</div>
</div>
</div>
</div>
</form>
{% else %}
<div class="col-lg-12">
<div class="customer-rating">
<h3>Morate biti prijavljeni da bi mogli ostavljati komentare.</h3>
</div>
</div>
{% endif %}
<div class="col-12 mt-4 mb-4">
<div class="customer-review-box">
{% if productComments is not empty %}
<h4>Predhodni komentari</h4>
{% for comm in productComments %}
{% if not comm.isSuspended %}
<div class="customer-section">
<div class="customer-details">
<h5>{{ comm.createdBy.fullName }}</h5>
{% if comm.ocena is not null %}
{% if comm.ocena == 1 %}
<ul class="rating my-2 d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
</ul>
{% endif %}
{% if comm.ocena == 2 %}
<ul class="rating my-2 d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
</ul>
{% endif %}
{% if comm.ocena == 3 %}
<ul class="rating my-2 d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
</ul>
{% endif %}
{% if comm.ocena == 4 %}
<ul class="rating my-2 d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star"></i>
</li>
</ul>
{% endif %}
{% if comm.ocena == 5 %}
<ul class="rating my-2 d-inline-block">
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
<li>
<i class="fas fa-star theme-color"></i>
</li>
</ul>
{% endif %}
{% endif %}
<p class="font-light">{{ comm.comment }}</p>
<p class="date-custo font-light">- {{ comm.created | date("d.m.Y") }}</p>
</div>
</div>
{% endif %}
{% endfor %}
{% else %}
<h4>Ovaj proizvod nije komentarisan. Budite prvi koji će ostaviti mišljenje o proizvodu.</h4>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Shop Section end -->
{{ render(controller('App\\Controller\\shop\\ProductController::productsCategory', { category: product.category } )) }}
<!-- Newsletter modal start -->
{% include 'front/include/subscribe.html.twig' %}
<!-- Newsletter modal end -->
<!-- footer start -->
{% include 'front/include/footer.html.twig' %}
<!-- footer end -->
<!-- tap to top Section Start -->
{% include 'front/include/top.html.twig' %}
<!-- tap to top Section End -->
<div class="bg-overlay"></div>
<!-- latest jquery-->
<script src="{{ asset('assets/shop/assets/js/jquery-3.5.1.min.js') }}"></script>
<!-- Add To Home js -->
<script src="{{ asset('pwa.js') }}"></script>
<!-- Bootstrap js-->
<script src="{{ asset('assets/shop/assets/js/bootstrap/bootstrap.bundle.min.js') }}"></script>
<!-- feather icon js-->
<script src="{{ asset('assets/shop/assets/js/feather/feather.min.js') }}"></script>
<!-- lazyload js-->
<script src="{{ asset('assets/shop/assets/js/lazysizes.min.js') }}"></script>
<!-- Slick js-->
<script src="{{ asset('assets/shop/assets/js/slick/slick.js') }}"></script>
<script src="{{ asset('assets/shop/assets/js/slick/slick-animation.min.js') }}"></script>
<script src="{{ asset('assets/shop/assets/js/slick/custom_slick.js') }}"></script>
<!-- Notify js-->
<script src="{{ asset('assets/shop/assets/js/bootstrap/bootstrap-notify.min.js') }}"></script>
<!-- timer js -->
{#<script src="{{ asset('assets/shop/assets/js/timer.js') }}"></script>#}
<!-- sticky cart bottom js-->
<script src="{{ asset('assets/shop/assets/js/sticky-cart-bottom.js') }}"></script>
<!-- sticky cart bottom js-->
<script src="{{ asset('assets/shop/assets/js/check-box-select.js') }}"></script>
<!-- Zoom Js -->
<script src="{{ asset('assets/shop/assets/js/jquery.elevatezoom.js') }}"></script>
<script src="{{ asset('assets/shop/assets/js/zoom-filter.js') }}"></script>
<!--Plugin JavaScript file-->
{#<script src="{{ asset('assets/shop/assets/js/ion.rangeSlider.min.js') }}"></script>#}
<!-- Filter Hide and show Js -->
<script src="{{ asset('assets/shop/assets/js/filter.js') }}"></script>
<!-- add to cart modal resize -->
{#<script src="{{ asset('assets/shop/assets/js/cart_modal_resize.js') }}"></script>#}
<!-- Notify js-->
<script src="{{ asset('assets/shop/assets/js/bootstrap/bootstrap-notify.min.js') }}"></script>
<!-- script js -->
{#<script src="{{ asset('assets/shop/assets/js/theme-setting.js') }}"></script>#}
<script src="{{ asset('assets/shop/assets/js/script.js') }}"></script>
<script>
$(function() {
$('.cloth-review .tab-pane table').each(function() {
console.log('Found table:', this);
// Uklonite sve prethodne inline stilove i klase
$(this).removeAttr('style').removeClass().addClass('table table-bordered table-striped table-hover');
$(this).find('thead').removeAttr('style').removeClass();
$(this).find('tbody tr').removeAttr('style').removeClass();
$(this).find('th').removeAttr('style').removeClass();
$(this).find('td').removeAttr('style').removeClass();
// Smanjite margine i padding koristeći jQuery
$(this).css({
'margin-bottom': '1rem', // Smanjenje margine između tabela
});
// Postavite konkretne stilove za th i td elemente
$(this).find('th').css({
'border': '1px solid #border-color', // Postavite border-color
'background-color': '#light-blue', // Postavite light-blue
'font-weight': '500',
'padding': '0.5rem !important',
'white-space': 'pre'
});
$(this).find('td').css({
'border': '1px solid #border-color', // Postavite border-color
'text-align': 'left',
'padding': '0.5rem !important',
'white-space': 'pre'
});
// Isključite specifične stilove iz svih th i td elemenata
$(this).find('th, td').each(function() {
var currentStyles = $(this).attr('style') || '';
var newStyles = currentStyles
.replace(/white-space:\s*nowrap;?\s*/gi, '') // Uklanja white-space: nowrap;
.replace(/text-align:\s*center;?\s*/gi, ''); // Uklanja text-align: center;
$(this).attr('style', newStyles.trim()); // Postavlja ažurirane stilove
});
console.log('Specific styles applied and previous styles removed.');
});
});
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
$(document).ready(function() {
function updateNavbarSearchbar() {
// Provera da li <header> ima klasu 'nav-down' ili 'nav-up'
if ($('header').hasClass('nav-down') || $('header').hasClass('nav-up')) {
// Ukloni inline stil ako postoji
$('.main-header.navbar-searchbar').removeAttr('style');
} else {
// Postavi inline stilove ako klase 'nav-down' ili 'nav-up' ne postoje
$('.main-header.navbar-searchbar').css({
'position': 'relative',
// 'top': '-100px', // Zavisno od toga da li ti ovo treba ili ne
'left': '0',
'width': '100%',
'margin-top': '0',
'background-color': 'white', // Zamena za $white
'box-shadow': '0px 4px 10px rgba(23, 32, 90, 0.15)',
'transition': 'all 0.5s ease',
'z-index': '6'
});
}
}
// Poziv funkcije prilikom učitavanja stranice
updateNavbarSearchbar();
// Ako se menja klasa na headeru, pozovi ponovo
$(window).on('scroll', function() {
updateNavbarSearchbar();
});
$('#add-to-cart-form').on('submit', function(event) {
event.preventDefault();
$.ajax({
url: '{{ path("app_cart_add") }}',
type: 'POST',
data: $(this).serialize(),
success: function(response) {
if (response.status === 'success') {
// Update the cart item count in the header
$('#korpa').text(response.totalItems);
// Show success toast
$.notify({
message: response.message
},{
type: 'success',
delay: 2000
});
} else {
// Show error toast
$.notify({
message: response.message
},{
type: 'danger',
delay: 2000
});
}
}
});
});
$('#wishList').on('click', function(e) {
e.preventDefault(); // Sprečava standardno ponašanje linka
var productId = $(this).data('product-id');
$.ajax({
url: '{{ path("app_favorite_add") }}', // Symfony ruta za dodavanje omiljenog
type: 'GET', // Metod zahteva, može biti i 'GET' ako je vaša ruta tako definisana
data: { product_id: productId }, // Podaci koji se šalju
success: function(response) {
if (response.status === 'success') {
// Update the cart item count in the header
$('#listaZelja').text(response.totalFavorites);
// Show success toast
$.notify({
message: response.message
},{
type: 'success',
delay: 2000
});
} else {
// Show error toast
$.notify({
message: response.message
},{
type: 'danger',
delay: 2000
});
}
}
});
});
$('#commentForm').submit(function(event) {
event.preventDefault();
$.ajax({
url: '{{ path('app_comment_add', {id: product.id}) }}',
method: 'POST',
data: $(this).serialize(),
success: function(response) {
if (response.status === 'success') {
$.notify({ message: response.message }, { type: 'success' });
} else {
$.notify({ message: response.message }, { type: 'danger' });
}
},
error: function() {
$.notify({ message: 'Došlo je do greške. Pokušajte ponovo.' }, { type: 'danger' });
}
});
});
});
{% block footerjavascript %}
$(document).ready(function() {
$('.addtoKorpa-btn').on('click', function() {
// Prikupljanje ID-a proizvoda iz data atributa dugmeta
var productId = $(this).data('product-id');
// Pronalazak odgovarajuće forme i slanje forme preko AJAX-a
var $form = $('#add-to-cart-form-' + productId);
$.ajax({
url: $form.attr('action'),
type: 'POST',
data: $form.serialize(),
success: function(response) {
if (response.status === 'success') {
// Ažuriranje broja proizvoda u korpi u zaglavlju
$('#korpa').text(response.totalItems);
// Prikazivanje uspešne poruke
$.notify({
message: response.message
},{
type: 'success',
delay: 2000
});
} else {
// Prikazivanje poruke o grešci
$.notify({
message: response.message
},{
type: 'danger',
delay: 2000
});
}
}
});
return false; // Sprečavanje default submitovanja forme
});
$('.addtoKorpaModal-btn').on('click', function() {
// Pronalazak najbliže forme roditelja dugmeta
var $form = $(this).closest('form');
$.ajax({
url: $form.attr('action'),
type: 'POST',
data: $form.serialize(),
success: function(response) {
if (response.status === 'success') {
// Ažuriranje broja proizvoda u korpi u zaglavlju
$('#korpa').text(response.totalItems);
// Prikazivanje uspešne poruke
$.notify({
message: response.message
},{
type: 'success',
delay: 2000
});
} else {
// Prikazivanje poruke o grešci
$.notify({
message: response.message
},{
type: 'danger',
delay: 2000
});
}
}
});
return false; // Sprečavanje default submitovanja forme
});
$('.search-type').on('input', function() {
var query = $(this).val();
if (query.length >= 3) {
$.ajax({
url: "{{ path('app_ajax_search') }}",
type: "GET",
dataType: 'json',
data: {
q: query
},
success: function(data) {
var resultsContainer = $('#search-results');
resultsContainer.empty();
if (data.results.length > 0) {
$.each(data.results, function(index, product) {
var productHtml = '<li>' +
'<div class="product-cart media">' +
'<img src="' + product.slika + '" class="img-fluid blur-up lazyload" alt="">' +
'<div class="media-body">' +
'<a href="' + product.link + '">' +
'<h6 class="mb-1">' + product.text + '</h6>' +
'</a>' +
'<p class="mb-0 mt-1">' + product.pricePDV + ' RSD</p>' +
'</div>' +
'</div>' +
'</li><br>';
// var productHtml = '<div><a href="' + product.link + '" class="man-section"><div class="image-section"><img src=' +
// product.slika +
// '></div><div class="description-section"><h6>' +
// product.text +
// "</h6><span>" +
// product.pricePDV +
// "</span></div></a>";
resultsContainer.append(productHtml);
});
} else {
resultsContainer.append('<div class="empty-message">',
"Nije pronađen nijedan proizvod !",
"</div>");
}
},
error: function() {
console.log('Error loading search results.');
}
});
}
});
$('.close-search').on('click', function() {
$('.search-type').val('');
$('#search-results').empty();
});
function updateCartCount() {
$.ajax({
url: '{{ path('app_cart_count') }}',
method: 'GET',
success: function(response) {
$('#korpa').text(response.totalItems);
},
error: function() {
console.error('Failed to fetch cart count.');
}
});
}
updateCartCount();
{% if app.user %}
$('[id^=zelja_]').on('click', function(e) {
e.preventDefault(); // Sprečava standardno ponašanje linka ili dugmeta
var productId = $(this).data('product-id');
$.ajax({
url: '{{ path("app_favorite_add") }}', // Symfony ruta za dodavanje omiljenog
type: 'GET', // Metod zahteva, može biti i 'GET' ako je vaša ruta tako definisana
data: { product_id: productId }, // Podaci koji se šalju
success: function(response) {
if (response.status === 'success') {
// Update the cart item count in the header
$('#listaZelja').text(response.totalFavorites);
// Show success toast
$.notify({
message: response.message
},{
type: 'success',
delay: 2000
});
} else {
// Show error toast
$.notify({
message: response.message
},{
type: 'danger',
delay: 2000
});
}
}
});
});
function updateFavoriteCount() {
$.ajax({
url: '{{ path('app_favorite_count') }}',
method: 'GET',
success: function(response) {
$('#listaZelja').text(response.totalFavorites);
},
error: function() {
console.error('Failed to fetch cart count.');
}
});
}
updateFavoriteCount();
{% endif %}
$('li.sort_dropdown a').addClass('dropdown-item');
});
function printPage() {
window.print();
}
{% endblock footerjavascript %}
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Select all <li> elements with class 'submenu-title'
var submenuTitles = document.querySelectorAll('li.submenu-title');
// Iterate over each <li> element
submenuTitles.forEach(function(submenuTitle) {
// Find all <span> elements with class 'according-menu' within the current <li>
var spans = submenuTitle.querySelectorAll('span.according-menu');
// Remove each <span> element with class 'according-menu'
spans.forEach(function(span) {
span.remove();
});
});
});
</script>
</body>
</html>