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_2.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');
$user = JBusinessUtil::getUser();
$appSettings = JBusinessUtil::getApplicationSettings();
?>

<div id="jbd-results-list-container" itemscope itemtype="http://schema.org/OfferCatalog" class="offer-list-style-2">
    <?php if(!empty($this->offers)){?>
        <?php foreach ($this->offers as $offer){?>
            <div itemscope itemprop="itemListElement" itemtype="http://schema.org/Offer">
                <div class="result-item shadow-border <?php echo !empty($offer->featured)?"featured":"" ?>">
                    <div class="row">
                        <div class="col-lg-3">
                            <div class="item-image-cover">
                                <a href="<?php echo $offer->link ?>" itemprop="image" itemscope itemtype="http://schema.org/ImageObject"> </a>
                                <?php if(!empty($offer->picture_path)){?>
                                    <img  alt="<?php $this->escape($offer->subject) ?>" src="<?php echo BD_PICTURES_PATH.$offer->picture_path?>" itemprop="">
                                <?php }else{?>
                                    <img 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 } ?>
                            </div>
                        </div>
                        <div class="col-lg-9">
                            <div class="result-content">
                                <div class="result-content-top">
                                	<div class="row result-header-row">
										<div class="col-lg-7">
											<?php if(isset($offer->featured) && $offer->featured==1){ ?>
												<div class="featured-text">
													<?php echo JText::_("LNG_FEATURED")?>
												</div>
											<?php } ?>

											<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>
											<span style="display:none;" itemprop="url"><?php echo JBusinessUtil::getCompanyLink($company) ?></span>
                                            
                                            <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>

                                            <?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-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="horizontal-elements">
                                        <?php if((!empty($offer->startDate) && $offer->startDate!="0000-00-00") || (!empty($offer->endDate) && $offer->endDate!="0000-00-00")){?>
                                            <div class="horizontal-element">
                                                <i class="icon calendar"></i>
                                                <?php
                                                echo JBusinessUtil::getDateGeneralFormat($offer->endDate);
                                                ?>
                                            </div>
                                        <?php } ?>
                                        <?php if(!empty($offer->show_time) && JBusinessUtil::getRemainingtime($offer->endDate, $offer->time_zone)!=""){?>
                                            <div class="horizontal-element">
                                                <span ><i class="icon clock"></i> <?php echo JBusinessUtil::getRemainingtime($offer->endDate, $offer->time_zone)?></span>
                                            </div>
                                        <?php } ?>
                                    </div>

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

                                <div class="result-content-bottom">
                                    <div class="row">
                                        <div class="col-lg-7">
                                            <div class="result-listing-details">
                                                <?php if(!empty($offer->company_name)){?>
                                                    <div itemprop="offeredBy" itemscope itemtype="http://schema.org/Organization">
                                                        <div class="image-circle">
                                                            <?php if (!empty($offer->logoLocation)) { ?>
                                                                <img title="<?php echo $this->escape($offer->company_name) ?>" alt="<?php echo $this->escape($offer->company_name) ?>" src="<?php echo BD_PICTURES_PATH . $offer->logoLocation ?>" itemprop="contentUrl">
                                                            <?php } else { ?>
                                                                <img  title="<?php echo $this->escape($offer->company_name) ?>" alt="<?php echo $this->escape($offer->company_name) ?>" src="<?php echo BD_PICTURES_PATH . '/no_image.jpg' ?>" itemprop="contentUrl">
                                                            <?php } ?>    
                                                        </div>
                                                        <div itemprop="name"> <?php echo $this->escape($offer->company_name) ?></div>
                                                    </div>
                                                <?php } ?>
                                            </div>
                                        </div>
                                        <div class="col-lg-5">
                                            <div class="result-item-actions">
                                                <div class="horizontal-element">
                                                    <a title="<?php echo $this->escape($offer->company_name) ?>" href="<?php echo JBusinessUtil::getCompanyDefaultLink($offer->company_id) ?>"><i class="icon link-circle"></i></a>
                                                </div>

                                                <div class="horizontal-element">
                                                    <?php if(!empty($offer->bookmark)) { ?>
                                                        <!-- Business Bookmarks -->
                                                        <a id="bookmark-<?php echo $offer->id ?>" href="javascript:jbdUtils.showUpdateBookmarkDialog(<?php echo $user->id==0?"1":"0"?>, <?php echo $offer->id ?>,<?php echo BOOKMARK_TYPE_OFFER ?>)"  title="<?php echo JText::_("LNG_UPDATE_BOOKMARK")?>" class="bookmark"><i class="icon heart-circle"></i></a>
                                                    <?php } else {?>
                                                        <a id="bookmark-<?php echo $offer->id ?>" href="javascript:jbdUtils.showAddBookmark(<?php echo $user->id==0?"1":"0"?>, <?php echo $offer->id ?>,<?php echo BOOKMARK_TYPE_OFFER ?>)" title="<?php echo JText::_("LNG_ADD_BOOKMARK")?>" class="bookmark"><i class="icon heart-o-circle"></i></a>
                                                    <?php } ?>
                                                </div>
                                            </div>        
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <?php } ?>
    <?php }?>
</div>
<?php require_once JPATH_COMPONENT_SITE . '/include/bookmark_utils.php'; ?>