public/page_product.phtml line 735

Open in your IDE?
  1. <?php
  2. require_once __DIR__ '/includes/auctionfee.php';
  3. require_once __DIR__ '/includes/Categories.php';
  4. require_once __DIR__ '/includes/ProductFieldsTableRender.php';
  5. /**
  6.  * $products_id is defined in index.phtml
  7.  * @var mysqli $db   defined in require.phtml, included thru index.phtml
  8.  *
  9.  * @var Trans $trans
  10.  * @var UrlGeneratorInterface $urlGenerator
  11.  * @var ContainerInterface $container
  12.  * @var ContainerBagInterface $parameters
  13.  * @var ManifestAssets $manifestAssets
  14.  * @var Environment $twig
  15.  * @var UserCollection $multiUserCollection
  16.  * @var Request $request
  17.  * @var PropUserData $propUserData
  18.  */
  19. use Klaravik\Assets\ManifestAssets;
  20. use Klaravik\Common\Collections\UserCollection;
  21. use Klaravik\Enum\ProductFieldsEnum;
  22. use Klaravik\Enum\ReservePriceStatusEnum;
  23. use Klaravik\Exception\MissingResultException;
  24. use Klaravik\Images\ProductImage;
  25. use Klaravik\Images\ProductImagesViewCollection;
  26. use Klaravik\includes\ProductFieldsTableRender;
  27. use Klaravik\includes\Categories;
  28. use Klaravik\Product\ProductCardRenderer;
  29. use Klaravik\Breadcrumb\Breadcrumb;
  30. use Klaravik\Model\ExtraVehicle;
  31. use Klaravik\Model\VendorType;
  32. use Klaravik\Page\PropUserData;
  33. use Klaravik\Product\BasicData\RenderBasicProductData;
  34. use Klaravik\Product\Condition\RenderConditionData;
  35. use Klaravik\Product\Equipment\RenderEquipmentData;
  36. use Klaravik\Product\Util\TimeLeftUtil;
  37. use Klaravik\Repository\ProductDescriptionRepo;
  38. use Klaravik\Repository\ProductsRegisterRefRepo;
  39. use Klaravik\Repository\VendorTypeRepo;
  40. use Klaravik\Translate\Trans;
  41. use Klaravik\Product\ExtraVehicle\RenderExtraVehicleData;
  42. use Klaravik\Repository\ExtraVehicleRepo;
  43. use Symfony\Component\DependencyInjection\ContainerInterface;
  44. use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface;
  45. use Symfony\Component\HttpFoundation\Request;
  46. use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
  47. use Klaravik\Repository\UserRepo;
  48. use Klaravik\Repository\ProductFlagRepo;
  49. use Klaravik\Exception\RepositoryException;
  50. use Twig\Environment;
  51. use Twig\Error\LoaderError;
  52. use Twig\Error\RuntimeError;
  53. use Twig\Error\SyntaxError;
  54. $categoriesObject = new Categories($trans$urlGenerator);
  55. $productFieldsRender null;
  56. $productCardRenderer = new ProductCardRenderer($twig$propUserData$parameters);
  57. $productListRepository = new \Klaravik\Repository\ProductListRepository($db);
  58. /**
  59.  * Returns a valid url for getting back to vendor view
  60.  *
  61.  * @param UrlGeneratorInterface $urlGenerator
  62.  * @return string
  63.  */
  64. function getReturnUrl(UrlGeneratorInterface $urlGenerator): string {
  65.     if (isset($_GET['vendorTab'])) {
  66.         $params = ['vendortab' => $_GET['vendorTab']];
  67.         if (isset($_GET['productspage'])) {
  68.             $params['productspage'] = $_GET['productspage'];
  69.         }
  70.         return $urlGenerator->generate('app.legacy.pages.vendor.subpage'$params);
  71.     }
  72.     return '';
  73. }
  74. /**
  75.  * @return bool
  76.  */
  77. function isKam(): bool
  78. {
  79.     $userIsKam FALSE;
  80.     if (isset($_SESSION['users_id'])) {
  81.         try {
  82.             $userIsKam = (new UserRepo())->userIsKam($_SESSION['users_id'])->getId() === $_SESSION['users_id'];
  83.         } catch (RepositoryException MissingResultException $e) {}
  84.     }
  85.     return $userIsKam;
  86. }
  87. /**
  88.  * Check if a product needs to be reviewed by KAM
  89.  *
  90.  * @throws RepositoryException
  91.  */
  92. function mustBeReviewed(int $products_id): int
  93. {
  94.     return (new ProductFlagRepo())->getByProductId($products_id)->getMustBeReviewed();
  95. }
  96. function buildProductQuery($db$useTable$products_id$language) {
  97.     $query  "SELECT p.*, pd.name AS name, pd.description AS description, pd.county_id, pd.fabrikat AS fabrikat, pd.model AS model, pd.enteredByKam, ";
  98.     $query .= "pd.includesForewordInDescription as includesForewordInDescription, pd.previewHash, pd.extraVehicleDescription, pd.extraDescription, pd.descriptionPreamble, ";
  99.     $query .= "CASE WHEN (p.auctionend < NOW() AND p.paymentbasis_id > 0) THEN 1 ELSE 0 END AS isSold, ";
  100.     $query .= "pd.filelinkname AS filelinkname, pd.urlname AS urlname, p.price AS price, p.resprice AS resprice, p.canceled AS canceled, ";
  101.     $query .= "DATE_FORMAT(p.auctionstart, '%Y-%m-%d') AS astartdate, DATE_FORMAT(p.auctionstart, '%H:%i') AS astartkl, ";
  102.     $query .= "DATE_FORMAT(p.auctionend, '%Y-%m-%d') AS aenddate, DATE_FORMAT(p.auctionend, '%H:%i') AS aendkl, ";
  103.     $query .= "DATE_FORMAT(p.auctionstart, '%Y%m%d%H%i%s') AS fullstart, DATE_FORMAT(p.auctionend, '%Y%m%d%H%i%s') AS fullend, ";
  104.     $query .= "DATE_FORMAT(p.auctionend, '%Y-%m-%d %H:%i:%s') AS ddend, ";
  105.     $query .= "DATE_FORMAT(p.auctionend, '%H:%i') AS kl, ";
  106.     $query .= "DATE_FORMAT(p.auctionend, '%Y') AS oyear, DATE_FORMAT(p.auctionend, '%m') AS omonth, DATE_FORMAT(p.auctionend, '%d') AS oday ";
  107.     $query .= "FROM ".$useTable." p, products_description pd ";
  108.     $query .= "WHERE p.id='".mysqli_real_escape_string($db$products_id)."' ";
  109.     //$query .= "AND p.online=1 AND p.commissions_id!=0 ";
  110.     $query .= "AND pd.products_id=p.id AND pd.language_id='".$language."'";
  111.     //print $query."<br />";
  112.     return $query;
  113. }
  114. /**
  115.  * @param mysqli $db
  116.  * @param int $products_id
  117.  * @return string
  118.  */
  119. function recentProductChanges(mysqli $dbint $products_id) {
  120.     $rpcRes mysqli_query($db"SELECT * FROM recentProductChanges WHERE `products_id` = " $products_id);
  121.     if (mysqli_num_rows($rpcRes)) {
  122.         $rpcObj mysqli_fetch_object($rpcRes);
  123.         if (!empty($rpcObj->changes)) {
  124.             return $rpcObj->changes;
  125.         }
  126.     }
  127.     return '';
  128. }
  129. /**
  130.  * @param mysqli $db
  131.  * @param int $products_id
  132.  * @return array
  133.  */
  134. function getHighlightedFieldsAndValues(mysqli $dbint $products_id): array
  135. {
  136.     $highlightedFieldsArray = [];
  137.     $hfRes mysqli_query($db"SELECT pV.value, pF.value AS productFieldName FROM productvalues pV
  138.                                         LEFT JOIN productfields pF on pF.id = pV.productfields_id
  139.                                         WHERE pF.highlight = 1 AND `products_id` = " $products_id);
  140.     if (mysqli_num_rows($hfRes)) {
  141.         $values mysqli_fetch_all($hfResMYSQLI_ASSOC);
  142.         foreach($values as $value) {
  143.             $highlightedFieldsArray[$value['productFieldName']] = $value['value'];
  144.         }
  145.     }
  146.     return $highlightedFieldsArray;
  147. }
  148. if(isset($products_id) && is_numeric($products_id)){
  149.   $counties getAllCounties($db);
  150.   $shortDescription = (new ProductDescriptionRepo())->getByProductsId($products_id)->getShortDescription() ?: null;
  151.   $useTable 'products';
  152.   $query buildProductQuery($db$useTable$products_idLANGUAGE_ID);
  153.   $result mysqli_query($db$query);
  154.   if (mysqli_num_rows($result) == 0) {
  155.     $useTable 'products_archive';
  156.     $query buildProductQuery($db$useTable$products_idLANGUAGE_ID);
  157.     $result mysqli_query($db$query);
  158.   }
  159.   if(mysqli_num_rows($result)){
  160.     $obj mysqli_fetch_object($result);
  161.     $productFieldsRender = new ProductFieldsTableRender($db$obj);
  162.     // If copiedFrom_id and leasing_company_id and 'manuel försäljning' is isset/true then read bids from the original product.
  163.     $getBidBoxFromCopy false;
  164.     if ($obj->leasing_company_id && $obj->copiedFrom_id && $obj->annulment_reasons_id 100) {
  165.         $getBidBoxFromCopy getBidHistoryFromCopy($db$obj->id$obj->copiedFrom_id);
  166.     }
  167.     $county getNodei($db"county",$obj->county_id);
  168.     $countyParent getNodei($db'county',$county->parent_id);
  169.     $images = array();
  170.     try {
  171.         $images = new ProductImagesViewCollection($db$obj->id);
  172.     } catch (Exception $exception) {
  173.     }
  174.     $previewAvailable false;
  175.     if(
  176.         ((new DateTime() < new DateTime($obj->auctionstart)) || !$obj->online)
  177.     ) {
  178.         if (array_key_exists('preview'$_REQUEST)) {
  179.             $previewAvailable = ($_REQUEST['preview'] === $obj->previewHash);
  180.         } elseif (
  181.             (isset($_SESSION['users_id']) && array_key_exists($obj->vendors_id$_SESSION['vendorAccess']))
  182.             || (array_key_exists('is_admin'$_SESSION) && $_SESSION['is_admin'])
  183.         ) {
  184.             $previewAvailable true;
  185.         }
  186.     }
  187.     if (
  188.             ((int)$obj->online === 1
  189.             && (int)$obj->commissions_id !== 0
  190.             && (int)$obj->fullstart &&
  191.             date("YmdHis") >= $obj->fullstart)
  192.             || (isset($_SESSION['users_id']) && array_key_exists($obj->vendors_id$_SESSION['vendorAccess']))
  193.             || (array_key_exists('is_admin'$_SESSION) && $_SESSION['is_admin'])
  194.             || $previewAvailable
  195.     ){
  196.       mysqli_query($db"UPDATE products SET viewcounter=(viewcounter + 1) WHERE id='".mysqli_real_escape_string($db$obj->id)."'");
  197.       $secleft 0;
  198.       $timeleft $trans->get('text_label_page-product_not-started');
  199.       if($obj->ddend date("Y-m-d H:i:s")) {
  200.           $secleft strtotime($obj->ddend) - strtotime(date("Y-m-d H:i:s"));
  201.           $timeleft $container->get(TimeLeftUtil::class)->withoutIcon()->timeLeft(new \DateTime($obj->ddend));
  202.       } elseif ($obj->ddend date("Y-m-d H:i:s")) {
  203.           $timeleft $trans->get('text_label_ajax-product-json_time-left-completed');
  204.       }
  205.       if($obj->canceled) {
  206.           $secleft 0;
  207.           $timeleft $trans->get('text_label_page-product_cancelled');
  208.       }
  209.         $nbrBids 0;
  210.         $highBid 0;
  211.         $highestBidder null;
  212.         $lastBid = new stdClass();
  213.         $lastBid->bid = -1;
  214.         $mbidSql  "SELECT *, DATE_FORMAT(entered, '%Y') AS year, DATE_FORMAT(entered, '%m') AS month, DATE_FORMAT(entered, '%d') AS day, DATE_FORMAT(entered, '%H:%i') AS kl FROM bids ";
  215.         $mbidSqlId $obj->id;
  216.         if($getBidBoxFromCopy) {
  217.             $mbidSqlId $obj->copiedFrom_id;
  218.         }
  219.         $mbidSql .= "WHERE products_id= " . (int) $mbidSqlId " ORDER BY bid DESC, id DESC";
  220.       $mbidRes mysqli_query($db$mbidSql);
  221.       $nbrBids mysqli_num_rows($mbidRes);
  222.       if($nbrBids){
  223.         $i 1;
  224.         while($mbid mysqli_fetch_object($mbidRes)){
  225.           if($i == 1){
  226.             $highestBidder $mbid->register_id;
  227.             $lastBid $mbid;
  228.             $highBid $mbid->bid;
  229.           }
  230.           $i++;
  231.         }
  232.       }
  233.       $bidinc 0;
  234.       $bssql "SELECT * FROM biddingsteps ORDER BY level DESC";
  235.       $bsres mysqli_query($db$bssql);
  236.       while($bs mysqli_fetch_object($bsres)){
  237.         if($lastBid->bid <= $bs->level){
  238.           $bidinc $bs->step;
  239.         }
  240.       }
  241.       if($nbrBids 0$bidtext $trans->get('text_label_page-product_min-bid-increased');
  242.       else $bidtext $trans->get('text_label_page-product_min-bid');
  243.       $minimumBid = ($highBid $bidinc);
  244.       if($highBid == 0$minimumBid $obj->price;
  245.       if ($minimumBid == 0$minimumBid $bidinc;
  246.       $vendor getNodei($db"vendors"$obj->vendors_id);
  247.       if($vendor->isAnon){
  248.         $vendorName $trans->get('text_label_page-product_anonymous');
  249.         if($vendor->companytype){
  250.           $vendortype getNodei($db"vendortypes"$vendor->companytype);
  251.           if($vendortype->typename != ""){
  252.             $vendorName $vendortype->typename;
  253.           }
  254.         }
  255.       }
  256.       else {
  257.         $vendorName $vendor->company;
  258.       }
  259.       $vendorType = new VendorType();
  260.       try {
  261.          $vendorType = (new VendorTypeRepo())->getById($vendor->companytype);
  262.       } catch (MissingResultException|RepositoryException $e) {
  263.       }
  264.     $bids = array();
  265.     $mbidSqlId $obj->id;
  266.     if($getBidBoxFromCopy) {
  267.         $mbidSqlId $obj->copiedFrom_id;
  268.     }
  269.     $bidsSql "SELECT id, register_id, bid, ip, entered, DATE_FORMAT(entered, '%m') AS bmonth,
  270.        DATE_FORMAT(entered, '%d') AS bday, DATE_FORMAT(entered, '%H:%i') AS kl
  271.     FROM bids
  272.     WHERE products_id={$mbidSqlId}
  273.     ORDER BY bid DESC, id DESC";
  274.     $bidders getBidderNumbers($db$products_id);
  275.     $leaderBidderNumber array_key_exists($highestBidder$bidders) ? $bidders[$highestBidder] : 0;
  276.     $bidsResult mysqli_query($db$bidsSql);
  277.     if (mysqli_num_rows($bidsResult) > 0) {
  278.         while ($bid mysqli_fetch_object($bidsResult)) {
  279.             // SPECIAL: Pga krockande maxbud kan visa bud vara sparade som xxx99 men ska visas som jämnt 100-tal
  280.             if ($bid->bid 10) {
  281.                 $bid->bid += 1;
  282.             }
  283.             $isAutoBid false;
  284.             if ($bid->ip === "Budhöjaren") {
  285.                 $isAutoBid true;
  286.             }
  287.             $negotiation false;
  288.             if ($bid->ip === "Förhandling") {
  289.                 $negotiation true;
  290.             }
  291.             $bidderNumber array_key_exists($bid->register_id$bidders) ? $bidders[$bid->register_id] : 0;
  292.             $userIsBidder false;
  293.             if (array_key_exists('register_id'$_SESSION) &&
  294.                 (int)$_SESSION['register_id'] === (int)$bid->register_id) {
  295.                 $userIsBidder true;
  296.             }
  297.             $bidData = array(
  298.                 'id' => $bid->id,
  299.                 'bidTime' => $trans->get(
  300.                         'text_label_page-product_date-time_day-short-month-time',
  301.                         ['dateTime' => new DateTime($bid->entered)]
  302.                 ),
  303.                 'bidTimeUnix' => (new DateTime($bid->entered))->getTimestamp(),
  304.                 'userIsBidder' => $userIsBidder,
  305.                 'user' => $bidderNumber,
  306.                 'bidSum' => (int)$bid->bid,
  307.                 'autoBid' => $isAutoBid,
  308.                 'negotiation' => $negotiation,
  309.             );
  310.             if (array_key_exists('is_admin'$_SESSION) && (bool)$_SESSION['is_admin']) {
  311.                 $bidData['userId'] = (int)$bid->register_id;
  312.             }
  313.             $bids[] = $bidData;
  314.         }
  315.     }
  316.     ?>
  317.          <div class="row">
  318.                 <div class="columns large-12">
  319.                     <div class="product-page-breadcrumbs">
  320.                         <div class="left-blur"></div>
  321.                         <div id="breadcrumbs" class="breadcrumbs">
  322.                             <?php
  323.                             $breadcrumb = new Breadcrumb($trans$urlGenerator);
  324.                             $breadcrumbs $breadcrumb->activeAuctionBreadcrumbs($obj->categories_id);
  325.                             $httpRefer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
  326.                             $urlParams = [];
  327.                             $closedAuction false;
  328.                             if (strpos($httpRefer'bankruptcy') !== false) {
  329.                                 echo '<a href="'.$urlGenerator->generate('app.legacy.auction.listing.bankruptcy').'">'.
  330.                                     $trans->get('text_label_page-product_bankruptcy_auctions') .'</a>';
  331.                                 $breadcrumbs = array();
  332.                             }
  333.                             if($obj->fullend && date("YmdHis") > $obj->fullend){
  334.                                 $closedAuction true;
  335.                                 $breadcrumbs $breadcrumb->closedAuctionBreadcrumbs($obj->categories_id);
  336.                             }
  337.                             if (strpos($httpRefer'searchtext')) {
  338.                                 $breadcrumbs $breadcrumb->getBreadcrumbs($obj->categories_id, array(
  339.                                     array(
  340.                                         'url'  => '',
  341.                                         'name' => $trans->get('text_label_page-product_all-search-result'),
  342.                                     )
  343.                                 ));
  344.                                 preg_match('/searchtext=([a-zA-Z\d%+]+)&?/'$httpRefer$matches);
  345.                                 if (count($matches)) {
  346.                                     $urlParams array_merge($urlParams, ['searchtext' => urldecode($matches[1]), 'dosearch' => '']);
  347.                                 }
  348.                             }
  349.                             $parseUrl parse_url($httpRefer);
  350.                             if (isset($parseUrl['query'])) {
  351.                                 parse_str($parseUrl['query'], $querys);
  352.                                 if (isset($querys['setcountyflag'])) {
  353.                                     $urlParams['setcountyflag'] = $querys['setcountyflag'];
  354.                                 }
  355.                                 if (isset($querys['setmunicipality'])) {
  356.                                     $urlParams['setmunicipality'] = $querys['setmunicipality'];
  357.                                 }
  358.                                 if (isset($querys['reserve'])) {
  359.                                     $urlParams['reserve'] = $querys['reserve'];
  360.                                 }
  361.                             }
  362.                             foreach($breadcrumbs as $index => $breadcrumbArray) {
  363.                                 $breadcrumbUrlParams $urlParams;
  364.                                 $routeName $closedAuction 'app.legacy.auction.listing.closed' 'app.legacy.auction.listing';
  365.                                 if (!empty($breadcrumbArray['url'])) {
  366.                                     $routeName $closedAuction 'app.legacy.auction.listing.closed.category' 'app.legacy.auction.listing.category';
  367.                                     $breadcrumbUrlParams['caturlname'] = $breadcrumbArray['url'];
  368.                                 }
  369.                                 echo '<a href="'.$urlGenerator->generate($routeName$breadcrumbUrlParams).'">'.$breadcrumbArray['name'].'</a>';
  370.                             }
  371.                             echo '<span>'$trans->get('text_label_page-product_object', ['object_id' => $obj->id]) .'</span>';
  372.                             ?>
  373.                         </div>
  374.                         <div class="right-blur"></div>
  375.                         <hr>
  376.                     </div>
  377.                 </div>
  378.             </div>
  379.         <?php
  380.         if ($previewAvailable) {
  381.             $respricePrice $trans->get('info_label_page-product_reserved-price', ['resprice' => (int)$obj->resprice]);
  382.         }
  383.         $regObj null;
  384.         $registerAllowedToBid false;
  385.         $canBidBankId true;
  386.         if (isset($_SESSION['register_id'])) {
  387.             $regObj getNodei($db"register"$_SESSION['register_id']);
  388.         }
  389.         $reservPriceReached = ($nbrBids && $lastBid->bid >= $obj->resprice && $obj->resprice 0) || (int)$obj->resprice === 0;
  390.         $reservationPriceAlias $trans->get("ALIAS_RESERVATIONPRICE_INFO");
  391.         $aendtime '';
  392.         if ((int)$obj->omonth) {
  393.             $aendtime $trans->get(
  394.                 'text_label_page-product_date-time_day-short-month-time',
  395.                 ['dateTime' => new DateTime($obj->auctionend)]
  396.             );
  397.             // Add year to the endTime if the year is not the current year.
  398.             if (date("Y",strtotime($obj->ddend)) != date("Y")) {
  399.                 $aendtime $trans->get(
  400.                     'text_label_page-product_date-time_day-short-month-year-time',
  401.                     ['dateTime' => new DateTime($obj->auctionend)]
  402.                 );
  403.             }
  404.         }
  405.         if ($regObj) {
  406.             // Precaution because we don't know how these are saved as.
  407.             $private $vendor->clientnbr && str_contains(strtolower($vendor->clientnbr), 'privat');
  408.             $vendorClientNBR trim(preg_replace('/\D/'''$vendor->clientnbr));
  409.             $registerClientNBR trim(preg_replace('/\D/'''$regObj->clientnbr));
  410.             $allowedClientType 'allowedBidder' $regObj->clienttype;
  411.             $deniedBidderAlias 'ALIAS_DENIEDBIDDER_' $regObj->clienttype;
  412.             $deniedBidderHeaderAlias 'ALIAS_DENIEDBIDDER_HEADER_' $regObj->clienttype;
  413.             if ((int)$obj->{$allowedClientType} === && ($vendorClientNBR !== $registerClientNBR || ($private && $parameters->get("app.instance") === 'dk'))) {
  414.                 $registerAllowedToBid true;
  415.             }
  416.         }
  417.         if (
  418.             $parameters->get('app.bankid.enable') &&
  419.             $parameters->get('app.bankid.force') &&
  420.             isset($_SESSION['register_id']) &&
  421.             isset($_SESSION['bankIDActive']) &&
  422.             !$_SESSION['bankIDActive'] &&
  423.             !$_SESSION['exceptRequiredAuthentication']
  424.         ) {
  425.             $canBidBankId false;
  426.         }
  427.         if ($registerAllowedToBid && !isset($_SESSION['late_payments']) && !isset($_SESSION['user_banned'])) {
  428.           unset($umb);
  429.           $umbSql "SELECT * FROM maxbids WHERE products_id='" mysqli_real_escape_string($db$obj->id) . "' ";
  430.           $umbSql .= "AND register_id='" mysqli_real_escape_string($db$_SESSION["register_id"]) . "' AND reached='N'";
  431.           $umbRes mysqli_query($db$umbSql);
  432.           if (mysqli_num_rows($umbRes)) {
  433.               $umb mysqli_fetch_object($umbRes);
  434.           }
  435.         }
  436.         $bidBoxData = array(
  437.             'bid' => (int)$highBid,
  438.         );
  439.         $status 'online';
  440.         if (new DateTime($obj->ddend) < new DateTime()) {
  441.             $status 'ended';
  442.         }
  443.         if ((int) $obj->canceled) {
  444.             $status 'canceled';
  445.         }
  446.         $closeBoxData = array(
  447.             'timeLeft' => $timeleft,
  448.             'auctionEndTime' => $aendtime,
  449.             'auctionEndTimeUnix' => strtotime($obj->fullend),
  450.             'printData' => array(
  451.                 'imgSrc' => $parameters->get('app.image.path') . '/icon-calender.svg',
  452.             ),
  453.             'status' => $status,
  454.         );
  455.         $biddingBox = array(
  456.             'bidder' => $leaderBidderNumber,
  457.             'noBids' => count($bids),
  458.             'bids' => $bids,
  459.         );
  460.         $userData = array(
  461.             'type' => (array_key_exists("register_clientType"$_SESSION) ? $_SESSION["register_clientType"] : ""),
  462.             'isLoggedIn' => array_key_exists('register_id'$_SESSION),
  463.             'incVat' => false,
  464.             'canBid' => (
  465.                 (
  466.                     $registerAllowedToBid
  467.                     && !isset($_SESSION['late_payments'])
  468.                     && !isset($_SESSION['user_banned'])
  469.                     && $obj->canceled === 0
  470.                 )
  471.                 && (
  472.                     $regObj->clienttype == "SF"
  473.                     || $regObj->clienttype == "SP"
  474.                     || (
  475.                         (
  476.                             $regObj->clienttype == "UF" || $regObj->clienttype == "UP"
  477.                         )
  478.                         && $regObj->vatValidated == 1
  479.                     )
  480.                 )
  481.                 && date("YmdHis") >= $obj->fullstart
  482.                 && $obj->fullstart !== 0
  483.                 && $obj->online === 1
  484.             ),
  485.             'canBidBankid' => $canBidBankId,
  486.             'bankIdEnable' => $parameters->get('app.bankid.enable'),
  487.             'umb' => (isset($umb) ? number_format($umb->bid0',''') : false),
  488.             'inPreviewMode' => $previewAvailable,
  489.             'vatable' => (is_object($regObj) ? (int)$regObj->vatable:0),
  490.         );
  491.         $isFav false;
  492.         if (isset($_SESSION['register_id']) && !($obj->fullend && date("YmdHis") > $obj->fullend) ):
  493.             try {
  494.                 $isFav = (new ProductsRegisterRefRepo())
  495.                     ->registerHasProductAsFavorite($obj->id$_SESSION['register_id']);
  496.             } catch (RepositoryException $e) {}
  497.         endif;
  498.             $reservationPriceStatus ReservePriceStatusEnum::NOTREACHED()->label;
  499.             if (=== (int)$obj->resprice) {
  500.                 $reservationPriceStatus ReservePriceStatusEnum::NONE()->label;
  501.             } elseif (($obj->resprice && $obj->resprice <= $highBid)) {
  502.                 $reservationPriceStatus ReservePriceStatusEnum::REACHED()->label;
  503.             }
  504.             $productData = array(
  505.                 'id' => $obj->id,
  506.                 'isFav' => $isFav,
  507.                 'previewHash' => isset($_REQUEST['preview']) ? htmlspecialchars($_REQUEST['preview'], ENT_QUOTES) : '',
  508.                 'closed' => ($obj->fullend && date("YmdHis") > $obj->fullend true ''),
  509.                 'vat' => ($obj->momsavdrag == ? (int)$obj->moms 0),
  510.                 'vmb' => (int)$obj->vmb,
  511.                 "nextBid" => (int)$minimumBid,
  512.                 'momsavdrag' => (int)$obj->momsavdrag,
  513.                 'bidStep' => (int)$bidinc,
  514.                 'auctionFee' => (int)auctionFee($db, (int)$products_id),
  515.                 'bidBox' => $bidBoxData,
  516.                 'reservePriceReached' => $reservPriceReached,
  517.                 'reservePriceStatus' => $reservationPriceStatus,
  518.                 'closeBox' => $closeBoxData,
  519.                 'biddingBox' => $biddingBox,
  520.                 'user' => $userData,
  521.                 'region' => (isset($_SESSION['register_country_region']) ? (int)$_SESSION['register_country_region'] : ""),
  522.                 'vatValidated' => (isset($_SESSION['vatValidated']) ? (int)$_SESSION['vatValidated'] : ""),
  523.                 'url' => $urlGenerator->generate('app.legacy.auction.object', ['produrlname' => $obj->urlname]),
  524.                 'bidInfoManual' => $trans->get('ALIAS_PRODUCT_BID_INFO_MANUAL'),
  525.                 'bidButtonManual' => $trans->get('ALIAS_PRODUCT_BID_BUTTON_MANUAL'),
  526.                 'bidButtonAuto' => $trans->get("ALIAS_PRODUCT_BID_BUTTON_AUTO"),
  527.                 'bidInfoAuto' => $trans->get('ALIAS_PRODUCT_BID_INFO_AUTO'),
  528.                 'urlRegister' => $urlGenerator->generate('app.legacy.pages.register'),
  529.                 'urlLoginBuyer' => $urlGenerator->generate('app.legacy.pages.login', ['continue' => $urlGenerator->generate('app.legacy.auction.object', ['produrlname' => $obj->urlname])]),
  530.                 'zendeskChat' => ZENDESKCHAT,
  531.                 'switchAccount' => !$multiUserCollection->empty(),
  532.             );
  533.         $showFinance true;
  534.         $yearModelExists false;
  535.         $serialNumberExists false;
  536.         $displayFinancing false;
  537.         $resYear mysqli_query($db"SELECT `pv`.`value`, `pf`.`mascusDbname`, `pf`.`infocarElement` FROM `productvalues` `pv`
  538.                 LEFT JOIN `productfields` `pf` ON `pf`.`id` = `pv`.`productfields_id`
  539.                 LEFT JOIN `products` `p` ON `p`.`id` = `pv`.`products_id`
  540.                 LEFT JOIN `categories` `c` ON `c`.`id` = `pf`.`categories_id` AND `p`.`categories_id` = `c`.`id`
  541.                 WHERE `p`.`id` = ".(int)$obj->id." AND p.moms=25 AND p.momsavdrag=1 AND p.vmb=0 AND `pf`.`online` = 1 AND `pf`.`parent_id` = 0
  542.                 AND (`pf`.`mascusDbname` = 'yearofmanufacture' or `pf`.`infocarElement` = 'generationSold' or `pf`.`infocarElement` = 'generationDesign' or `pf`.`infocarElement` = 'vinCode' or `pf`.`mascusDbname` = 'manufacturenumber')");
  543.         while($rowYear mysqli_fetch_object($resYear)) {
  544.             if ($rowYear->mascusDbname === 'manufacturenumber' || $rowYear->infocarElement === 'vinCode') {
  545.                 if (strlen($rowYear->value) > 0) {
  546.                     $serialNumberExists true;
  547.                 }
  548.             } else {
  549.                 if (strlen((int)$rowYear->value) == 4) {
  550.                     if ((int)date("Y")-((int)$rowYear->value) <= SGFINANCE_YEARLIMIT) {
  551.                         $yearModelExists true;
  552.                     }
  553.                 }
  554.             }
  555.         }
  556.         $displayFinancingForUser true;
  557.         if ($obj->fullend && date("YmdHis") > $obj->fullend) {
  558.             $displayFinancingForUser false;
  559.             $bidRes mysqli_query($db"SELECT register_id FROM bids WHERE products_id=".(int)$obj->id." AND bid >= ".$obj->resprice." ORDER BY bid DESC, id DESC LIMIT 1");
  560.             if (mysqli_num_rows($bidRes)) {
  561.                 $bidObj mysqli_fetch_object($bidRes);
  562.                 if (isset($_SESSION['register_id']) && (int)$_SESSION["register_id"] === (int)$bidObj->register_id) {
  563.                     $displayFinancingForUser true;
  564.                 }
  565.             }
  566.         }
  567.         if (
  568.                 (int)$obj->allowedBidderSF === && $yearModelExists && $serialNumberExists &&
  569.                 ((int)$obj->market_value >= SGFINANCE_MARKET_VALUE_MINIMUM && (int)$obj->showSgDespiteLowMarketValue === || (int)$obj->showSgDespiteLowMarketValue === 1)
  570.                 && $displayFinancingForUser
  571.         ) {
  572.             $displayFinancing true;
  573.         }
  574.         if (USE_SG_FINANCING == false) {
  575.             $displayFinancing false;
  576.         }
  577.         // Only show SG Finance for BO users when SGFINANCE_AUTH_ACCESS is set to true.
  578.         // Note that nothing will be shown if USE_SG_FINANCING is set to false.
  579.         if (SGFINANCE_AUTH_ACCESS && !array_key_exists('is_admin'$_SESSION)) {
  580.             $displayFinancing false;
  581.         }
  582.         if (!$showFinance) {
  583.             $displayFinancing false;
  584.         }
  585.         // don't show financing for banned users
  586.         if (isset($_SESSION['user_banned'])) {
  587.             $displayFinancing false;
  588.         }
  589.         $youtube null;
  590.         $youtubeThumb null;
  591.         if (empty($obj->youtubelink)) {
  592.             $youtubeQuery "SELECT id FROM products_youtube WHERE products_id=".(int)$obj->id;
  593.             $youtubeResult $db->query($youtubeQuery);
  594.             if (false !== $youtubeResult && !== $youtubeResult->num_rows) {
  595.                 $youtubeObject $youtubeResult->fetch_object();
  596.                 $filename '/products_youtube_video' $youtubeObject->id '.mp4';
  597.                 if (is_file($parameters->get('youtube.path') . $filename)) {
  598.                     $youtube $parameters->get('youtube.url') . $filename;
  599.                     $thumbFile '/products_youtube' $youtubeObject->id '.jpg';
  600.                     if (is_file($parameters->get('youtube.path') . $thumbFile)) {
  601.                         $youtubeThumb $parameters->get('youtube.url') . $thumbFile;
  602.                     }
  603.                 }
  604.             }
  605.         }
  606.         // TODO: This should be delivered to the view as a simple variable
  607.         $conditions 0;
  608.         if($obj->includesForewordInDescription == 1) {
  609.             // Check if there are used productfields with tabtype = 2 (conditions category)
  610.             $pfSql  "SELECT * FROM productfields WHERE categories_id='".mysqli_real_escape_string($db$obj->categories_id)."' AND tabtype='2' ";
  611.             $pfSql .= "AND online>0 AND parent_id=0 AND hideOnObjectPage=0 ORDER BY sortorder";
  612.             $pfRes mysqli_query($db$pfSql);
  613.             if(mysqli_num_rows($pfRes)){
  614.                 while($pf mysqli_fetch_object($pfRes)){
  615.                     unset($pv);
  616.                     $pvSql "SELECT * FROM productvalues WHERE productfields_id='".mysqli_real_escape_string($db$pf->id)."' AND products_id='".mysqli_real_escape_string($db$obj->id)."' ";
  617.                     $pvRes mysqli_query($db$pvSql);
  618.                     if(mysqli_num_rows($pvRes)){
  619.                         $pv mysqli_fetch_object($pvRes);
  620.                         if ((int)$pv->refid !== 0) {
  621.                             $pfoRes mysqli_query($db"SELECT placeholder FROM productfields WHERE id=" . (int)$pv->refid);
  622.                             if (mysqli_num_rows($pfoRes)) {
  623.                                 $pfo mysqli_fetch_object($pfoRes);
  624.                                 if (!(int)$pfo->placeholder) {
  625.                                     if ($pv->value !== "" && $pv->value != $trans->get('text_label_page-product_select-grading')) {
  626.                                         $conditions++;
  627.                                     }
  628.                                 }
  629.                             }
  630.                         } elseif ($pv->value !== "") {
  631.                             $conditions++;
  632.                         }
  633.                     }
  634.                 }
  635.             }
  636.         }
  637.         $hasNotice false;
  638.         if($obj->fullend && date("YmdHis") > $obj->fullend) {
  639.             $hasNotice true;
  640.         }
  641.         $externalLink false;
  642.         if (!empty($obj->filelink)) {
  643.             $externalLink = [
  644.                 'filename' => !empty($obj->filelinkname) ? $obj->filelinkname $trans->get("ALIAS_FILELINK_SHOW"),
  645.                 'filelink' => checkUrl($obj->filelink)
  646.             ];
  647.         }
  648.         $renderEquipmentData = new RenderEquipmentData();
  649.         $equipmentData $renderEquipmentData->renderHtml($obj->id$obj->categories_id);
  650.         $renderProductBasicData = new RenderBasicProductData($trans$obj);
  651.         $basicProductData $renderProductBasicData->renderHtml($obj->id$obj->categories_id);
  652.         $hasFiles $externalLink || canShowTab($trans$db$obj->id3);
  653.         $hasEquipment = !empty($equipmentData);
  654.         $renderConditionData = new RenderConditionData($trans);
  655.         $hasCondition = !empty($renderConditionData->renderHtml($obj->id$obj->categories_id));
  656.         $menuItems = [];
  657.         $menuItems['slider'] = true// an object always needs media, try so sell stuff without images?
  658.         $menuItems['desc'] = true// an object always needs a description
  659.         $menuItems['condition'] = $hasCondition;
  660.         $menuItems['equipment'] = $hasEquipment;
  661.         $menuItems['geolocation'] = true// should always be able to find where the object is located
  662.         $menuItems['files'] = $hasFiles;
  663.         $vendorType = new VendorType();
  664.         try {
  665.             $vendorType = (new VendorTypeRepo())->getById($vendor->companytype);
  666.         } catch (MissingResultException|RepositoryException $e) {
  667.         }
  668.         $departmentIsObest = (
  669.             isset($_SESSION["vendorAccess"][$obj->vendors_id])
  670.             && isset($_SESSION["users_id"])
  671.             && $vendorType->getDepartment() === 'Obest'
  672.             && (int)$obj->fullend === 0
  673.         );
  674.         $showVendorInfoIds $previewAvailable && $departmentIsObest;
  675.       ?>
  676.             <div class="product-grid">
  677.                 <div class="product-grid__aside">
  678.                     <?php
  679.                         if ($showVendorInfoIds):
  680.                     ?>
  681.                         <div class="vendor-info vendor-info--hide-desktop">
  682.                             <div class="vendor-info__content">
  683.                         <?php
  684.                             $vendorIsTypeSeven = (
  685.                                 isset($_SESSION["vendorAccess"][$obj->vendors_id])
  686.                                 && isset($_SESSION["users_id"])
  687.                                 && ($vendorType->getDepartment() === 'Obest' && $vendorType->getBankruptcy() === 0)
  688.                                 && (int)$obj->fullend === 0
  689.                             );
  690.                             // Info area - Intern-id and reserved price, Vendor.
  691.                             if ($previewAvailable && $vendorIsTypeSeven) { ?>
  692.                                 <div class="vendor-info">
  693.                                     <div class="vendor-info__content">
  694.                                     <?php
  695.                                     // Info area - Intern-id and reserved price, Vendor.
  696.                                     if ($showVendorInfoIds): ?>
  697.                                         <div>
  698.                                             <div class="item">
  699.                                                 <span><?php $trans->eGet('text_label_page-product_internal-id'); ?></span>
  700.                                                 <?php print $obj->artno ?>
  701.                                             </div>
  702.                                             <div class="item">
  703.                                                 <span><?php $trans->eGet('info_label_page-product_rek-res-price'); ?></span>
  704.                                                 <?php print $respricePrice?>
  705.                                             </div>
  706.                                         </div>
  707.                                     <?php endif; ?>
  708.                                     </div>
  709.                                 </div>
  710.                             <?php ?>
  711.                             </div>
  712.                         </div>
  713.                         <?php endif;
  714.                     // AUCTION ENDED
  715.                     if ($obj->fullend && date("YmdHis") > $obj->fullend) {
  716.                     ?>
  717.                             <div class='product-grid__notice'>
  718.                                 <div class="product-grid__ended">
  719.                                     <video height='49' width='49' loop="" muted="" autoplay="" playsinline="">
  720.                                         <source src='/assets/videos/klubbad-150x150.mp4' type='video/mp4'>
  721.                                     </video>
  722.                                     <div class="product-grid__ended-text">
  723.                                         <h5><?php $trans->eGet('ALIAS_PRODUCT_CLOSED_HEADER'); ?></h5>
  724.                                         <?php print nl2br($trans->get('ALIAS_PRODUCT_CLOSED_HEADER__DESCRIPTION')); ?>
  725.                                     </div>
  726.                                 </div>
  727.                             </div>
  728.                         <?php
  729.                     }
  730.                     ?>
  731.                     <!-- Object Id -->
  732.                     <div class="product-grid__object-id">
  733.                         <span class='product-grid__object-id-label'>
  734.                             <?php $trans->eGet('text_label_page-product_object-id');?>
  735.                         </span>
  736.                         <?php if(isset($_SESSION['is_admin']) ) { ?>
  737.                             <span id='object-id-copy' class="tag">
  738.                                 <?php print $obj->id?>
  739.                             </span>
  740.                             <span class='id-copied'>
  741.                                 <?php $trans->eGet('info_label_page-product_copied-clipboard');?>
  742.                             </span>
  743.                         <?php } else { ?>
  744.                             <span class="tag">
  745.                                 <?php print $obj->id?>
  746.                             </span>
  747.                         <?php ?>
  748.                     </div>
  749.                     <!-- Object Title Aside -->
  750.                     <h1 class="product-grid__aside-title"><?php echo $obj->name?></h1>
  751.                     <div class="product-grid__company">
  752.                         <!-- Object Municipaity -->
  753.                         <div class="product-grid__municipality">
  754.                             <i class="ri-map-pin-fill"></i> <a href="#nav-freight" data-scroll-smoothly><?php echo $county->name .", "$countyParent->name;?></a>
  755.                         </div>
  756.                         <!-- Object Seller Type -->
  757.                         <span class='product-grid__company-type'>
  758.                             <i class="ri-user-fill"></i> <span><?php echo $vendorName;?> </span>
  759.                         </span>
  760.                     </div>
  761.                     <div class="product-grid__interactions">
  762.                         <div class="share-menu">
  763.                             <button class="button--icon-cta" data-share-menu__trigger>
  764.                                 <i class="ri-share-fill"></i>
  765.                             </button>
  766.                             <div>
  767.                                 <a class="share-menu__item share-menu__item--facebook" target="_blank">
  768.                                     <div class="button--icon-cta">
  769.                                         <i class="ri-facebook-circle-fill"></i>
  770.                                     </div>
  771.                                 </a>
  772.                                 <a class="share-menu__item share-menu__item--linkedin" target="_blank">
  773.                                     <div class="button--icon-cta">
  774.                                         <i class="ri-linkedin-box-fill"></i>
  775.                                     </div>
  776.                                 </a>
  777.                                 <a class="share-menu__item share-menu__item--email">
  778.                                     <div class="button--icon-cta">
  779.                                         <i class="ri-mail-fill"></i>
  780.                                     </div>
  781.                                 </a>
  782.                                 <a class="share-menu__item share-menu__item--sms">
  783.                                     <div class="button--icon-cta">
  784.                                         <i class="ri-chat-3-fill"></i>
  785.                                     </div>
  786.                                 </a>
  787.                                 <a class="share-menu__item share-menu__item--copy">
  788.                                     <div class="button--icon-cta">
  789.                                         <i class="ri-link"></i>
  790.                                     </div>
  791.                                 </a>
  792.                                 <div class="share-menu__overlay"></div>
  793.                             </div>
  794.                         </div>
  795.                         <?php
  796.                         if (!($obj->fullend && date("YmdHis") > $obj->fullend) ): ?>
  797.                             <button class="button--icon-cta product-grid__button-save"
  798.                                 <?php print isset($_SESSION['register_id']) ? '' ' data-no-session ' ?>
  799.                                 data-object-marked="<?php print $isFav '1' '0'?>"
  800.                                 data-object-id="<?php print $obj->id?>"
  801.                                 data-object-name="<?php print htmlspecialchars($obj->name); ?>"
  802.                             >
  803.                                 <span></span>
  804.                             </button>
  805.                         <?php endif; ?>
  806.                     </div>
  807.                     <?php $sideNavItems = [];
  808.                     if ($menuItems['slider']) {
  809.                         $sideNavItems[] = [
  810.                             'href' => '#nav-slider',
  811.                             'icon' => 'image-fill',
  812.                             'label' => $trans->get('text_label_page-product_side-nav_slider')
  813.                         ];
  814.                     }
  815.                     if ($menuItems['desc']) {
  816.                         $sideNavItems[] = [
  817.                             'href' => '#nav-desc',
  818.                             'icon' => 'search-eye-line',
  819.                             'label' => $trans->get('text_label_page-product_side-nav_desc')
  820.                         ];
  821.                     }
  822.                     if ($menuItems['equipment']) {
  823.                         $sideNavItems[] = [
  824.                             'href' => '#nav-base',
  825.                             'icon' => 'play-list-add-line',
  826.                             'label' => $trans->get('text_label_page-product_side-nav_equipment')
  827.                         ];
  828.                     }
  829.                     if ($menuItems['condition']) {
  830.                         $sideNavItems[] = [
  831.                             'href' => '#nav-condition',
  832.                             'icon' => 'calendar-check-fill"',
  833.                             'label' => $trans->get('text_label_page-product_side-nav_condition')
  834.                         ];
  835.                     }
  836.                     if ($menuItems['files']) {
  837.                         $sideNavItems[] = [
  838.                             'href' => '#nav-files',
  839.                             'icon' => 'file-copy-2-fill',
  840.                             'label' => $trans->get('text_label_page-product_side-nav_files')
  841.                         ];
  842.                     }
  843.                     if ($menuItems['geolocation']) {
  844.                         $sideNavItems[] = [
  845.                             'href' => '#nav-freight',
  846.                             'icon' => 'map-pin-fill',
  847.                             'label' => $trans->get('text_label_page-product_side-nav_geolocation')
  848.                         ];
  849.                     }
  850.                    ?>
  851.                     <div class="product-grid__aside-side-nav">
  852.                         <ul class="page-nav" data-nav>
  853.                             <?php foreach ($sideNavItems as &$item):?>
  854.                                 <li class="page-nav__item">
  855.                                     <a class="page-nav__link" href="<?php print($item['href']); ?>" data-scroll-smoothly><i class="ri-<?php print($item['icon']); ?>"></i> <?php print($item['label']); ?></a>
  856.                                 </li>
  857.                             <?php endforeach ?>
  858.                         </ul>
  859.                     </div>
  860.                 </div> <!-- end product-grid__aside -->
  861.                 <div class="print-content product-grid__slider--print">
  862.                     <div class="print-header">
  863.                         <img src="<?php print $parameters->get('app.image.path') . '/klaravik-print-logo.svg'?>" class="klaravik-print">
  864.                         <div class="print-content-date-time">
  865.                             <p class="print-content-date-time__label">
  866.                                 <?php $trans->eGet('text_label_page-product_printed'); ?>
  867.                             </p>
  868.                             <p id="print-date-time">
  869.                                 <?php print date('Y-m-d'time());?> <span><?php print date('h:i'time());?></span>
  870.                             </p>
  871.                         </div>
  872.                     </div>
  873.                     <?php if ($showVendorInfoIds): ?>
  874.                         <div class="vendor-info">
  875.                             <div class="vendor-info__content">
  876.                                 <?php
  877.                                 // Info area - Intern-id and reserved price, Vendor.
  878.                                 if ($showVendorInfoIds): ?>
  879.                                     <div>
  880.                                         <div class="item">
  881.                                             <span><?php $trans->eGet('text_label_page-product_internal-id'); ?></span>
  882.                                             <?php print $obj->artno ?>
  883.                                         </div>
  884.                                         <div class="item">
  885.                                             <span><?php $trans->eGet('info_label_page-product_rek-res-price'); ?></span>
  886.                                             <?php print $respricePrice?>
  887.                                         </div>
  888.                                     </div>
  889.                                 <?php endif; ?>
  890.                             </div>
  891.                         </div>
  892.                     <?php endif;?>
  893.                     <?php
  894.                     $printImageUrl '/images/image-missing-large.png';
  895.                     /** @var ProductImage|bool $printImage */
  896.                     $printImage $images->first();
  897.                     if (false !== $printImage) {
  898.                         $printImageUrl $printImage->getImageUrl('large');
  899.                     }
  900.                     ?>
  901.                     <img src="<?php print $printImageUrl;?>" alt="<?php print $obj->name;?>"/>
  902.                 </div>
  903.                 <div id="nav-slider" class="product-grid__slider">
  904.                     <div class="carousel-wrapper">
  905.                         <div class="carousel__toolbar-wrapper">
  906.                             <div class="carousel__counter">
  907.                                 <span class="carousel__index">1</span>
  908.                                 <span class="carousel__separator"><?php $trans->eGet('text_label_page-product_slider_count-separator'); ?></span>
  909.                                 <span class="carousel__count"></span>
  910.                             </div>
  911.                         </div>
  912.                         <div id="lightbox" class="carousel f-carousel">
  913.                         <?php
  914.                         foreach ($images as $index => $image) {
  915.                             if ( $index === 1) {
  916.                                 if ($obj->youtubelink) {
  917.                                     //TODO: make a fallback solution to check if maxresdefault exists otherwise change to hqdefault.jpg
  918.                                     $fancyBoxLink $obj->youtubelink;
  919.                                     $videoElement '
  920.                                         <img
  921.                                             class="hidden"
  922.                                             loading="lazy"
  923.                                             src="https://img.youtube.com/vi/' youtubeIdFromLink($fancyBoxLink) . '/maxresdefault.jpg"
  924.                                             alt=""
  925.                                         />
  926.                                     ';
  927.                                 } elseif (null !== $youtube) {
  928.                                     $fancyBoxLink $youtube;
  929.                                     $videoElement '
  930.                                         <video>
  931.                                             <source src="'.$youtube.'#t=0.001" type="video/mp4">
  932.                                             '.$trans->get("info_label_page-product_browser-support").'
  933.                                         </video>
  934.                                     ';
  935.                                     if (null !== $youtubeThumb) {
  936.                                         $videoElement '
  937.                                     <img
  938.                                         class="hidden"
  939.                                         loading="lazy"
  940.                                         src="' $youtubeThumb '"
  941.                                         alt=""
  942.                                     />
  943.                                 ';
  944.                                     }
  945.                                 }
  946.                                 if (!empty($fancyBoxLink)) { ?>
  947.                                     <div class="carousel__slide carousel__slide--youtube f-carousel__slide">
  948.                                         <a data-fancybox="object_gallery" href='<?php print $fancyBoxLink?>' class="item youtube">
  949.                                             <div class="digitalViewingBox--slider">
  950.                                                 <div class="title-box">
  951.                                                     <div class="title-box__icon"></div>
  952.                                                     <div class="title-box__text"><?php $trans->eGet('text_label_page-product_digital-viewing-caption'); ?></div>
  953.                                                 </div>
  954.                                             </div>
  955.                                             <?php print $videoElement?>
  956.                                             <span class="carousel__slide__video-btn"><i class="ri-play-fill"></i></span>
  957.                                         </a>
  958.                                     </div>
  959.                                     <?php
  960.                                 }
  961.                             }
  962.                             if ($image->getHasVideo()) { ?>
  963.                                 <div class="carousel__slide f-carousel__slide">
  964.                                     <a
  965.                                             data-fancybox="object_gallery"
  966.                                             data-thumb="<?php echo $image->getImageUrl('large'); ?>"
  967.                                             data-src="<?php echo $image->getVideoUrl(); ?>"
  968.                                     >
  969.                                         <video>
  970.                                             <source src="<?php echo $image->getVideoUrl(); ?>" type="video/mp4">
  971.                                             Your browser does not support HTML5 video.
  972.                                         </video>
  973.                                         <span class="carousel__slide__video-btn"><i class="ri-play-fill"></i></span>
  974.                                     </a>
  975.                                 </div>
  976.                                 <?php
  977.                             } else { ?>
  978.                                 <div class="carousel__slide f-carousel__slide">
  979.                                     <a data-fancybox="object_gallery" href="<?php echo $image->getImageUrl('large'); ?>">
  980.                                         <img
  981.                                                 class="carousel-cell-image hidden"
  982.                                                 loading="lazy"
  983.                                                 src="<?php echo $image->getImageUrl('large'); ?>"
  984.                                                 alt="<?php echo $obj->name?>"
  985.                                         >
  986.                                     </a>
  987.                                 </div>
  988.                                 <?php
  989.                             }
  990.                         }
  991.                         ?>
  992.                             <div class="carousel__button-wrapper">
  993.                                 <a class="button button--medium button--ghost button--icon button--icon-image-fill" data-fancybox-trigger="object_gallery" data-fancybox-index="0">
  994.                                     <?php $trans->eGet('text_button_page-product_slider_all-media'); ?>
  995.                                 </a>
  996.                             </div>
  997.                         </div>
  998.                     </div>
  999.                 </div> <!-- nav-slider end -->
  1000.                 <div class="product-grid__bidding-info">
  1001.                     <?php
  1002.                     if ((int)$obj->special_terms_uf == 1) {
  1003.                         $aliasName = isset($_SESSION['register_id']) && ($regObj->clienttype == "UP" || $regObj->clienttype == "UF") ?
  1004.                             'ALIAS_PRODUCT_TAB_SPECIAL_TERM_UP' :
  1005.                             'ALIAS_PRODUCT_TAB_SPECIAL_TERM';
  1006.                         ?>
  1007.                             <div class="bid-box-container">
  1008.                                 <div id="bidbox" class="bid-box">
  1009.                                     <div class="row">
  1010.                                         <div class="large-12 medium-12 small-12 columns">
  1011.                                             <div class="descriptionBox specialTerms">
  1012.                                                 <h4><?php $trans->eGet($aliasName); ?></h4>
  1013.                                                 <div class="object_desc">
  1014.                                                     <p><?php print nl2br($trans->get($aliasName '__DESCRIPTION')); ?><p>
  1015.                                                 </div>
  1016.                                             </div>
  1017.                                         </div>
  1018.                                     </div>
  1019.                                 </div>
  1020.                             </div>
  1021.                         <?php
  1022.                     }
  1023.                     ?>
  1024.                     <!-- Vue instance, bidding component -->
  1025.                     <div id="page-product__sidebar"
  1026.                             data-id="<?php echo $obj->id?>"
  1027.                             data-notifier-url="<?php echo $parameters->get('app.notifier.url'); ?>"
  1028.                             data-preview-hash="<?php echo (isset($_REQUEST['preview']) ? htmlspecialchars($_REQUEST['preview'], ENT_QUOTES) : '' ); ?>"
  1029.                             data-closed="<?php echo ($obj->fullend && date("YmdHis") > $obj->fullend 'true' ''); ?>">
  1030.                         <close-box :product-data='<?php echo json_encode($productData); ?>'></close-box>
  1031.                         <bid-box :product-data='<?php echo json_encode($productData); ?>'>
  1032.                             <?php if ($hasNotice): ?>
  1033.                                 <div class='closed-auction-seller'>
  1034.                                     <h3><?php $trans->eGet('text_label_page-product_closed-auction-seller-caption'); ?></h3>
  1035.                                     <p><?php $trans->eGet('text_label_page-product_closed-auction-seller-text'); ?></p>
  1036.                                     <a class="button--rounded button--highlight button--small button--icon-right button--icon-right--arrow-right" href="<?php echo $urlGenerator->generate('app.legacy.pages.howtosell'); ?>">
  1037.                                     <?php $trans->eGet('link_button_page-product_closed-auction-seller-link'); ?>
  1038.                                         <i class="ri-arrow-right-line"></i>
  1039.                                     </a>
  1040.                                 </div>
  1041.                             <?php endif; ?>
  1042.                         </bid-box>
  1043.                         <bid-form :product-data='<?php echo json_encode($productData); ?>'></bid-form>
  1044.                         <bid-payment-info :product-data='<?php echo json_encode($productData); ?>'>
  1045.                             <?php
  1046.                             if (!$productData['closed']) {
  1047.                                 if ($regObj) {
  1048.                                     if ((int)$obj->{$allowedClientType} === 0) {
  1049.                                         printf('<div class="prohibited-bid"><div class="prohibited-bid__header"><i class="ri-information-fill prohibited-bid__icon"></i><span>%s</span></div><div class="prohibited-bid__body">%s</div></div>'$trans->get($deniedBidderHeaderAlias), $trans->get($deniedBidderAlias));
  1050.                                     } elseif ($vendorClientNBR === $registerClientNBR) {
  1051.                                         if (!$private && $parameters->get("app.instance") === 'dk') {
  1052.                                             printf('<div class="prohibited-bid">%s</div>'$trans->get('ALIAS_BIDDER_SAME_ORGNUMBER_AS_SELLER'));
  1053.                                         }
  1054.                                     }
  1055.                                     if (($regObj->clienttype == "UF" || $regObj->clienttype == "UP") && ($regObj->vatValidated == 0)) { ?>
  1056.                                         <div class="prohibited-bid">
  1057.                                             <div class="prohibited-bid__header">
  1058.                                                 <i class="ri-information-fill prohibited-bid__icon"></i>
  1059.                                                 <?php echo $trans->get("ALIAS_UP_NOVATVALIDATED_CANT_BID__HEADER"); ?>
  1060.                                             </div>
  1061.                                             <div class="prohibited-bid__body">
  1062.                                                 <?php echo $trans->get("ALIAS_UP_NOVATVALIDATED_CANT_BID__DESCRIPTION"); ?>
  1063.                                             </div>
  1064.                                             <div class="prohibited-bid__footer">
  1065.                                                 <span class="prohibited-bid__footer__item">
  1066.                                                     <i class="prohibited-bid__icon ri-phone-fill"></i><a href="tel:<?php $trans->eGet('phone_customer-service_formatted'); ?>"><?php $trans->eGet("phone_customer-service_formatted"); ?></a>
  1067.                                                 </span>
  1068.                                                 <span class="prohibited-bid__footer__item">
  1069.                                                     <i class="prohibited-bid__icon ri-mail-fill"></i><a href="mailto:<?php $trans->eGet("email_customer-service"); ?>"><?php $trans->eGet("email_customer-service"); ?></a>
  1070.                                                 </span>
  1071.                                             </div>
  1072.                                         </div>
  1073.                                         <?php
  1074.                                     }
  1075.                                 }
  1076.                                 $buyerBlocked false;
  1077.                                 if(!isset($_SESSION["register_id"]) || !is_numeric($_SESSION["register_id"]) || isset($_SESSION["late_payments"]) || isset($_SESSION["user_banned"])) {
  1078.                                     $buyerBlocked true;
  1079.                                     if (isset($_SESSION["user_banned"]) || isset($_SESSION['late_payments'])) {
  1080.                                         $showFinance false;
  1081.                                         print "          <div class=\"prohibited-bid prohibited-bid--banned-cant-bid\">";
  1082.                                         print "            <div class=\"prohibited-bid__header\">";
  1083.                                         print "                <i class=\"ri-information-fill prohibited-bid__icon\"></i>";
  1084.                                         print "                <span>".$trans->get('ALIAS_USER_BANNED_CANT_BID_HEADER')."</span>";
  1085.                                         print "            </div>\n";
  1086.                                         print "            <div class=\"prohibited-bid__body\">".$trans->get("ALIAS_USER_BANNED_CANT_BID")."</div>";
  1087.                                         print "            <div class=\"prohibited-bid__footer\">";
  1088.                                         print "                <span class=\"prohibited-bid__footer__item\">";
  1089.                                         print "                    <i class=\"prohibited-bid__icon ri-phone-fill\"></i><a href=\"tel:".$trans->get('phone_customer-service_formatted')."\">".$trans->get("phone_customer-service_formatted")."</a>";
  1090.                                         print "                </span>\n";
  1091.                                         print "                <span class=\"prohibited-bid__footer__item\">";
  1092.                                         print "                    <i class=\"prohibited-bid__icon ri-mail-fill\"></i><a href=\"mailto:".$trans->get("email_customer-service")."\">".$trans->get("email_customer-service")."</a>";
  1093.                                         print "                </span>\n";
  1094.                                         print "            </div>\n";
  1095.                                         print "          </div>\n";
  1096.                                     }
  1097.                                 }
  1098.                             }
  1099.                             ?>
  1100.                         </bid-payment-info>
  1101.                         <bidding-box :product-data='<?php echo json_encode($productData); ?>'></bidding-box>
  1102.                     </div> <!-- page-product__sidebar end, End of Vue instance, bidding component -->
  1103.                         <div class="product-info-section">
  1104.                             <div class="quick-information">
  1105.                                 <div class="head-wrapper">
  1106.                                     <div class="icon freight-icon">
  1107.                                         <i class="ri-truck-line"></i>
  1108.                                     </div>
  1109.                                     <div class="title">
  1110.                                         <?php $trans->eGet('text_caption_page-product_shipping')?>
  1111.                                     </div>
  1112.                                     <div class="arrow">
  1113.                                         <i class="ri-arrow-down-s-line"></i>
  1114.                                     </div>
  1115.                                 </div>
  1116.                                 <div class="content-wrapper">
  1117.                                     <div class="content">
  1118.                                         <?php if ($vendor->freightinfo != "") {
  1119.                                             $freightString nl2br(strip_tags($vendor->freightinfo));
  1120.                                         } else {
  1121.                                             $freightString $trans->get(
  1122.                                                     'text_placeholder_page-product_map-and-freight_content',
  1123.                                                     [
  1124.                                                             'freightLink' => $urlGenerator->generate(
  1125.                                                                     'app.legacy.pages.text',
  1126.                                                                     ['urlname' => 'fraktforfragan'],
  1127.                                                                 UrlGeneratorInterface::ABSOLUTE_URL
  1128.                                                             )
  1129.                                                     ]
  1130.                                             );
  1131.                                         }?>
  1132.                                         <p><?php print $freightString?></p>
  1133.                                     </div>
  1134.                                 </div>
  1135.                             </div>
  1136.                         </div> <!-- product-info-section end -->
  1137.                     <?php
  1138.                     $loadingHelp $basicProductData['loadingHelpText'];
  1139.                     switch ($basicProductData['loadingHelp']) {
  1140.                         case ProductFieldsEnum::LOADINGHELP_YES()->label:
  1141.                             $loadingHelpIcon 'ri-checkbox-circle-fill';
  1142.                             $loadingHelpClass '';
  1143.                             break;
  1144.                         case ProductFieldsEnum::LOADINGHELP_MAYBE()->label:
  1145.                             $loadingHelpIcon 'ri-checkbox-circle-fill';
  1146.                             $loadingHelpClass 'orange';
  1147.                             break;
  1148.                         case ProductFieldsEnum::LOADINGHELP_NO()->label:
  1149.                             $loadingHelpIcon 'ri-close-circle-fill';
  1150.                             $loadingHelpClass 'red';
  1151.                             break;
  1152.                         default: // Fallback if no loadinghelp is found
  1153.                             $loadingHelp false;
  1154.                     }
  1155.                     if ($loadingHelp):?>
  1156.                     <div class="quick-information">
  1157.                         <div class="head-wrapper no-hover">
  1158.                             <div class="icon <?php echo $loadingHelpClass ?>">
  1159.                                 <i class="<?php echo $loadingHelpIcon ?>"></i>
  1160.                             </div>
  1161.                             <div class="title">
  1162.                                 <?php echo $loadingHelp ?>
  1163.                             </div>
  1164.                         </div>
  1165.                     </div> <!-- quick-information end -->
  1166.                     <?php endif; ?>
  1167.                     <div class="quick-information">
  1168.                         <div class="head-wrapper">
  1169.                             <div class="icon">
  1170.                                 <i class="ri-shield-check-fill"></i>
  1171.                             </div>
  1172.                             <div class="title">
  1173.                                 <?php $trans->eGet('text_label_page-product_secure-payments-expander'?>
  1174.                             </div>
  1175.                             <div class="arrow">
  1176.                                 <i class="ri-arrow-down-s-line"></i>
  1177.                             </div>
  1178.                         </div>
  1179.                         <div class="content-wrapper">
  1180.                             <div class="content">
  1181.                                 <?php $trans->eGet('text_body-text_page-product_secure-payments-expander'?>
  1182.                             </div>
  1183.                             <div class="content-icons-row">
  1184.                                 <div class="payex-icon">
  1185.                                     <img alt="payex-logo" src="/images/payex-logo.png" />
  1186.                                 </div>
  1187.                                 <?php if($parameters->get("app.instance") === 'se'): ?>
  1188.                                 <div class="swish-icon">
  1189.                                     <img alt="swish-logo" src="/images/swish/swish-logo.svg"/>
  1190.                                 </div>
  1191.                                 <?php endif;?>
  1192.                             </div>
  1193.                         </div>
  1194.                     </div> <!-- quick-information end -->
  1195.                     <?php
  1196.                         if (!$displayFinancing && $parameters->get('financing.offer.assistance')) :
  1197.                     ?>
  1198.                     <div class="quick-information">
  1199.                         <div class="head-wrapper">
  1200.                             <div class="icon financing-fallback">
  1201.                             </div>
  1202.                             <div class="title">
  1203.                                 <?php $trans->eGet('text_label_page-product_financing-expander-fallback'); ?>
  1204.                             </div>
  1205.                             <div class="arrow">
  1206.                                 <i class="ri-arrow-down-s-line"></i>
  1207.                             </div>
  1208.                         </div>
  1209.                         <div class="content-wrapper">
  1210.                             <div class="content">
  1211.                                 <?php $trans->eGet('text_content_page-product_financing-expander-fallback'); ?>
  1212.                             </div>
  1213.                         </div>
  1214.                     </div>  <!-- quick-information end -->
  1215.                     <?php
  1216.                         endif;
  1217.                     // Financing Nordea
  1218.                     $monthSteps = array();
  1219.                     $defaultStep 0;
  1220.                     $resFinancing mysqli_query($db"SELECT sgf.* FROM categories AS c LEFT JOIN sgAssetRequirement AS sga ON sga.subAssetGroupId = c.sgSubAssetGroupId LEFT JOIN sgFactors sgf ON sgf.termId = sga.termId WHERE c.sgSubAssetGroupId<>0 AND c.id=".(int)$obj->categories_id);
  1221.                     if ($displayFinancing && mysqli_num_rows($resFinancing) > 0) {
  1222.                         $financing = array();
  1223.                         while($rowFinancing mysqli_fetch_object($resFinancing)) {
  1224.                             if (count($financing) == 0) {
  1225.                                 $defaultStep $rowFinancing->months;
  1226.                                 $minAmount $rowFinancing->minAmount;
  1227.                                 $maxAmount $rowFinancing->maxAmount;
  1228.                                 $minmonths $rowFinancing->months;
  1229.                                 $maxmonths $rowFinancing->months;
  1230.                             }
  1231.                             $financing[] = array(
  1232.                             'minAmount' => $rowFinancing->minAmount,
  1233.                             'maxAmount' => $rowFinancing->maxAmount,
  1234.                             'months' => $rowFinancing->months,
  1235.                             'factor' => $rowFinancing->factor
  1236.                             );
  1237.                             $monthSteps[] = $rowFinancing->months;
  1238.                             if ($rowFinancing->months $defaultStep) { $defaultStep $rowFinancing->months; }
  1239.                             if ($rowFinancing->minAmount $minAmount) { $minAmount $rowFinancing->minAmount; }
  1240.                             if ($rowFinancing->maxAmount $maxAmount) { $maxAmount $rowFinancing->minAmount; }
  1241.                             if ($rowFinancing->months $minmonths) { $minmonths $rowFinancing->months; }
  1242.                             if ($rowFinancing->months $maxmonths) { $maxmonths $rowFinancing->months; }
  1243.                         }
  1244.                         if (in_array(60,$monthSteps)) {
  1245.                             $defaultStep 60;
  1246.                         } else if (in_array(48,$monthSteps)) {
  1247.                             $defaultStep 48;
  1248.                         } else if (in_array(36,$monthSteps)) {
  1249.                             $defaultStep 36;
  1250.                         }
  1251.                         if ($maxAmount >= 3000000) {
  1252.                             $maxAmount 3000000;
  1253.                         }
  1254.                         $curBid 0;
  1255.                         if (isset($highBid)) {
  1256.                             $curBid = (round($highBid/1000)*1000);
  1257.                             if ($highBid >= 3000000) {
  1258.                                 $maxAmount 5000000;
  1259.                             }
  1260.                         }
  1261.                         // If curBid is still zero, then set it to the bidstep.
  1262.                         if ((int)$curBid === 0) {
  1263.                             $curBid $bidinc;
  1264.                         }
  1265.                         require_once __DIR__ '/includes/nordeaFinanceProductForm.php';
  1266.                         if ($highBid 5000000) {
  1267.                             renderNordeaFinanceProductFormBidOverLimit($trans);
  1268.                         } else {
  1269.                             /** @var \Klaravik\Financing\Nordea\Calculate $calculateFinancing */
  1270.                             $calculateFinancing $container->get(\Klaravik\Financing\Nordea\Calculate::class);
  1271.                             $disablePriceAdjustment false;
  1272.                             if ($obj->fullend && date("YmdHis") > $obj->fullend) {
  1273.                                 $disablePriceAdjustment true;
  1274.                             }
  1275.                             renderNordeaFinanceProductForm($trans$urlGenerator$db$obj5000000$curBid$minmonths$maxmonths$defaultStep$financing$calculateFinancing$disablePriceAdjustment);
  1276.                         }
  1277.                     }
  1278.                 ?>
  1279.                 </div> <!-- bidding-info end -->
  1280.                 <div class="product-grid__content">
  1281.                     <div class="product-grid__content-title-box">
  1282.                         <h1><?php echo $obj->name?></h1>
  1283.                         <div class="share-menu">
  1284.                             <button class="button--icon-cta" data-share-menu__trigger>
  1285.                                 <i class="ri-share-fill"></i>
  1286.                             </button>
  1287.                             <div>
  1288.                                 <!-- facebook -->
  1289.                                 <a class="share-menu__item share-menu__item--facebook" target="_blank">
  1290.                                     <div class="button--icon-cta">
  1291.                                         <i class="ri-facebook-circle-fill"></i>
  1292.                                     </div>
  1293.                                 </a>
  1294.                                 <!-- linkedin -->
  1295.                                 <a class="share-menu__item share-menu__item--linkedin" target="_blank">
  1296.                                     <div class="button--icon-cta">
  1297.                                         <i class="ri-linkedin-box-fill"></i>
  1298.                                     </div>
  1299.                                 </a>
  1300.                                 <a class="share-menu__item share-menu__item--email">
  1301.                                     <div class="button--icon-cta">
  1302.                                         <i class="ri-mail-fill"></i>
  1303.                                     </div>
  1304.                                 </a>
  1305.                                 <a class="share-menu__item share-menu__item--sms">
  1306.                                     <div class="button--icon-cta">
  1307.                                         <i class="ri-chat-3-fill"></i>
  1308.                                     </div>
  1309.                                 </a>
  1310.                                 <a class="share-menu__item share-menu__item--copy">
  1311.                                     <div class="button--icon-cta">
  1312.                                         <i class="ri-link"></i>
  1313.                                     </div>
  1314.                                 </a>
  1315.                                 <div class="share-menu__overlay"></div>
  1316.                             </div>
  1317.                         </div>
  1318.                         <?php if (!($obj->fullend && date("YmdHis") > $obj->fullend) ): ?>
  1319.                             <button class="button--icon-cta product-grid__button-save"
  1320.                                 <?php print isset($_SESSION['register_id']) ? '' ' data-no-session ' ?>
  1321.                                 data-object-marked="<?php print $isFav 0 ?>"
  1322.                                 data-object-id="<?php print $obj->id?>"
  1323.                                 data-object-name="<?php print htmlspecialchars($obj->name);?>"
  1324.                             >
  1325.                                 <span></span>
  1326.                             </button>
  1327.                         <?php endif; ?>
  1328.                     </div>
  1329.                     <?php if ($showVendorInfoIds): ?>
  1330.                         <div class="vendor-info vendor-info--hide-mobile">
  1331.                             <div class="vendor-info__content">
  1332.                             <?php
  1333.                             // Info area - Intern-id and reserved price, Vendor.
  1334.                             if ($showVendorInfoIds): ?>
  1335.                                 <div>
  1336.                                     <div class="item">
  1337.                                         <span><?php $trans->eGet('text_label_page-product_internal-id'); ?></span>
  1338.                                         <?php print $obj->artno ?>
  1339.                                     </div>
  1340.                                     <div class="item">
  1341.                                         <span><?php $trans->eGet('info_label_page-product_rek-res-price'); ?></span>
  1342.                                         <?php print $respricePrice?>
  1343.                                     </div>
  1344.                                 </div>
  1345.                             <?php endif; ?>
  1346.                             </div>
  1347.                         </div>
  1348.                     <?php endif;?>
  1349.                     <?php
  1350.                         $recentChanges recentProductChanges($db$products_id);
  1351.                         if (!empty($recentChanges)):
  1352.                     ?>
  1353.                     <div class="product-grid__new-information">
  1354.                         <?php print nl2br(recentProductChanges($db$products_id)); ?>
  1355.                     </div>
  1356.                     <?php endif; ?>
  1357.                     <?php
  1358.                     if ($vendorType->getDepartment() === 'Obest' && $vendorType->getBankruptcy() === 1) { ?>
  1359.                     <div class="alert-box--department-information">
  1360.                         <div class="alert-box__department-title"></div>
  1361.                             <p class="alert-box__content"><?php print nl2br($trans->get('ALIAS_PRODUCT_BANKRUPT_TEXT__DESCRIPTION'));?></p>
  1362.                     </div>
  1363.                 <?php
  1364.                     }?>
  1365.                      <!--- DESCRIPTION -->
  1366.                      <div class="product-grid__description">
  1367.                         <?php $extraDesc = !empty($obj->extraDescription) ? nl2br($obj->extraDescription) : null?>
  1368.                         <div id="nav-desc">
  1369.                         <?php $descPreamble = !empty($obj->descriptionPreamble) ? nl2br($obj->descriptionPreamble) : null?>
  1370.                         <?php if ($obj->description != "" || $vendor->foreword != ""): ?>
  1371.                             <div class="object_desc product-grid__description-overview">
  1372.                                 <div class="object-information__header">
  1373.                                     <span class="object-information__header-icon"><i class="ri-search-eye-line"></i></span>
  1374.                                     <span class="object-information__header-text"><?php $trans->eGet('text_label_page-product_description-title');?></span>
  1375.                                 </div>
  1376.                                 <?php print $obj->includesForewordInDescription == && $vendor->foreword != "" nl2br($vendor->foreword) . '<br>' ''?>
  1377.                                 <?php
  1378.                                     if (!empty($descPreamble)) print '<p class="product-grid__description-preamble">' $descPreamble '</p>';
  1379.                                     if ($obj->includesForewordInDescription == 0) { print '<p class="product-grid__description-extra">' nl2br($obj->description) . '</p>'; }
  1380.                                     print $basicProductData['htmlOutput'];
  1381.                                 ?>
  1382.                             </div>
  1383.                         <?php endif; ?>
  1384.                         <?php
  1385.                         print "<div class='extra-vehicle'>";
  1386.                             try {
  1387.                                 $extraVehicleModel = (new ExtraVehicleRepo())->getByProductId($obj->id);
  1388.                                 $renderExtraVehicleData = new RenderExtraVehicleData($trans);
  1389.                                 echo $renderExtraVehicleData->renderHtml($extraVehicleModel);
  1390.                             } catch (MissingResultException $e) {
  1391.                                 $extraVehicleModel = new ExtraVehicle();
  1392.                             }
  1393.                         print "</div>";
  1394.                             $extraDesc = !empty($obj->extraDescription) ? $obj->extraDescription null;
  1395.                             if (!empty($extraVehicleModel->getOtherInformation())) {
  1396.                                 $extraDesc .= PHP_EOL PHP_EOL $extraVehicleModel->getOtherInformation();
  1397.                             }
  1398.                         ?>
  1399.                         <?php if (!empty($extraDesc)): ?>
  1400.                         <div class="object-information__header object-information__header--small object-information__header--mock"></div>
  1401.                         <p class="product-grid__description-extra"><?php print nl2br(trim($extraDesc))?></p>
  1402.                         <?php endif; ?>
  1403.                         </div>
  1404.                         <?php
  1405.                         if ($hasEquipment): ?>
  1406.                             <div class="object-information__equipment object-equipment" id="nav-base">
  1407.                                 <div class="object-information__header">
  1408.                                     <span class="object-information__header-icon"><i class="ri-menu-add-line"></i></span>
  1409.                                     <span class="object-information__header-text"><?php $trans->eGet('text_label_page-product_equipment-title');?></span>
  1410.                                 </div>
  1411.                                     <div class="object-equipment__content">
  1412.                                         <?php print $equipmentData?>
  1413.                                 </div>
  1414.                             </div>
  1415.                         <?php endif; ?>
  1416.                     </div>
  1417.                     <?php
  1418.                     //  CONDITION
  1419.                     if(canShowTab($trans$db$obj->id2)) {
  1420.                     ?>
  1421.                     <div id="nav-condition" class="product-grid__condition product-condition product-info-section">
  1422.                         <div class="object-information__header">
  1423.                             <span class="object-information__header-icon"><i class="ri-calendar-check-fill"></i></span>
  1424.                             <span class="object-information__header-text"><?php $trans->eGet('text_label_page-product_condition-caption');?></span>
  1425.                         </div>
  1426.                         <?php
  1427.                             try {
  1428.                                 $renderRenderConditionData = new RenderConditionData($trans);
  1429.                                 print $renderRenderConditionData->renderHtml($obj->id$obj->categories_id);
  1430.                             } catch (RepositoryException $e) {}
  1431.                         ?>
  1432.                     </div> <!-- nav-condition end div-->
  1433.                     <?php
  1434.                     }
  1435.                     // DIGITAL SHOWCASE
  1436.                     if ($obj->youtubelink) {
  1437.                         $fancyBoxLink $obj->youtubelink;
  1438.                         $videoElement '
  1439.                              <img
  1440.                                     class="digital-viewing-box__video"
  1441.                                     loading="lazy"
  1442.                                     src="https://img.youtube.com/vi/' youtubeIdFromLink($fancyBoxLink) . '/maxresdefault.jpg"
  1443.                                     alt=""
  1444.                             >
  1445.                         ';
  1446.                     }
  1447.                     elseif (null !== $youtube) {
  1448.                         $fancyBoxLink $youtube;
  1449.                         $videoElement '
  1450.                              <video>
  1451.                                 <source src="' $fancyBoxLink '#t=0.001" type="video/mp4">
  1452.                                 ' $trans->get('info_label_page-product_browser-support') . '
  1453.                             </video>
  1454.                         ';
  1455.                     }
  1456.                     if (!empty($fancyBoxLink)) { ?>
  1457.                         <div class="digital-viewing-box" id="digitalViewing-youtube">
  1458.                             <div class="digital-viewing-box__title-and-text">
  1459.                                 <div class="digital-viewing-box__title">
  1460.                                     <div class="digital-viewing-box__title__icon"></div>
  1461.                                     <div class="digital-viewing-box__title__text">
  1462.                                         <?php $trans->eGet('text_label_page-product_digital-viewing-caption'); ?>
  1463.                                     </div>
  1464.                                 </div>
  1465.                                 <span class="digital-viewing-box__preamble">
  1466.                                     <?php $trans->eGet('text_label_page-product_digital-viewing-tour-caption'); ?>
  1467.                                 </span>
  1468.                             </div>
  1469.                             <div class="digital-viewing-box__video-and-arrow">
  1470.                                 <a
  1471.                                     data-fancybox-trigger="object_gallery"
  1472.                                     data-fancybox-index="1"
  1473.                                     href='<?php print $fancyBoxLink?>'
  1474.                                     class="digital-viewing-box__video-holder"
  1475.                                 >
  1476.                                     <?php print $videoElement ?>
  1477.                                     <span class="digital-viewing-box__video-play-btn">
  1478.                                         <i class="ri-play-fill"></i>
  1479.                                     </span>
  1480.                                 </a>
  1481.                                 <div class="digital-viewing-box__arrow-holder">
  1482.                                     <img class="digital-viewing-box__arrow" src="/images/arrow-illustr-below.png">
  1483.                                 </div>
  1484.                             </div>
  1485.                         </div>
  1486.                         <?php
  1487.                     }
  1488.                     //  IMPORTANT INFORMATION
  1489.                      // Temp hack, 419 ska inte med in i item page
  1490.         if(canShowTab($trans$db$obj->id5) && !in_array($obj->categories_id, [375419], true)) {
  1491.                         // KAM
  1492.                         $aliasName 'ALIAS_PRODUCT_TAB_OTHER_TEXT__DESCRIPTION';
  1493.                         if ((int)$obj->enteredByKam === 0) {
  1494.                             // Ej KAM
  1495.                             $aliasName 'ALIAS_PRODUCT_TAB_OTHER_TEXT__DESCRIPTION_NON-KAM';
  1496.                         }
  1497.                         if ($vendorType->getDepartment() === 'Obest' && $vendorType->getBankruptcy() === 1) {
  1498.                             // Konkurs
  1499.                             $aliasName 'ALIAS_PRODUCT_TAB_OTHER_TEXT_BANKRUPTCY__DESCRIPTION';
  1500.                         }
  1501.                         $aliasDescription $trans->get($aliasName);
  1502.                         ?>
  1503.                         <div class="object-information__important">
  1504.                             <div class='alert-box alert-box--regular'>
  1505.                                 <span class='alert-box__title'><i class="ri-error-warning-line"></i><?php $trans->eGet('text_caption_page-product_important-information')?></span>
  1506.                                 <p class='alert-box__content'>
  1507.                                     <?php print $aliasDescription !== '' nl2br($aliasDescription) : ''?>
  1508.                                 </p>
  1509.                             </div>
  1510.                         </div>
  1511.                      <?php ?>
  1512.                     <!-- NORWAY IMPORT INFORMATION -->
  1513.                     <?php
  1514.                     $categoryModel $categoriesObject->getClosestPublicCategory($obj->categories_id);
  1515.                     if (
  1516.                             $regObj &&
  1517.                             in_array($regObj->clienttype, ['UP''UF']) &&
  1518.                             $categoryModel->getForeignBuyerAuctionText() &&
  1519.                             $categoryModel->getForeignBuyerAuctionHeadline()
  1520.                     ) {
  1521.                         $countryResult $db->query("SELECT id FROM countries WHERE iso2='NO'");
  1522.                         if ($countryResult->num_rows && $countryResult->fetch_object()->id === $regObj->country_id) {?>
  1523.                             <div class='alert-box alert-box--message'>
  1524.                                 <p class='alert-box__title'><?php print $categoryModel->getForeignBuyerAuctionHeadline(); ?></p>
  1525.                                 <p class='alert-box__content'><?php print $categoryModel->getForeignBuyerAuctionText(); ?></p>
  1526.                             </div>
  1527.                         <?php }
  1528.                     }?>
  1529.                     <?php if ($hasFiles): ?>
  1530.                         <div id="nav-files" class="product-grid__documents grid-segment">
  1531.                             <div class="object-information__header">
  1532.                                 <span class="object-information__header-icon"><i class="ri-file-copy-2-fill"></i></span>
  1533.                                 <span class="object-information__header-text"><?php $trans->eGet('text_caption_page-product_section_document');?></span>
  1534.                             </div>
  1535.                             <?php
  1536.                                 showFilebank($urlGenerator$trans$db$obj->id$externalLink);
  1537.                             ?>
  1538.                         </div>
  1539.                     <?php endif; ?>
  1540.                     <?php
  1541.                     // Anthesis calculation on LCA Value
  1542.                     /** @var \Klaravik\Anthesis\CarbonDioxideEmissions $carbonDioxideEmission */
  1543.                     $carbonDioxideEmission $container->get(\Klaravik\Anthesis\CarbonDioxideEmissions::class);
  1544.                     try {
  1545.                         $carbonDioxideEmissionValue $carbonDioxideEmission->getEmissionByProductsIdAndLcaValue(
  1546.                                 $obj->id$categoriesObject->getCategory($obj->categories_id)->getLcaValue()
  1547.                         );
  1548.                     } catch (\Klaravik\Anthesis\Exception\CarbonDioxidEmissionException $e) {}
  1549.                     ?>
  1550.                     <?php if (isset($carbonDioxideEmissionValue)): ?>
  1551.                         <div class="product__esg" data-object-id="<?php print $obj->id?>">
  1552.                             <div class="product__esg-calculation">
  1553.                                 <div id="lottie-esg" class="product__esg-lottie" data-src="/images/lottie-animations/lottie-esg.json"></div>
  1554.                                 <p class="product__esg-value">
  1555.                                     <?php $trans->eGet('text_label_page-product_esg-kg', ['weight' => $carbonDioxideEmissionValue]); ?>
  1556.                                 </p>
  1557.                             </div>
  1558.                             <a id="esgOpenModal" class="product__esg-how">
  1559.                                 <?php $trans->eGet('text_label_page-product_esg-modal-cta'); ?>
  1560.                             </a>
  1561.                             <p class="product__esg-text"><?php $trans->eGet('text_label_page-product_esg-caption'); ?></p>
  1562.                             <p class="product__esg-text-comparison">
  1563.                                 <?php $trans->eGet('text_label_page-product_esg-comparison'); ?>
  1564.                             </p>
  1565.                             <k-modal id="esg-modal">
  1566.                                 <div slot="header">
  1567.                                     <h3 class="bidding-modal__header">
  1568.                                         <span class="bidding-modal__header__icon"><img src="/images/icons/icn-exclamation-green.svg" alt=""></span>
  1569.                                     </h3>
  1570.                                 </div>
  1571.                                 <div slot="body" class="product__esg-text">
  1572.                                     <p><?php $trans->eGet('text_label_page-product_esg-modal-caption'); ?></p>
  1573.                                     <p class="product__esg-text-comparison">
  1574.                                         <?php $trans->eGet('text_label_page-product_esg-modal-source'); ?>
  1575.                                     </p>
  1576.                                     <a href="/assets/pdf/Anthesis-Koldioxid-och-resurskalkylator-Metodik.pdf" id="esgReadMore" target="_blank" class="button--medium button--primary button--outlined">
  1577.                                         <i class="ri-file-text-line"></i><?php $trans->eGet('text_label_page-product_esg-modal-method'); ?>
  1578.                                     </a>
  1579.                                 </div>
  1580.                                 <div slot="footer" class="product__esg-modal-footer">
  1581.                                     <a id="esg-modal__close" class="k-modal__close-button button--medium button--negate button--v-text">
  1582.                                         <?php $trans->eGet('text_label_page-product_esg-modal-close'); ?>
  1583.                                     </a>
  1584.                                 </div>
  1585.                             </k-modal>
  1586.                         </div>
  1587.                     <?php endif; ?>
  1588.                 </div> <!-- product-grid__content end -->
  1589.                 <div id="nav-freight" class="object-position-and-freight">
  1590.                     <div class="object-position-and-freight__inner">
  1591.                         <div class="object-position">
  1592.                             <div class="object-information__header">
  1593.                                 <span class="object-information__header-icon"><i class="ri-map-pin-fill"></i></span>
  1594.                                 <span class="object-information__header-text"><?php $trans->eGet("text_headline_page-product_map-and-freight"); ?></span>
  1595.                             </div>
  1596.                             <div class="object-position__information">
  1597.                                 <span  class="object-position__municipallity"><?php echo $county->name .", "$countyParent->name;?>.</span>
  1598.                                 <?php $trans->eGet('text_preamble_page-product_map-and-freight'); ?>
  1599.                             </div>
  1600.                             <div id="page-product__county-map">
  1601.                                 <county-map country="<?php echo $parameters->get('app.instance'); ?>" :county=<?php echo (int)$county->code?>></county-map>
  1602.                             </div>
  1603.                         </div>
  1604.                         <div class="object-freight">
  1605.                             <div class="object-information__header object-information__header--sub">
  1606.                                 <span class="object-information__header-icon"><i class="ri-truck-line"></i></span>
  1607.                                 <span class="object-information__header-text"><?php $trans->eGet('text_subheadline_page-product_map-and-freight'?></span>
  1608.                             </div>
  1609.                             <div class="object-freight__content">
  1610.                                 <?php if ($vendor->freightinfo != "") {
  1611.                                     $freightString nl2br(strip_tags($vendor->freightinfo));
  1612.                                 } else {
  1613.                                     $freightString $trans->get('text_placeholder_page-product_map-and-freight_content', [
  1614.                                         'freightLink' => $urlGenerator->generate(
  1615.                                             'app.legacy.pages.text',
  1616.                                             ['urlname' => 'fraktforfragan'],
  1617.                                             UrlGeneratorInterface::ABSOLUTE_URL
  1618.                                         )
  1619.                                     ]);
  1620.                                 }?>
  1621.                                 <p><?php print $freightString?></p>
  1622.                             </div>
  1623.                         </div>
  1624.                     </div>
  1625.                 </div> <!-- nav-freight end -->
  1626.                 <div class="map-background"></div>
  1627.                 <div class="bidding-info-background"></div>
  1628.                 <div class="product-footer-row">
  1629.                     <div class="faq-cta">
  1630.                         <div class="faq">
  1631.                             <div class="article-select__faq-section">
  1632.                                 <h2><?php $trans->eGet('text_caption_page-product_faq'?></h2>
  1633.                                 <div class="faq-item">
  1634.                                     <p
  1635.                                       class="faq-item-q"
  1636.                                       data-article-link-id="faq1-1"
  1637.                                       data-article-group-id="faq"
  1638.                                       data-selected-class="faq-item-q--selected"
  1639.                                     >
  1640.                                         <?php $trans->eGet('text_label_page-product_vat-question'?>
  1641.                                     </p>
  1642.                                     <p
  1643.                                       class="faq-item-a"
  1644.                                       data-article-id="faq1-1"
  1645.                                     >
  1646.                                         <?php $trans->eGet('text_label_page-product_vat-answer'?>
  1647.                                     </p>
  1648.                                     <p
  1649.                                       class="faq-item-q"
  1650.                                       data-article-link-id="faq1-2"
  1651.                                       data-article-group-id="faq"
  1652.                                       data-selected-class="faq-item-q--selected"
  1653.                                     >
  1654.                                         <?php $trans->eGet('text_label_page-product_res-price-question'?></p>
  1655.                                     <p
  1656.                                       class="faq-item-a"
  1657.                                       data-article-id="faq1-2"
  1658.                                     >
  1659.                                         <?php $trans->eGet('text_label_page-product_res-price-answer'?>
  1660.                                     </p>
  1661.                                     <p
  1662.                                       class="faq-item-q"
  1663.                                       data-article-link-id="faq1-3"
  1664.                                       data-article-group-id="faq"
  1665.                                       data-selected-class="faq-item-q--selected"
  1666.                                     >
  1667.                                         <?php $trans->eGet('text_label_page-product_buying-question'?></p>
  1668.                                     <div class="faq-item-a" data-article-id="faq1-3">
  1669.                                         <p><?php $trans->eGet('text_label_page-product_buying-answer'?></p>
  1670.                                         <?php if ('se' === $parameters->get('app.instance')): ?>
  1671.                                         <div class="faq-video">
  1672.                                             <iframe
  1673.                                                 src="https://www.youtube-nocookie.com/embed/CUjII3ljg-U?si=SAZUvXYabWeAOZxp"
  1674.                                                 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
  1675.                                                 width="560"
  1676.                                                 height="315"
  1677.                                                 frameborder="0"
  1678.                                                 referrerpolicy="strict-origin-when-cross-origin"
  1679.                                                 allowfullscreen>
  1680.                                             </iframe>
  1681.                                         </div>
  1682.                                         <?php endif; ?>
  1683.                                     </div>
  1684.                                     <p
  1685.                                       class="faq-item-q"
  1686.                                       data-article-link-id="faq1-4"
  1687.                                       data-article-group-id="faq"
  1688.                                       data-selected-class="faq-item-q--selected"
  1689.                                     >
  1690.                                         <?php $trans->eGet('text_label_page-product_auction-question'?>
  1691.                                     </p>
  1692.                                     <p
  1693.                                       class="faq-item-a"
  1694.                                       data-article-id="faq1-4"
  1695.                                     >
  1696.                                         <?php $trans->eGet('text_label_page-product_auction-answer'?>
  1697.                                         <a href="<?php echo $urlGenerator->generate('app.legacy.pages.contact'?>" target="_blank">
  1698.                                             <?php $trans->eGet('link_button_page-product_customer-service'?>
  1699.                                         </a>
  1700.                                     </p>
  1701.                                     <p
  1702.                                       class="faq-item-q"
  1703.                                       data-article-link-id="faq1-5"
  1704.                                       data-article-group-id="faq"
  1705.                                       data-selected-class="faq-item-q--selected"
  1706.                                     >
  1707.                                         <?php $trans->eGet('text_label_page-product_something-wrong-question'?>
  1708.                                     </p>
  1709.                                     <p
  1710.                                       class="faq-item-a"
  1711.                                       data-article-id="faq1-5"
  1712.                                     >
  1713.                                         <?php $trans->eGet('text_label_page-product_something-wrong-answer'?>
  1714.                                     </p>
  1715.                                 </div>
  1716.                                 <div class="how-to-buy-link">
  1717.                                     <a href="<?php echo $urlGenerator->generate('app.legacy.pages.howtobuy'?>">
  1718.                                         <?php $trans->eGet('text_link_page-product_faq-kpk'); ?>
  1719.                                     </a>
  1720.                                     <i class="ri-arrow-right-line"></i>
  1721.                                 </div>
  1722.                             </div>
  1723.                         </div> <!-- faq  end-->
  1724.                         <div class="cta">
  1725.                             <div class="cta-header">
  1726.                                 <div class="cta-header__pre"><?php $trans->eGet('text_label_page-product_cta-header-pre'); ?></div>
  1727.                                 <div class="cta-header__main"><?php $trans->eGet('text_label_page-product_cta-header-main'); ?></div>
  1728.                             </div>
  1729.                             <div class="cta-content">
  1730.                                 <?php $trans->eGet('text_label_page-product_cta-content'); ?>
  1731.                             </div>
  1732.                             <div class="cta-content__link">
  1733.                                 <a href="<?php echo $urlGenerator->generate('app.legacy.pages.howtosell'?>" class="button button--rounded button--large button--highlight">
  1734.                                     <?php $trans->eGet('text_button_page-product_spk-cta-link'); ?><i class="ri-arrow-right-line"></i>
  1735.                                 </a>
  1736.                             </div>
  1737.                         </div> <!-- cta end-->
  1738.                     </div> <!-- END FAQ-CTA -->
  1739.                 </div> <!-- END product-footer-row -->
  1740.             <?php
  1741.             print "<div class='similar-objects-row'>";
  1742.             // -- OTHER OBJECTS SLIDER
  1743.             if($vendor->hideOtherProductsSlider != 1) {
  1744.                 try {
  1745.                     $similarProducts $productListRepository->findSimilarProductsByVendorId($vendor->id$obj->id);
  1746.                 } catch (RepositoryException $e) {
  1747.                 }
  1748.                 if (!== $similarProducts->count()) {
  1749.                 print "    <div class=\"similar-objects\">\n";
  1750.                 print ("
  1751.                     <h2>
  1752.                       <a class='product-info-section__product-link vendor-link' href=\"/vendorpage/" $vendor->id "/\">
  1753.                         <span>" $trans->get('link_button_page-product_same-seller') . "
  1754.                           <span class='link-icon'></span>
  1755.                         </span>
  1756.                       </a>
  1757.                     </h2>\n");
  1758.                 print "      <div class=\"carousel vendor-carousel\">\n";
  1759.                     foreach ($similarProducts as $productCard) {
  1760.                         echo '<div class="object-cell">';
  1761.                         try {
  1762.                             echo $productCardRenderer->render($productCard);
  1763.                         } catch (LoaderError RuntimeError SyntaxError $e) {}
  1764.                         print '</div>';
  1765.                     }
  1766.                 print "      </div>";
  1767.                 print "</div>";
  1768.                 }
  1769.             }
  1770.             // -- OTHER OBJECTS END
  1771.             // -- START SIMILAR OBJECT SLIDER
  1772.             $categoriesForProductListning = [];
  1773.             try {
  1774.                 $categoriesForProductListning $categoriesObject->getCategoriesForProductListing($obj->categories_id);
  1775.                 $similarProducts $productListRepository->findSimilarProductsByCategoryIds($categoriesForProductListning$obj->id);
  1776.             } catch (Exception $e) {}
  1777.             if (!== $similarProducts->count()) {
  1778.                 print "<div class=\"similar-objects other-objects\">\n";
  1779.                 $categoryModel $categoriesObject->getClosestPublicCategory($obj->categories_id);
  1780.                 if (!is_null($categoryModel->getId())) {
  1781.                     printf(
  1782.                 '<h2>
  1783.                             <a class="product-info-section__product-link other-link" href="%s">
  1784.                                 <span>%s
  1785.                                     <span class="link-icon"></span>
  1786.                                 </span>
  1787.                             </a>
  1788.                         </h2>',
  1789.                         $categoryModel->getCompleteUrl(),
  1790.                         $categoryModel->getDisplayName()
  1791.                     );
  1792.                 }
  1793.                 print "<div class=\"carousel object-carousel\">\n";
  1794.                 foreach ($similarProducts as $productCard) {
  1795.                     echo '<div class="object-cell">';
  1796.                     try {
  1797.                         echo $productCardRenderer->render($productCard);
  1798.                     } catch (LoaderError RuntimeError SyntaxError $e) {}
  1799.                     echo '</div>'// end object-cell
  1800.                 }
  1801.                 print "</div> <!-- carousel object-carousel end -->\n";
  1802.                 print "</div> <!-- end .other-objects -->\n";
  1803.             }
  1804.             //// Trustpilot-showcase
  1805.             echo $container->get('twig')->render('public/trustpilot/trustpilot_small.html.twig');
  1806.             ?>
  1807.             <?php print $obj->script_code?>
  1808.             <script>
  1809.                 var secleft = <?php print $secleft?>;
  1810.             </script>
  1811.         </div> <!-- END .similar-objects-row-->
  1812.       </div> <!-- end .product-grid -->
  1813.     </div> <!-- end .topbar_full -->
  1814.     <?php }
  1815.     else {
  1816.       print "<div class='row'>";
  1817.       print "<div class='column xlarge-4 xlarge-offset-4 large-6 large-offset-3 medium-8 medium-offset-2 small-12'>";
  1818.       print "<div class='auction_not_started'>";
  1819.       print "<video loop autoplay playsinline muted width='65'>";
  1820.       print "<source src='/images/video/Timglas.mp4' type='video/mp4'>";
  1821.       print "</video>";
  1822.       print "<h2>".$trans->get("ALIAS_PRODUCT_NOT_STARTED_HEADLINE")."</h2>";
  1823.       print "<p class='ingress'>".$trans->get("ALIAS_PRODUCT_NOT_STARTED_TEXT")."</p>";
  1824.       print "<a class='klaravik-link-button' href='/'>"$trans->get('link_button_page-product_all-auctions') ."</a>";
  1825.       print "</div>";
  1826.       print "</div>";
  1827.       print "</div>";
  1828.     }
  1829. }
  1830.   else {
  1831.       ?>
  1832.           <div class='row'>
  1833.             <div class='column large-6 large-offset-3 medium-8 medium-offset-2 small-12 page-main'>
  1834.                 <div class='noValidProduct'>
  1835.                     <div class='noValidProduct__lottie'>
  1836.                         <div class='noValidProduct__lottie-magnifyer' data-src='/images/lottie-animations/magnifying-glass.json' autoplay loop></div>
  1837.                     </div>
  1838.                     <div class='noValidProduct__title'>
  1839.                         <?php $trans->eGet('text_label_page-product_no-valid-prod-caption'); ?>
  1840.                     </div>
  1841.                     <p><?php $trans->eGet('text_label_page-product_no-valid-prod-text'); ?></p>
  1842.                     <a href='/'>
  1843.                         <button class='noValidProduct__button button--medium button--primary'>
  1844.                             <?php $trans->eGet('link_button_page-product_all-auctions'); ?>
  1845.                         </button>
  1846.                     </a>
  1847.                 </div>
  1848.             </div>
  1849.           </div>
  1850.       <?php
  1851.   }
  1852. }
  1853. else {
  1854.   print $trans->get('text_label_page-product_missing-valid-param');
  1855. }
  1856. ?>
  1857. <!-- Vue teleportation of snackbars will end here -->
  1858. <div class="snackbars"></div>
  1859. <k-modal id="saved-object-modal" data-position="center">
  1860.     <i slot="close-icon" class="ri-close-fill"></i>
  1861.     <div slot="header" class="saved-object-modal__header">
  1862.         <span class="saved-object-modal__header-img"></span>
  1863.     </div>
  1864.     <div slot="body" class="saved-object-modal__body">
  1865.         <h1 class="saved-object-modal__heading"><?php $trans->eGet("text_heading_saved-object-modal_save-object")?></h1>
  1866.         <p class="saved-object-modal__subheading"><?php $trans->eGet("text_bodytext_saved-object-modal_login")?></p>
  1867.     </div>
  1868.     <div slot="footer" class="saved-search-modal__footer saved-object-modal__footer-btns">
  1869.         <a href="<?php echo($urlGenerator->generate('app.legacy.pages.login', ['continue' => $request->getRequestUri()])) ?>" class="button--large button--primary button--rounded" saved-object-cta="login">
  1870.             <i class="ri-user-fill"></i><?php $trans->eGet("text_label_saved-object-modal_login"?>
  1871.         </a>
  1872.         <a href="<?php echo($urlGenerator->generate('app.legacy.pages.register')) ?>" class="button--large button--rounded button--secondary" saved-object-cta="create-account">
  1873.             <i class="ri-user-add-line"></i><?php $trans->eGet("text_label_saved-object-modal_create-account"?>
  1874.         </a>
  1875.     </div>
  1876. </k-modal>
  1877. <script>
  1878.   let sessionBuyer = <?php
  1879.       if (array_key_exists('register_id'$_SESSION) && isset($obj->id)) {
  1880.           $sessionRegisterId $_SESSION['register_id'];
  1881.           $bidderNumbers getBidderNumbers($db$obj->id);
  1882.           echo array_key_exists(
  1883.               $sessionRegisterId$bidderNumbers) ? $bidderNumbers[$sessionRegisterId] : -1;
  1884.       } else {
  1885.           echo 0;
  1886.       }
  1887.       ?>;
  1888. </script>
  1889. <?php
  1890. $manifestAssets
  1891.     ->add('bundle-pages-product')
  1892.     ->add('bundle-requests-ajaxMarkObject');