Your IP : 216.73.216.84


Current Path : /home/helpink/www/components/com_jbusinessdirectory/views/offers/tmpl/
Upload File :
Current File : /home/helpink/www/components/com_jbusinessdirectory/views/offers/tmpl/offers_list_style_1.php

<?php
/**
 * @package    J-BusinessDirectory
 *
 * @author     CMSJunkie http://www.cmsjunkie.com/
 * @copyright  Copyright (C) 2007 - 2022 CMSJunkie. All rights reserved.
 * @license    https://www.gnu.org/licenses/agpl-3.0.en.html
 */ 
defined('_JEXEC') or die('Restricted access');

$appSettings = JBusinessUtil::getApplicationSettings();
?>

<div id="jbd-results-list-container" itemscope itemtype="http://schema.org/OfferCatalog" class="offer-list-style-1">
	<?php if(!empty($this->offers)) { ?>
		<?php foreach ($this->offers as $offer) { ?>
			<div itemscope itemprop="itemListElement" itemtype="http://schema.org/Offer">
				<div class="result-item <?php echo !empty($offer->featured)?"featured":"" ?>">
					<div class="row">
						<div class="col-lg-3 pr-lg-0">
							<div class="item-image-cover">
	    						<a href="<?php echo $offer->link ?>">
	    							<?php if(!empty($offer->picture_path) && $offer->picture_path!=''){?>
	    								<img itemprop="image" title="<?php echo $offer->picture_title ?>" alt="<?php echo $offer->picture_info ?>" src="<?php echo BD_PICTURES_PATH.$offer->picture_path?>" itemprop="">
	    							<?php }else{?>
	    								<img itemprop="image" title="<?php echo $this->escape($offer->subject)?>" alt="<?php echo $this->escape($offer->subject)?>" src="<?php echo BD_PICTURES_PATH.'/no_image.jpg' ?>" itemprop="">
	    							<?php } ?>
	    						</a>
	    					</div>
						</div>
						<div class="col-lg-9">
							<div class="result-content">
								<div class="">
									<div class="row result-header-row">
										<div class="col-lg-7">
											<div class="d-flex">
												<?php if(isset($offer->featured) && $offer->featured == 1){ ?>
													<div class="featured-text">
														<?php echo JText::_("LNG_FEATURED")?>
													</div>
												<?php } ?>

												<?php if(!empty($offer->specialPrice) && !empty($offer->price) && $offer->specialPrice < $offer->price){ ?>
													<div class="offer-discount">
														<span class="discount"><?php echo JBusinessUtil::getPriceDiscount($offer->specialPrice, $offer->price) ?>%</span>	
														<span class=""><?php echo JText::_('LNG_DISCOUNT') ?></span>
													</div>
												<?php } ?>
											</div>

											<h3 class="item-name" itemprop="url">
												<a title="<?php echo $this->escape($offer->subject)?>"
													href="<?php echo $this->escape($offer->link) ?>"><span itemprop="name"><?php echo $this->escape($offer->subject)?></span>
												</a>
											</h3>
											<?php if(!empty($company)){ ?>
												<span style="display:none;" itemprop="url"><?php echo JBusinessUtil::getCompanyLink($company) ?></span>
											<?php } ?>
												
											<?php if(!empty($offer->offerType)){?>
												<div class="item-result-type"><?php echo $this->escape($offer->offerType)?></div>
											<?php } ?>
										</div>

										<div class="col-lg-5">
											<div class="result-header-info">
												<div class="offer-rating" <?php echo !$appSettings->enable_ratings ? 'style="display:none"' : '' ?>>
													<?php if ($appSettings->enable_ratings) { ?>
														<div class="rating">
															<p class="rating-average" title="<?php echo $offer->review_score ?>" id="<?php echo $offer->id ?>" style="display: block;"></p>
														</div>
														<?php if (!empty($offer->review_score)) { ?>
															<div class="review-count" <?php echo $offer->review_score == 0 ? 'style="display:none"':'' ?>>
																<span> <?php echo $offer->nr_reviews." ".JText::_("LNG_REVIEWS");?></span>
															</div>
														<?php } ?>
													<?php } ?>
												</div>
												<div class="offer-price">
													<div>
														<?php if(!empty($offer->price) ){ ?>
															<span class="price <?php echo $offer->specialPrice>0 ?"old-price":"" ?>"><?php echo JBusinessUtil::getPriceFormat($offer->price, $offer->currencyId) ?></span>
														<?php } ?>

														<?php if(!empty($offer->specialPrice)){?>
															<span style="display:none;" itemprop="price" content="<?php echo $offer->specialPrice ?>"></span>
															<span style="display:none;" itemprop="priceCurrency" content="<?php echo JBusinessUtil::getCurrency($offer->currencyId)->currency_name ?>"></span>
															<span style="display:none;" itemprop="priceValidUntil" content="<?php echo $offer->endDate ?>"></span>
															
															<span class="price"><?php echo JBusinessUtil::getPriceFormat($offer->specialPrice, $offer->currencyId); ?></span>
														<?php }?>
													</div>
													
													<?php if ($this->defaultAttributes["price_text"]!=ATTRIBUTE_NOT_SHOW) { ?>
														<div class="price-text-list">
															<?php if (!empty($offer->price_text)) { ?>
																<span class="price-text"><?php echo $offer->price_text ?></span>
															<?php }elseif (empty($offer->price) && empty($offer->specialPrice) && ($appSettings->show_offer_free)){ ?>
																<span class="price-text"><?php echo JText::_('LNG_FREE') ?></span>
															<?php } ?>
														</div>
													<?php } ?>
												</div>
											</div>
										</div>
									</div>

									<div class="short-description" itemprop="description">
										<?php echo $offer->short_description ?>
									</div>

									<div class="row item-options">
										<?php if(!empty($offer->company_name)){?>
											<div class="col-md-6">
												<div class="item-option" itemprop="offeredBy" itemscope itemtype="http://schema.org/Organization">
													<span><i class="icon business"></i><span itemprop="name"> <?php echo $this->escape($offer->company_name) ?></span></span>
												</div>
											</div>
										<?php } ?>

										<?php if((!empty($offer->startDate) && $offer->startDate!="0000-00-00") || (!empty($offer->endDate) && $offer->endDate!="0000-00-00")){?>
											<div class="col-md-6">
												<div class="item-option">
													<i class="icon calendar"></i>
													<?php 
														echo JBusinessUtil::getDateGeneralFormat($offer->startDate)." - ". JBusinessUtil::getDateGeneralFormat($offer->endDate);
													?>
												</div>
											</div>
										<?php } ?>

										<?php $address =JBusinessUtil::getShortAddress($offer); ?>
										<?php if(!empty($address)){ ?>
											<div class="col-md-6">
												<div class="item-option" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
													<span><i class="icon map-marker"></i> <?php echo $address ?></span>
												</div>
											</div>
										<?php } ?>

										<?php if(!empty($offer->show_time) && JBusinessUtil::getRemainingtime($offer->endDate, $offer->time_zone)!=""){?>
											<div class="col-md-6">
												<div class="item-option">
													<span ><i class="icon clock"></i> <?php echo JBusinessUtil::getRemainingtime($offer->endDate, $offer->time_zone)?></span>
												</div>
											</div>
										<?php } ?>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		<?php } ?>
	<?php }?>
</div>