details.phtml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. <?php
  2. /**
  3. * @version 7.10 [rev.7.10.03]
  4. */
  5. /* @var bool $live */
  6. /* @var \Ppb\Db\Table\Row\Listing $listing */
  7. $this->listingDetails($listing);
  8. /* @var \Ppb\Db\Table\Row\User $seller */
  9. $this->userDetails($seller);
  10. ?>
  11. <div itemscope itemtype="http://schema.org/Product" class="product" id="print-area">
  12. <meta itemprop="url" content="<?php echo $this->url($listing->link()); ?>">
  13. <div class="row">
  14. <div class="col-sm-7">
  15. <?php $mainCategory = $this->categories()->getCategories()->getBreadcrumbs($listing['category_id']); ?>
  16. <ul class="breadcrumb">
  17. <li>
  18. <a class="home"
  19. href="<?php echo $this->url(null, 'app-home'); ?>"><?php echo $this->_('Home'); ?></a>
  20. <span></span>
  21. </li>
  22. <?php foreach ($mainCategory as $id => $name) { ?>
  23. <li>
  24. <a href="<?php echo $this->url(array('category_name' => $name, 'parent_id' => $id),
  25. 'listings-browse-category'); ?>"><?php echo $name; ?></a>
  26. </li>
  27. <?php } ?>
  28. </ul>
  29. </div>
  30. <div class="col-sm-5 manage-buttons no-print">
  31. <div class="manage-listing-btn-group pull-right">
  32. <?php echo $this->partial('partials/details-manage-buttons.phtml',
  33. array('listing' => $listing,
  34. 'live' => $live,
  35. )); ?>
  36. </div>
  37. </div>
  38. </div>
  39. <?php if (($vacationMode = $this->userDetails()->vacationMode()) !== false) { ?>
  40. <div class="alert alert-warning alert-dismissable">
  41. <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
  42. <?php echo $vacationMode; ?>
  43. </div>
  44. <?php } ?>
  45. <div class="row">
  46. <div class="col-sm-5">
  47. <?php $media = $listing->getMedia(array('image', 'video')); ?>
  48. <?php
  49. $counter = 0;
  50. $mediaCount = count($media);
  51. if ($mediaCount > 0) { ?>
  52. <div id="jq-mainImage" class="jq-loading-slider">
  53. <?php foreach ($media as $file) { ?>
  54. <div class="item jq-slide hidden">
  55. <?php
  56. if ($file['type'] == \Ppb\Service\ListingsMedia::TYPE_VIDEO) {
  57. echo $this->videoPlayer($file);
  58. }
  59. else {
  60. echo $this->thumbnail($file['value'], 500, true,
  61. array(
  62. 'alt' => $listing['name'],
  63. 'type' => $file['type'],
  64. 'data-gallery-id' => $counter++,
  65. 'itemprop' => 'image',
  66. ));
  67. } ?>
  68. </div>
  69. <?php } ?>
  70. </div>
  71. <?php if ($mediaCount > 1) { ?>
  72. <div id="jq-thumbnails" class="jq-loading-slider">
  73. <?php foreach ($media as $file) { ?>
  74. <div class="item jq-slide hidden">
  75. <?php echo $this->thumbnail($file['value'], 100, true,
  76. array('alt' => $listing['name'], 'type' => $file['type'])); ?>
  77. </div>
  78. <?php } ?>
  79. </div>
  80. <?php } ?>
  81. <?php foreach ($media as $file) {
  82. if ($file['type'] == \Ppb\Service\ListingsMedia::TYPE_IMAGE) { ?>
  83. <a class="jq-gallery"
  84. href="<?php echo $this->thumbnail()->generateImagePath($file['value']); ?>"></a>
  85. <?php }
  86. } ?>
  87. <?php } ?>
  88. <div class="clearfix"></div>
  89. </div>
  90. <div class="col-sm-7">
  91. <h1 class="title" itemprop="name"><?php echo $listing['name']; ?></h1>
  92. <?php if ($live === true) { ?>
  93. <div>
  94. <small>[ <?php echo $this->_('ID:') . ' ' . $listing['id']; ?> ]</small>
  95. </div>
  96. <?php } ?>
  97. <div class="spacer"></div>
  98. <?php if (!empty($listing['subtitle'])) { ?>
  99. <h2 class="subtitle"><?php echo $listing['subtitle']; ?></h2>
  100. <?php } ?>
  101. <?php if ($this->settings['enable_social_network_links'] && !$listing->isDraft() && $live === true) { ?>
  102. <div class="listing-social no-print">
  103. <?php echo $this->social($listing)->display(); ?>
  104. </div>
  105. <div class="clearfix"></div>
  106. <?php } ?>
  107. <div class="tabbable actions">
  108. <ul class="nav nav-tabs details-tabs no-print">
  109. <li class="active"><a href="#pane1" data-toggle="tab"><?php echo $this->_('Details'); ?></a>
  110. </li>
  111. <li class=""><a href="#pane2" data-toggle="tab"><?php echo $this->_('Seller Info'); ?></a></li>
  112. <?php if ($live === true) { ?>
  113. <li class=""><a href="#pane3" data-toggle="tab"><?php echo $this->_('History'); ?></a></li>
  114. <?php } ?>
  115. </ul>
  116. <div class="tab-content details-content">
  117. <div id="pane1" class="tab-pane active">
  118. <?php if ($listing['listing_type'] == 'auction') { ?>
  119. <h5 class="current-price">
  120. <?php echo $this->_('Current Bid:'); ?>
  121. <?php echo $this->amount($listing->currentBid(true), $listing['currency']); ?>
  122. <?php if ($listing['reserve_price'] > 0) { ?>
  123. <?php if ($live === true) { ?>
  124. <?php if ($listing->currentBid() < $listing['reserve_price']) { ?>
  125. <span class="label label-danger">
  126. <?php echo $this->_('Reserve Not Met'); ?></span>
  127. <?php
  128. }
  129. else {
  130. ?>
  131. <span class="label label-success">
  132. <?php echo $this->_('Reserve Met'); ?></span>
  133. <?php } ?>
  134. <?php
  135. }
  136. else {
  137. ?>
  138. <span class="label label-default">
  139. <?php echo $this->_('Reserve Price:'); ?>
  140. <?php echo $this->amount($listing['reserve_price'], $listing['currency']); ?>
  141. </span>
  142. <?php } ?>
  143. <?php } ?>
  144. <span class="number-bids">
  145. <?php echo $this->_('Bids'); ?>:
  146. <?php echo $listing->countDependentRowset('\Ppb\Db\Table\Bids'); ?>
  147. </span>
  148. </h5>
  149. <?php
  150. if (!empty($this->loggedInUser['id'])) {
  151. if (($yourBid = $listing->yourBid($this->loggedInUser['id'])) !== null) { ?>
  152. <h5 class="your-bid">
  153. <?php echo $this->_('Your Bid:'); ?>
  154. <?php echo $this->amount($yourBid['amount'], $listing['currency']); ?>
  155. <?php if ($this->settings['proxy_bidding']) { ?>
  156. <small>
  157. (<?php echo $this->_('Proxy Bid'); ?>
  158. <?php echo $this->amount($yourBid['maximum_bid'],
  159. $listing['currency']); ?>)
  160. </small>
  161. <?php } ?>
  162. <?php echo $this->bidStatus($yourBid); ?>
  163. </h5>
  164. <?php }
  165. } ?>
  166. <div class="spacer"></div>
  167. <?php } ?>
  168. <div class="purchase">
  169. <?php if ($listing['listing_type'] == 'auction') { ?>
  170. <form
  171. action="<?php echo $this->url(array('action' => 'confirm', 'id' => $listing['id']),
  172. 'listings-bid'); ?>" method="post">
  173. <dl class="dl-horizontal">
  174. <dt class="bid">
  175. <?php echo $this->_('Place Bid'); ?>
  176. </dt>
  177. <dd>
  178. <?php
  179. echo $this->formElement('text', 'amount')
  180. ->setAttributes(array(
  181. 'class' => 'form-control input-mini',
  182. 'placeholder' => $listing['currency'],
  183. ))
  184. ->render();
  185. $attributes = array(
  186. 'class' => 'btn btn-primary',
  187. );
  188. if (!$listing->isActiveAndOpen()) {
  189. $attributes['disabled'] = 'disabled';
  190. }
  191. echo $this->formElement('button', 'bid')
  192. ->setType('submit')
  193. ->setAttributes($attributes)
  194. ->setValue('Place Bid')
  195. ->render();
  196. ?>
  197. </dd>
  198. <dd>
  199. <?php echo $this->_('Minimum Bid:'); ?>
  200. <?php echo $this->amount($listing->minimumBid(), $listing['currency']); ?>
  201. </dd>
  202. </dl>
  203. </form>
  204. <div class="spacer"></div>
  205. <?php } ?>
  206. <form action="" method="post">
  207. <?php if ($listing->isBuyOut()) { ?>
  208. <dl class="dl-horizontal">
  209. <dt class="buy">
  210. <?php echo $this->_('Price'); ?>
  211. </dt>
  212. <dd class="desc" itemprop="offers" itemscope
  213. itemtype="http://schema.org/Offer">
  214. <meta itemprop="priceCurrency"
  215. content="<?php echo $listing['currency']; ?>">
  216. <span id="product-price" itemprop="price">
  217. <?php echo $this->amount($listing['buyout_price'], $listing['currency']); ?>
  218. </span>
  219. <?php if ($listing['listing_type'] == 'product') {
  220. echo $this->partial('partials/product-attributes.phtml', array(
  221. 'listing' => $listing,
  222. ));
  223. } ?>
  224. <?php if ($listing['quantity'] == -1 || $listing['quantity'] > 1 || $listing->getData('stock_levels')) { ?>
  225. </dd>
  226. <dd>
  227. <?php
  228. echo $this->formElement('text', 'quantity')
  229. ->setAttributes(array(
  230. 'class' => 'form-control input-mini',
  231. 'placeholder' => $this->_('Quantity'),
  232. ))
  233. ->render();
  234. ?>
  235. <?php } ?>
  236. <?php
  237. $purchaseBtnValue = ($listing->canAddToCart() === true) ? $this->_('Add to Cart') : $this->_('Buy Out');
  238. $attributes = array(
  239. 'class' => 'btn btn-success',
  240. 'formaction' => $this->url($listing->purchaseLink()),
  241. );
  242. if (!$listing->isActiveAndOpen() || $seller->isVacation()) {
  243. $attributes['disabled'] = 'disabled';
  244. }
  245. echo $this->formElement('button', 'buy')
  246. ->setType('submit')
  247. ->setAttributes($attributes)
  248. ->setValue($purchaseBtnValue)
  249. ->render();
  250. ?>
  251. </dd>
  252. </dl>
  253. <div class="spacer"></div>
  254. <?php } ?>
  255. <?php if ($listing->isMakeOffer()) { ?>
  256. <dl class="dl-horizontal">
  257. <dt class="offer"><?php echo $this->_('Make An Offer'); ?></dt>
  258. <dd>
  259. <?php
  260. echo $this->formElement('text', 'amount')
  261. ->setAttributes(array(
  262. 'class' => 'form-control input-mini',
  263. 'placeholder' => $listing['currency'],
  264. ))
  265. ->render();
  266. $attributes = array(
  267. 'class' => 'btn btn-warning',
  268. 'formaction' => $this->url(array('action' => 'confirm', 'id' => $listing['id']), 'listings-offer'),
  269. );
  270. if (!$listing->isActiveAndOpen()) {
  271. $attributes['disabled'] = 'disabled';
  272. }
  273. echo $this->formElement('button', 'offer')
  274. ->setType('submit')
  275. ->setAttributes($attributes)
  276. ->setValue('Make Offer')
  277. ->render();
  278. ?>
  279. </dd>
  280. <?php if ($seller->displayMakeOfferRanges() || $live != true) { ?>
  281. <dd>
  282. <?php echo $this->offerRanges($listing); ?>
  283. </dd>
  284. <?php } ?>
  285. </dl>
  286. <div class="spacer"></div>
  287. <?php } ?>
  288. </form>
  289. <?php if ($listing['quantity'] > 0 || $listing['listing_type'] == 'product') { ?>
  290. <dl class="dl-horizontal">
  291. <dt><?php echo $this->_('Quantity'); ?></dt>
  292. <dd>
  293. <span id="quantity-available">
  294. <?php echo $this->listingDetails()->availableQuantity(); ?>
  295. </span>
  296. </dd>
  297. </dl>
  298. <div class="spacer"></div>
  299. <?php } ?>
  300. <?php if (($taxType = $listing->getTaxType()) !== false) { ?>
  301. <span
  302. class="label label-default"><?php echo $this->taxType($taxType)->display(); ?></span>
  303. <div class="spacer"></div>
  304. <?php } ?>
  305. <dl class="dl-horizontal">
  306. <dt><?php echo $this->_('Status'); ?></dt>
  307. <dd>
  308. <?php echo $this->listingDetails()->status(false); ?>
  309. </dd>
  310. <?php if ($listing->isScheduled()) { ?>
  311. <dt><?php echo $this->_('Starts in'); ?></dt>
  312. <dd><?php echo $this->countdown($listing['start_time'])->display(); ?></dd>
  313. <?php
  314. }
  315. else if ($listing->isOpen() && $listing['end_time'] != null && !$listing['draft']) {
  316. ?>
  317. <dt><?php echo $this->_('Time Left'); ?></dt>
  318. <dd class="time"><?php echo $this->countdown($listing['end_time'])->display(); ?></dd>
  319. <?php } ?>
  320. </dl>
  321. <?php if ($live === true) { ?>
  322. <div class="text-center">
  323. <?php if ($seller->getGlobalSettings('visitors_counter')) { ?>
  324. <span class="label label-info">
  325. <?php echo sprintf(
  326. $this->_('Listing viewed %s times'),
  327. $listing['nb_clicks']); ?>
  328. </span>
  329. <?php } ?>
  330. <?php if ($seller->getGlobalSettings('listing_watched_by_box')) { ?>
  331. <span class="label label-success">
  332. <?php echo sprintf(
  333. $this->_('Listing watched by %s users'),
  334. $listing->countWatchers()); ?>
  335. </span>
  336. <?php } ?>
  337. </div>
  338. <?php } ?>
  339. </div>
  340. </div>
  341. <?php /* @var \Ppb\Db\Table\Row\User $seller */ ?>
  342. <div id="pane2" class="tab-pane">
  343. <h4 class="headline print-only mgt-20">
  344. <span><?php echo $this->_('Seller Info'); ?></span>
  345. </h4>
  346. <dl class="dl-horizontal">
  347. <dt><?php echo $this->_('Seller'); ?></dt>
  348. <dd><?php echo $this->userDetails()->display(); ?></dd>
  349. <dt><?php echo $this->_('Registered Since'); ?></dt>
  350. <dd><?php echo $this->date($seller->getData('created_at')); ?></dd>
  351. <dt><?php echo $this->_('Feedback'); ?></dt>
  352. <dd><?php echo $this->fieldDisplay($seller->getReputationPercentage(), null, $this->_('n/a')); ?></dd>
  353. <dd>
  354. <a href="<?php echo $this->url($seller->otherItemsLink()); ?>">
  355. <?php echo $this->_('View Other Items'); ?>
  356. </a>
  357. </dd>
  358. <?php if ($seller->getData('store_active')) { ?>
  359. <dt><?php echo $this->_('Store'); ?></dt>
  360. <dd>
  361. <a href="<?php echo $this->url($seller->storeLink()); ?>">
  362. <?php echo $seller->storeName(); ?>
  363. </a>
  364. </dd>
  365. <?php } ?>
  366. </dl>
  367. </div>
  368. <?php if ($live === true) {
  369. $historyTabs = array();
  370. if ($listing['listing_type'] == 'auction') {
  371. $historyTabs['bids'] = array(
  372. 'name' => $this->_('Bids'),
  373. 'headline' => $this->_('Bids History'),
  374. 'content' => $this->partial('listings/history/bids.phtml',
  375. array('listing' => $listing)),
  376. );
  377. }
  378. if ($listing->isMakeOffer()) {
  379. $historyTabs['offers'] = array(
  380. 'name' => $this->_('Offers'),
  381. 'headline' => $this->_('Offers History'),
  382. 'content' => $this->partial('listings/history/offers.phtml',
  383. array('listing' => $listing)),
  384. );
  385. }
  386. $historyTabs['sales'] = array(
  387. 'name' => $this->_('Sales'),
  388. 'headline' => $this->_('Sales History'),
  389. 'content' => $this->partial('listings/history/sales.phtml',
  390. array('listing' => $listing)),
  391. );
  392. ?>
  393. <div id="pane3" class="tab-pane no-print">
  394. <?php if (count($historyTabs) > 1) {
  395. $activeTab = ' class="active"'; ?>
  396. <ul class="nav nav-pills">
  397. <?php foreach ($historyTabs as $tabId => $historyTab) { ?>
  398. <li <?php echo $activeTab; ?>>
  399. <a href="#<?php echo $tabId; ?>"
  400. data-toggle="tab"><?php echo $historyTab['name']; ?></a>
  401. </li>
  402. <?php $activeTab = null; ?>
  403. <?php
  404. } ?>
  405. </ul>
  406. <?php } ?>
  407. <div class="tab-content">
  408. <?php $activeTab = ' active'; ?>
  409. <?php foreach ($historyTabs as $tabId => $historyTab) { ?>
  410. <div class="tab-pane<?php echo $activeTab; ?>" id="<?php echo $tabId; ?>">
  411. <h4><?php echo $historyTab['headline']; ?></h4>
  412. <?php echo $historyTab['content']; ?>
  413. </div>
  414. <?php $activeTab = null; ?>
  415. <?php
  416. } ?>
  417. </div>
  418. </div>
  419. <?php } ?>
  420. </div>
  421. </div>
  422. </div>
  423. </div>
  424. <?php $customFields = $listing->getCustomFields(); ?>
  425. <div class="description-tabs">
  426. <ul class="nav nav-tabs no-print">
  427. <li class="active">
  428. <a href="#desc" data-toggle="tab"><?php echo $this->_('Description'); ?></a>
  429. </li>
  430. <?php if (count($customFields) > 0) { ?>
  431. <li>
  432. <a href="#spec" data-toggle="tab"><?php echo $this->_('Specifications'); ?></a>
  433. </li>
  434. <?php } ?>
  435. <li>
  436. <a href="#pay" data-toggle="tab"><?php echo $this->_('Payments & Returns'); ?></a>
  437. </li>
  438. <?php if ($this->settings['enable_shipping']) { ?>
  439. <li>
  440. <a href="#post" data-toggle="tab"><?php echo $this->_('Postage & Shipping'); ?></a>
  441. </li>
  442. <?php } ?>
  443. <?php if ($live === true) { ?>
  444. <?php if ($this->settings['enable_messaging']) { ?>
  445. <li>
  446. <a href="#ques" data-toggle="tab"><?php echo $this->_('Questions & Answers'); ?></a>
  447. </li>
  448. <?php } ?>
  449. <?php if ($this->settings['other_items_seller']) { ?>
  450. <li>
  451. <a href="#other" data-toggle="tab"><?php echo $this->_("Seller's Other Items"); ?></a>
  452. </li>
  453. <?php } ?>
  454. <?php } ?>
  455. </ul>
  456. <div class="tab-content">
  457. <div class="tab-pane active" id="desc" itemprop="description">
  458. <h3 class="headline print-only">
  459. <span><?php echo $this->_('Description'); ?></span>
  460. </h3>
  461. <?php echo $this->renderHtml($listing['description'], false, false); ?>
  462. </div>
  463. <?php if (count($customFields) > 0) { ?>
  464. <div class="tab-pane" id="spec">
  465. <h3 class="headline print-only mgt-30">
  466. <span><?php echo $this->_('Specifications'); ?></span>
  467. </h3>
  468. <dl class="dl-horizontal">
  469. <?php foreach ($customFields as $field) { ?>
  470. <dt><?php echo $this->_($field['label']); ?></dt>
  471. <dd><?php echo $this->fieldDisplay($field['display'], null, '-'); ?></dd>
  472. <?php } ?>
  473. </dl>
  474. </div>
  475. <?php } ?>
  476. <div class="tab-pane" id="pay">
  477. <h3 class="headline print-only mgt-30">
  478. <span><?php echo $this->_('Payments & Returns'); ?></span>
  479. </h3>
  480. <dl class="dl-horizontal">
  481. <dt><?php echo $this->_('Payment Methods'); ?></dt>
  482. <dd><?php
  483. $object = $this;
  484. echo $this->fieldDisplay(array_map(function ($array) use (&$object) {
  485. return $object->_($array['name']);
  486. }, $listing->getPaymentMethods()), null, 'N/A'); ?></dd>
  487. <dt><?php echo $this->_('Returns Accepted'); ?></dt>
  488. <dd><?php echo $this->fieldDisplay($listing['accept_returns'], $this->_('Yes'), $this->_('No')); ?></dd>
  489. <?php if (!empty($listing['returns_policy'])) { ?>
  490. <dt><?php echo $this->_('Returns Policy'); ?></dt>
  491. <dd><?php echo $listing['returns_policy']; ?></dd>
  492. <?php } ?>
  493. </dl>
  494. </div>
  495. <?php if ($this->settings['enable_shipping']) {
  496. $shipsTo = $this->listingDetails()->shipsTo($seller->getShipping());
  497. ?>
  498. <div class="tab-pane" id="post">
  499. <h3 class="headline print-only mgt-30">
  500. <span><?php echo $this->_('Postage & Shipping'); ?></span>
  501. </h3>
  502. <dl class="dl-horizontal">
  503. <dt><?php echo $this->_('Item Location'); ?></dt>
  504. <dd><?php echo $this->fieldDisplay($this->listingDetails()->location(), null,
  505. $this->_('n/a')); ?></dd>
  506. <?php if (!$listing->pickUpOnly()) { ?>
  507. <dt><?php echo $this->_('Ships To'); ?></dt>
  508. <dd><?php echo $this->fieldDisplay($shipsTo, null, $this->_('No shipping available.')); ?></dd>
  509. <?php } ?>
  510. </dl>
  511. <?php if ($live === true && !$listing->pickUpOnly() && !empty($listing['country']) && count($shipsTo)) { ?>
  512. <div class="shipping-calculator no-print">
  513. <h4 class="headline">
  514. <span><?php echo $this->_('Postage Calculator'); ?></span>
  515. </h4>
  516. <?php echo $this->partial('partials/shipping-calculator.phtml', array(
  517. 'quantity' => 1,
  518. 'listingId' => $listing['id'],
  519. 'user' => $seller)); ?>
  520. </div>
  521. <?php } ?>
  522. <dl class="dl-horizontal">
  523. <?php if ($this->settings['enable_pickups']) { ?>
  524. <dt><?php echo $this->_('Pick-ups'); ?></dt>
  525. <dd>
  526. <?php echo $this->_(
  527. $this->fieldDisplay(\Ppb\Model\Shipping::getPickupOptions($listing->getData(\Ppb\Model\Shipping::FLD_PICKUP_OPTIONS)),
  528. null, 'n/a')); ?>
  529. </dd>
  530. <?php } ?>
  531. <?php if (!$listing->pickUpOnly()) { ?>
  532. <?php if ($listing[\Ppb\Model\Shipping::FLD_INSURANCE]) { ?>
  533. <dt><?php echo $this->_('Insurance'); ?></dt>
  534. <dd>
  535. <?php echo $this->amount($listing[\Ppb\Model\Shipping::FLD_INSURANCE],
  536. $listing['currency']); ?>
  537. </dd>
  538. <?php } ?>
  539. <?php if (\Ppb\Model\Shipping::POSTAGE_TYPE_CARRIERS == $seller->getShipping()->getPostageType()) { ?>
  540. <dt><?php echo $this->_('Item Weight'); ?></dt>
  541. <dd><?php echo $this->listingDetails()->weight(); ?></dd>
  542. <dt><?php echo $this->_('Dimensions'); ?></dt>
  543. <dd><?php echo $this->fieldDisplay($this->listingDetails()->dimensions()); ?></dd>
  544. <?php } ?>
  545. <dt><?php echo $this->_('Shipping Instructions'); ?></dt>
  546. <dd>
  547. <?php echo $this->fieldDisplay($this->renderText($listing[\Ppb\Model\Shipping::FLD_SHIPPING_DETAILS], true), null,
  548. '-'); ?>
  549. </dd>
  550. <?php } ?>
  551. </dl>
  552. </div>
  553. <?php } ?>
  554. <?php if ($live === true) { ?>
  555. <?php if ($this->settings['enable_messaging']) { ?>
  556. <div class="tab-pane no-print" id="ques">
  557. <h4 class="headline">
  558. <span><?php echo $this->_('Public Questions'); ?></span>
  559. </h4>
  560. <?php echo $this->partial('partials/messages.phtml', array(
  561. 'listing' => $listing)); ?>
  562. <?php if (empty($this->loggedInUser['id'])) { ?>
  563. <div class="text-center">
  564. <?php echo $this->_('You need to be logged in to ask the seller a question.'); ?>
  565. <br>
  566. <a class="btn btn-link dialog-box"
  567. href="<?php echo $this->url(array('module' => 'members', 'controller' => 'user', 'action' => 'login-modal')); ?>"
  568. title="<?php echo $this->_('Log In'); ?>">
  569. <?php echo $this->_('Click here to login'); ?>
  570. </a>
  571. </div>
  572. <?php
  573. }
  574. else if ($this->loggedInUser['id'] != $listing['user_id']) {
  575. ?>
  576. <?php echo $this->action('create', 'messaging', 'members', array(
  577. 'receiver_id' => $listing['user_id'],
  578. 'listing_id' => $listing['id'],
  579. 'topic_type' => \Ppb\Service\Messaging::PRIVATE_QUESTION,
  580. 'accept_public_questions' => $seller->acceptPublicQuestions(),
  581. )); ?>
  582. <?php } ?>
  583. </div>
  584. <?php } ?>
  585. <?php if ($this->settings['other_items_seller']) { ?>
  586. <div class="tab-pane no-print" id="other">
  587. <?php echo $this->action('listings', 'browse', 'listings',
  588. array('type' => 'seller-other-items', 'user_id' => $listing['user_id'], 'current_listing_id' => $listing['id'])); ?>
  589. </div>
  590. <?php } ?>
  591. <?php } ?>
  592. </div>
  593. </div>
  594. </div>