Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @Enterprise: Yagendoo Media GmbH
- * @author: Yagendoo Team
- * @url: http://www.yagendoo.com
- * @copyright: Copyright (C) Yagendoo Media GmbH
- * @license: GNU General Public License version 2 or later; see LICENSE.txt
- *
- */
- defined ( '_JEXEC' ) or die ( 'Restricted access' );
- include_once dirname(__FILE__) . '/../assets/yagHelper/yagendooTmplGlobal.php';
- YagendooTmplGlobal::init();
- // addon for joomla modal Box
- JHTML::_ ( 'behavior.modal' );
- JHTML::_('behavior.tooltip');
- $document = JFactory::getDocument();
- $app = JFactory::getApplication('site');
- if( $app->get('jquery-ui') !== true && version_compare(vmVersion::$RELEASE, '2.0.6') > 0 ) {
- $document->addScript('https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js');
- JFactory::getApplication()->set('jquery-ui', true);
- }
- $template = $app->getTemplate(true);
- $params = $template->params;
- $template = $template->template;
- $document->addScriptDeclaration("
- jQuery(document).ready(function($) {
- $(function() {
- $('#yagVmFlyTabs').tabs();
- });
- var tabs = $('#yagVmFlyTabs').tabs();
- var tabSize = ( tabs.children().size() - 3 );
- $('a#ask-price-link').click(function() {
- tabs.tabs('select', tabSize);
- $('html, body').animate({
- scrollTop: $('#yagVmFlyTabs').offset().top
- }, 1000);
- return false;
- });
- });
- ");
- ?>
- <?php //::> Emergency break if product not found: ?>
- <?php if(empty($this->product)): ?>
- <?php echo JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND') . '<br /><br /> ' . $this->continue_link_html; ?>
- <?php return; ?>
- <?php endif; ?>
- <div id="yagVmOverWrap" class="productdetails-view">
- <div class="yagVmFlyTop">
- <div class="yagVmFlyTopLeft">
- <?php //::> Edit link ?>
- <?php if( $this->edit_link != "" ) : ?>
- <div class="yagVmFlyEditLink">
- <?php echo $this->edit_link; ?>
- </div>
- <div class="yagVmClear"> </div>
- <?php endif; ?>
- <?php //::> Product main image ?>
- <div class="yagVmFlyTopLeftMiddle">
- <div class="yagVmFlyProdImg">
- <?php if( !empty($this->product->images[0]) ) : ?>
- <div class="yagVmFlyProdImgMain" id="yagendoo_imageGallery_Box">
- <?php if( $params->get('imageZoomOnFlypage') === 1 ) : ?>
- <a class="modal" href="<?php echo $this->product->images[0]->file_url; ?>">
- <?php endif; ?>
- <img src="<?php echo $this->product->images[0]->file_url_thumb; ?>" />
- <?php if( $params->get('imageZoomOnFlypage') === 1 ) : ?>
- </a>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- </div>
- </div>
- <?php //::> Product image gallery ?>
- <?php if( !empty($this->product->images) && count($this->product->images) > 1 ) : ?>
- <div class="yagVmFlyTopLeftTop">
- <div class="yagVmFlyProdImgGalleryWrap">
- <div class="yagVmFlyProdImgGallery">
- <?php foreach( $this->product->images as $image ) : ?>
- <?php $url = $image->file_url; ?>
- <div class="yagVmFlyProdImgGalleryThumbBox">
- <div class="yagVmFlyProdImgGalleryThumbBoxInner">
- <?php if( $params->get('imageZoomOnFlypage') === 1 ) : ?>
- <a class="modal" title="<?php echo $this->product->product_name; ?>" href="<?php echo $url; ?>">
- <?php endif; ?>
- <?php echo $image->displayMediaFull('class="product-gallery-image"',false,"class='lightBox yagVmFlyGalleryImg'",true); ?>
- <?php if( $params->get('imageZoomOnFlypage') === 1 ) : ?>
- </a>
- <?php endif; ?>
- </div>
- </div>
- <?php endforeach ?>
- <div class="yagVmClear"> </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <?php if( !empty($this->product->product_availability) || $this->product->packaging || $this->product->box ): ?>
- <?php //::> Product details ?>
- <div class="yagVmFlyTopLeftBottom">
- <div class="yagVmFlyTopLeftBottomInner">
- <div class="yagVmFlyTopLeftBottomContent">
- <!-- Product Availability //-->
- <?php if( !empty($this->product->product_availability) ) : ?>
- <?php $stockhandle = VmConfig::get('stockhandle','none'); ?>
- <?php if($stockhandle=='risetime' && ($this->product->product_in_stock - $this->product->product_ordered) < 1): ?>
- <div class="yagVmFlyProdAvailability">
- <div class="yagVmFlyProdAvailabilityInner">
- <img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/yagImages/global/availability/'.VmConfig::get('rised_availability','7d.gif'); ?>" alt="" />
- </div>
- </div>
- <?php else: ?>
- <div class="yagVmFlyProdAvailability">
- <div class="yagVmFlyProdAvailabilityInner">
- <img src="<?php echo JURI::root().'templates/'.$template.'/html/com_virtuemart/assets/yagImages/global/availability/'.$this->product->product_availability; ?>" alt="" />
- </div>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- <!-- /Product Availability //-->
- <!-- Product Packaging -->
- <?php if($this->product->packaging || $this->product->box): ?>
- <div class="yagVmFlyProdPackaging">
- <?php echo YagendooTmplGlobal::getProductPackagingHtml($this->product); ?>
- </div>
- <?php endif; ?>
- <!-- /Product Packaging -->
- <div class="yagVmClear"> </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
- </div>
- <div class="yagVmFlyTopRight">
- <?php //::> Product info ?>
- <div class="yagVmFlyTopRightTop">
- <div class="yagVmFlyTitle">
- <h1><?php echo $this->product->product_name; ?></h1>
- </div>
- <?php //::> PDF/Print/Email icons ?>
- <?php if( VmConfig::get('show_emailfriend', 1) == '1' || VmConfig::get('show_printicon', 1) == '1' || VmConfig::get('pdf_button_enable', 1) ) : ?>
- <div class="yagVmFlyIcons">
- <?php
- $link = 'index.php?tmpl=component&option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->virtuemart_product_id;
- $MailLink = 'index.php?option=com_virtuemart&view=productdetails&task=recommend&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&virtuemart_category_id=' . $this->product->virtuemart_category_id . '&tmpl=component';
- if( VmConfig::get('pdf_icon', 1) == '1' ) :
- echo $this->linkIcon($link . '&format=pdf', 'COM_VIRTUEMART_PDF', 'pdf_button', 'pdf_button_enable', false);
- endif;
- if( VmConfig::get('show_printicon', 1) == '1' ) :
- echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'show_printicon');
- endif;
- if( VmConfig::get('show_emailfriend', 1) == '1' ) :
- echo $this->linkIcon($MailLink, 'COM_VIRTUEMART_EMAIL', 'emailButton', 'show_emailfriend');
- endif;
- ?>
- <div class="yagVmClear"> </div>
- </div>
- <?php endif; ?>
- <!-- Product Rating //-->
- <?php if($this->showRating): ?>
- <div class="yagVmFlyProdRatingBox">
- <?php echo YagendooTmplGlobal::getProductRatingHtml($this->rating); ?>
- </div>
- <?php endif; ?>
- <!-- /Product Rating //-->
- <div class="yagVmClear"> </div>
- <!-- Product Price -->
- <?php if( $this->show_prices ) : ?>
- <div class="yagVmFlyProdPriceBox" id="productPrice<?php echo $this->product->virtuemart_product_id ?>">
- <div class="yagVmFlyProdPriceBoxRedInner">
- <?php if( empty($this->product->prices) and VmConfig::get('askprice', 1) ) : ?>
- <?php if( VmConfig::get("ask_question", 1) ) : ?>
- <a id="ask-price-link">
- <?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?>
- </a>
- <?php else : ?>
- <?php
- $url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&virtuemart_category_id=' . $this->product->virtuemart_category_id . '&tmpl=component');
- $document->addScriptDeclaration("
- jQuery(document).ready(function($) {
- $('a.yagVmFlyAskPrice').click( function(){
- $.facebox({
- iframe: '" . $url . "',
- rev: 'iframe|550|550'
- });
- return false ;
- });
- });
- ");
- ?>
- <a class="yagVmFlyAskPrice" href="<?php echo $url ?>">
- <?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE'); ?>
- </a>
- <?php endif; ?>
- <?php endif; ?>
- <?php echo YagendooTmplGlobal::getProductPriceHtml($this->product, $this->currency,$this->showBasePrice); ?>
- </div>
- <?php if( $this->product->prices["discountAmount"] > 0 || $this->product->prices["basePriceWithTax"] > 0 ) : ?>
- <div class="yagVmFlyProdPriceBoxGreyInner">
- <?php echo YagendooTmplGlobal::getProductOldPriceHtml($this->product, $this->currency,$this->showBasePrice); ?>
- </div>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- <!-- /Product Price -->
- <!-- Shipping Cost Link -->
- <?php if( $params->get('showShippingCostHintOnFlypage') === 1 && trim( $params->get('shippingCostLink') ) != "" ) : ?>
- <div class="yagVmFlyShipCostLink">
- <a href="<?php echo $params->get('shippingCostLink'); ?>">
- <?php echo $params->get('shippingCostLabel'); ?>
- </a>
- </div>
- <?php endif; ?>
- <!-- /Shipping Cost Link -->
- <!-- Product Manufacturer -->
- <?php if( VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id) ) : ?>
- <div class="yagVmFlyProdManufacturer">
- <?php
- $link = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id='.$this->product->virtuemart_manufacturer_id.'&tmpl=component');
- $text = $this->product->mf_name;
- ?>
- <?php if(strtolower(JRequest::getWord('output')) == "pdf"): ?>
- <span class="yagVmFlyProdManufacturerLbl"><?php echo JHTML::_('link', $link, $text); ?></span>
- <?php else: ?>
- <span class="yagVmFlyProdManufacturerLbl"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL'); ?></span>
- <a class="modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $link ?>"><?php echo $text; ?></a>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- <!-- /Product Manufacturer -->
- <!-- Produkt SKU -->
- <?php if( $params->get('showSkuOnFlypage') === 1 ) : ?>
- <div class="yagVmFlyProdSku">
- <?php echo JText::_ ( 'COM_VIRTUEMART_CART_SKU' ).": ".$this->product->product_sku; ?>
- </div>
- <?php endif; ?>
- <!-- /Product SKU -->
- <?php //::> Short description ?>
- <?php if( !empty($this->product->product_s_desc) ) : ?>
- <div class="yagVmFlyProdSdesc">
- <?php echo $this->product->product_s_desc; ?>
- </div>
- <?php endif; ?>
- </div>
- <div class="yagVmFlyTopRightBottom">
- <!-- Add To Cart Button -->
- <?php if( !empty($this->product->prices) ) : ?>
- <div class="yagVmFlyProdAtcBox">
- <?php YagendooTmplGlobal::includeTemplate($this, 'addtocart'); ?>
- </div>
- <?php endif; ?>
- <!-- /Add To Cart Button -->
- </div>
- </div>
- <div class="yagVmClear"> </div>
- </div>
- <?php //::> Tabs ?>
- <?php if( !empty($this->product->product_desc) || ($this->allowRating || $this->showReview) || VmConfig::get('ask_question', 1) ) : ?>
- <div class="yagVmFlyTabsWrap">
- <div class="yagVmFlyTabsSpacer">
- <div class="yagVmFlyTabsInner">
- <div id="yagVmFlyTabs">
- <ul class="yagVmFlyTabsList">
- <?php //::> PRODUCT DESCRIPTION ?>
- <?php if( !empty($this->product->product_desc) ) : ?>
- <li><a href="#tabs-1"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE'); ?></a></li>
- <?php endif; ?>
- <?php //::> CUSTOMER REVIEWS ?>
- <?php if( $this->allowRating || $this->showReview ) : ?>
- <li><a href="#tabs-2"><?php echo JText::_('COM_VIRTUEMART_REVIEWS'); ?></a></li>
- <?php endif; ?>
- <?php //::> ASK A QUESTION / CONTACT ?>
- <?php if( VmConfig::get('ask_question', 1) ) : ?>
- <li><a href="#tabs-3"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASK_QUESTION'); ?></a></li>
- <?php endif; ?>
- <div class="yagVmClear"> </div>
- </ul>
- <div class="yagVmClear"> </div>
- <!-- Product Description -->
- <?php if(!empty($this->product->product_desc)): ?>
- <div id="tabs-1">
- <div class="yagVmFlyTabsSpacerInner">
- <div class="yagVmFlyProdDesc">
- <div class="yagVmFlyProdDescInner"><?php echo $this->product->product_desc; ?></div>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <!-- /Product Description -->
- <!-- Customer Reviews -->
- <?php if($this->allowRating || $this->showReview) : ?>
- <div id="tabs-2">
- <div class="yagVmFlyTabsSpacerInner">
- <div class="yagVmFlyProdReviewsBox">
- <?php YagendooTmplGlobal::includeTemplate($this, 'rating'); ?>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <!-- /Customer Reviews -->
- <!-- Contact form //-->
- <?php if( VmConfig::get('ask_question', 1) ) : ?>
- <div id="tabs-3">
- <div class="yagVmFlyTabsSpacerInner">
- <?php $src = JURI::base().'index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id.'&tmpl=component'; ?>
- <iframe class="yagVmFlyTabsIframe" src="<?php echo $src; ?>"></iframe>
- </div>
- </div>
- <?php endif; ?>
- </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <?php //::> Product navigation ?>
- <?php if( (VmConfig::get('product_navigation', 1 ) && !empty($this->product->neighbours ['previous'][0])) || (VmConfig::get('product_navigation', 1 ) && !empty($this->product->neighbours ['next'][0])) ) : ?>
- <div class="yagVmFlyNeighbours">
- <div class="yagVmFlyNeighboursInner">
- <div class="yagVmFlyNeighboursInnerSpacer">
- <?php if( !empty($this->product->neighbours ['previous'][0]) ) : ?>
- <div class="yagVmFlyPrevProd">
- <?php $prev_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours['previous'][0]['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id); ?>
- <?php echo JHTML::_('link', $prev_link, $this->product->neighbours['previous'][0]['product_name'], array ('class' => 'previous-page' ) ); ?>
- </div>
- <?php endif; ?>
- <?php if(!empty($this->product->neighbours ['next'][0])): ?>
- <div class="yagVmFlyNextProd">
- <?php $next_link = JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->product->neighbours['next'][0]['virtuemart_product_id'] . '&virtuemart_category_id=' . $this->product->virtuemart_category_id); ?>
- <?php echo JHTML::_('link', $next_link, $this->product->neighbours['next'][0]['product_name'], array('class' => 'next-page')); ?>
- </div>
- <?php endif; ?>
- <div class="yagVmClear"> </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <!-- Product Custom Fields -->
- <?php if( !empty($this->product->customfieldsSorted) ) : ?>
- <div class="yagVmFlyProdFields">
- <?php
- $custom_title = null;
- if( !empty($this->product->customfieldsSorted['onbot']) ) {
- $this->position = 'onbot';
- } elseif( !empty($this->product->customfieldsSorted['ontop']) ) {
- $this->position = 'ontop';
- } elseif( !empty($this->product->customfieldsSorted['normal']) ) {
- $this->position = 'normal';
- }
- ?>
- <?php foreach( $this->product->customfieldsSorted[$this->position] as $field ) : ?>
- <?php if( $field->is_hidden ) :
- continue;
- endif; ?>
- <?php if( $field->display ) : ?>
- <div class="yagVmFlyProdField yagVmFlyProdFieldType-<?php echo $field->field_type ?>">
- <div class="yagVmFlyProdFieldSpacer">
- <div class="yagVmFlyProdFieldInner">
- <?php if( $field->custom_title != $custom_title ) : ?>
- <span class="yagVmFlyProdFieldTitle"><?php echo JText::_($field->custom_title); ?></span>
- <?php endif; ?>
- <?php if( $field->custom_tip ) :
- echo JHTML::tooltip($field->custom_tip, JText::_($field->custom_title), 'tooltip.png');
- endif; ?>
- <span class="yagVmFlyProdFieldDesc"><?php echo jText::_($field->custom_field_desc) ?></span>
- <div class="yagVmClear"></div>
- <span class="yagVmFlyProdFieldDisplay"><?php echo $field->display ?></span>
- </div>
- </div>
- </div>
- <?php $custom_title = $field->custom_title; ?>
- <?php endif; ?>
- <?php endforeach; ?>
- </div>
- <?php endif; ?>
- <!-- /Product Custom Fields -->
- <!-- Related Products -->
- <?php if( !empty($this->product->customfieldsRelatedProducts) ) : ?>
- <div class="yagVmFlyProdRelatedProdBox">
- <h4 class="yagVmFlyProdRelatedProdTitle"><?php echo JText::_('COM_VIRTUEMART_RELATED_PRODUCTS'); ?></h4>
- <div class="yagVmFlyProdRelatedRow">
- <?php foreach ($this->product->customfieldsRelatedProducts as $field): ?>
- <div class="yagVmFlyProdField yagVmFlyProdFieldType-<?php echo $field->field_type; ?>">
- <div class="yagVmFlyProdFieldSpacer">
- <div class="yagVmFlyProdFieldInner">
- <span class="yagVmFlyProdFieldDisplay"><?php echo $field->display; ?></span>
- </div>
- </div>
- <span class="yagVmFlyProdFieldDesc"><?php echo JText::_($field->custom_field_desc); ?></span>
- </div>
- <?php endforeach; ?>
- <div class="yagVmClear"> </div>
- </div>
- </div>
- <?php endif; ?>
- <!-- /Related Products -->
- <!-- Related Categories -->
- <?php if(! empty($this->product->customfieldsRelatedCategories) ) : ?>
- <div class="yagVmFlyProdRelatedCatBox">
- <h4 class="yagVmFlyProdRelatedCatTitle"><?php echo JText::_('COM_VIRTUEMART_RELATED_CATEGORIES'); ?></h4>
- <?php foreach ($this->product->customfieldsRelatedCategories as $field): ?>
- <div class="yagVmFlyProdField yagVmFlyProdFieldType-<?php echo $field->field_type; ?>">
- <div class="yagVmFlyProdFieldSpacer">
- <div class="yagVmFlyProdFieldInner">
- <span class="yagVmFlyProdFieldDisplay"><?php echo $field->display; ?></span>
- <span class="yagVmFlyProdFieldDesc"><?php echo JText::_($field->custom_field_desc); ?></span>
- </div>
- </div>
- </div>
- <?php endforeach; ?>
- <div class="yagVmClear"></div>
- </div>
- <?php endif; ?>
- <!-- /Related Categories -->
- <!-- Child Categories -->
- <?php if( VmConfig::get('showCategory', 1) && $this->category->haschildren && !empty($this->category->children) ) : ?>
- <h4 class="yagVmFlyChildCatsTitle"><?php echo JText::_('COM_VIRTUEMART_CATEGORIES'); ?></h2>
- <div class="yagVmFlyProdChildsBox">
- <?php YagendooTmplGlobal::includeTemplate($this, 'childcategories'); ?>
- </div>
- <?php endif; ?>
- <!-- /Child Categories -->
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement