| Current Path : /proc/1908984/root/proc/self/root/proc/self/root/proc/2411250/root/tmp/ |
| Current File : //proc/1908984/root/proc/self/root/proc/self/root/proc/2411250/root/tmp/phpAPK5qE |
<?php
/**
*TODO Improve the CSS , ADD CATCHA ?
* Show the form Ask a Question
*
* @package VirtueMart
* @subpackage
* @author Kohl Patrick, Maik K�nnemann
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2014 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: default.php 2810 2011-03-02 19:08:24Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined ( '_JEXEC' ) or die ( 'Restricted access' );
$min = VmConfig::get('asks_minimum_comment_length', 50);
$max = VmConfig::get('asks_maximum_comment_length', 2000);
vmJsApi::JvalideForm();
vmJsApi::addJScript('askform','
jQuery(function($){
$("#askform").validationEngine("attach");
var counterResult = $("#comment").val().length;
$("#counter").val( counterResult );
$("#comment").keyup( function () {
var result = $(this).val();
$("#counter").val( result.length );
});
});
');
$vendorModel = VmModel::getModel ('vendor');
$this->vendor = $vendorModel->getVendor ($this->product->virtuemart_vendor_id);
$ask_comment="";
/* Let's see if we found the product */
if (empty ( $this->product )) {
echo vmText::_ ( 'COM_VIRTUEMART_PRODUCT_NOT_FOUND' );
echo '<br /><br /> ' . $this->continue_link_html;
} else {
$session = JFactory::getSession();
$sessData = $session->get('mailrecommend', 0, 'vm');
if(!empty($this->login)){
echo $this->login;
?>
<button id="close-iframe" class="btn btn-default btn-sm pull-right" type="button"><span class="glyphicon glyphicon-remove"></span> <?php echo vmText::_('COM_VIRTUEMART_CLOSE'); ?></button>
<?php }
if(empty($this->login) or VmConfig::get('recommend_unauth',false)){
?>
<div class="ask-a-question-view">
<h2><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_RECOMMEND'); ?> <button id="close-iframe" class="btn btn-default btn-sm pull-right" type="button"><span class="glyphicon glyphicon-remove"></span> <?php echo vmText::_('COM_VIRTUEMART_CLOSE'); ?></button></h2>
<div class="form-field">
<form method="post" class="form-validate" action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id.'&tmpl=component', FALSE) ; ?>" name="askform" id="askform" >
<div class="askform">
<div class="form-group">
<label for="name"><?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_NAME') ?> : </label>
<input type="text" value="<?php echo $this->user->name ? $this->user->name : $sessData['name'] ?>" name="name" id="name" size="30" class="validate[required,minSize[3],maxSize[64]] form-control"/>
</div>
<div class="form-group">
<label for="email"><?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_EMAIL') ?> : </label>
<input type="text" value="<?php echo $sessData['email'] ?>" name="email" id="email" size="30" class="validate[required,custom[email]] form-control"/>
</div>
<div class="form-group">
<label for="comment"><?php echo vmText::sprintf('COM_VIRTUEMART_COMMENT', $min, $max); ?></label>
<textarea title="<?php echo $ask_comment ?>" class="validate[required,minSize[<?php echo $min ?>],maxSize[<?php echo $max ?>]] field form-control" id="comment" name="comment" rows="8" placeholder="<?php echo $sessData['comment'] ? $sessData['comment'] : vmText::sprintf('COM_VIRTUEMART_RECOMMEND_COMMENT', $this->vendor->vendor_store_name) ?>"></textarea>
</div>
<?php // captcha addition
echo $this->captcha;
?>
<div class="form-group row">
<div class="col-xs-5">
<input class="highlight-button btn btn-primary margin-top-15" type="submit" name="submit_ask" title="<?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_SUBMIT') ?>" value="<?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_SUBMIT') ?>" />
</div>
<div class="col-xs-7 text-right">
<label>
<?php echo vmText::_('COM_VIRTUEMART_ASK_COUNT') ?>
<input type="text" value="0" size="4" class="counter form-control" id="counter" name="counter" maxlength="4" readonly="readonly" />
</label>
</div>
</div>
</div>
<input type="hidden" name="virtuemart_product_id" value="<?php echo vRequest::getInt('virtuemart_product_id',0); ?>" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="view" value="productdetails" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="virtuemart_category_id" value="<?php echo vRequest::getInt('virtuemart_category_id'); ?>" />
<input type="hidden" name="task" value="mailRecommend" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
</div>
</div>
<?php
}
} ?>
<script>
// Set height of iframe
jQuery(window).load(function(){
<?php if(VmConfig::get ('ask_captcha')){ ?>
var height = 680;
<?php } else { ?>
var height = 550;
<?php } ?>
jQuery('#form-collapse iframe', parent.document).css('min-height', height);
jQuery('#form-collapse div.vm-preloader', parent.document).addClass('hide');
});
// Close the iframe
jQuery('#close-iframe').click(function(){
jQuery('#form-collapse', parent.document).collapse('toggle');
});
// Remove collapse form login, hide the toggle button
jQuery('#vm-login').removeClass('collapse').addClass('iframe-login').find('form').removeClass('form-inline');
jQuery('button.vm-login').hide();
</script><?php
/**
*
* Show the product details page
*
* @package VirtueMart
* @subpackage
* @author KOHL Patrick
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: default.php 2810 2011-03-02 19:08:24Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined ( '_JEXEC' ) or die ( 'Restricted access' );
/* thank you for the Recommend mail */
if(VmConfig::get('usefancy',1)){
$onclick = 'parent.jQuery.fancybox.close();';
} else {
$onclick = 'parent.jQuery.facebox.close();';
}
?>
<div class="productdetails-view">
<?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_THANK_YOU'); ?>
<button class="btn btn-primary" type="button" onclick="<?php echo $onclick ?>"><span class="glyphicon glyphicon-remove"></span> <?php echo vmText::_('COM_VIRTUEMART_CLOSE'); ?></button>
</div>
<script>
jQuery('button').click(function(){
jQuery('#form-collapse', parent.document).collapse('toggle');
});
</script>
<?php
/**
* Show the form Ask a Question
*
* @package VirtueMart
* @subpackage
* @author Kohl Patrick, Maik K�nnemann
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2014 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: default.php 2810 2011-03-02 19:08:24Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined ( '_JEXEC' ) or die ( 'Restricted access' );
$min = VmConfig::get('asks_minimum_comment_length', 50);
$max = VmConfig::get('asks_maximum_comment_length', 2000);
vmJsApi::JvalideForm();
vmJsApi::addJScript('askform','
jQuery(function($){
$("#askform").validationEngine("attach");
var counterResult = $("#comment").val().length;
$("#counter").val( counterResult );
$("#comment").keyup( function () {
var result = $(this).val();
$("#counter").val( result.length );
});
});
');
$vendorModel = VmModel::getModel ('vendor');
$this->vendor = $vendorModel->getVendor ($this->product->virtuemart_vendor_id);
$ask_comment="";
/* Let's see if we found the product */
if (empty ( $this->product )) {
echo vmText::_ ( 'COM_VIRTUEMART_PRODUCT_NOT_FOUND' );
echo '<br /><br /> ' . $this->continue_link_html;
} else {
$session = JFactory::getSession();
$sessData = $session->get('mailrecommend', 0, 'vm');
if(!empty($this->login)){
echo $this->login;
}
if(empty($this->login) or VmConfig::get('recommend_unauth',false)){
?>
<div class="ask-a-question-view">
<h1><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_RECOMMEND') ?></h1>
<div class="product-summary">
<div class="width70 floatleft">
<h2><?php echo $this->product->product_name ?></h2>
<?php // Product Short Description
if (!empty($this->product->product_s_desc)) { ?>
<div class="short-description">
<?php echo $this->product->product_s_desc ?>
</div>
<?php } // Product Short Description END ?>
</div>
<div class="width30 floatleft center">
<?php // Product Image
echo $this->product->images[0]->displayMediaThumb('class="product-image"',false); ?>
</div>
<div class="clear"></div>
</div>
<div class="form-field">
<form method="post" class="form-validate" action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id.'&tmpl=component', FALSE) ; ?>" name="askform" id="askform" >
<table class="askform">
<tr>
<td><label for="name"><?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_NAME') ?> : </label></td>
<td><input type="text" value="<?php echo $this->user->name ? $this->user->name : $sessData['name'] ?>" name="name" id="name" size="30" class="validate[required,minSize[3],maxSize[64]]"/></td>
</tr>
<tr>
<td><label for="email"><?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_EMAIL') ?> : </label></td>
<td><input type="text" value="<?php echo $sessData['email'] ?>" name="email" id="email" size="30" class="validate[required,custom[email]]"/></td>
</tr>
<tr>
<td colspan="2"><label for="comment"><?php echo vmText::sprintf('COM_VIRTUEMART_COMMENT', $min, $max); ?></label></td>
</tr>
<tr>
<td colspan="2"><textarea title="<?php echo $ask_comment ?>" class="validate[required,minSize[<?php echo $min ?>],maxSize[<?php echo $max ?>]] field" id="comment" name="comment" rows="8"><?php echo $sessData['comment'] ? $sessData['comment'] : vmText::sprintf('COM_VIRTUEMART_RECOMMEND_COMMENT', $this->vendor->vendor_store_name) ?></textarea></td>
</tr>
</table>
<div class="submit">
<?php // captcha addition
echo $this->captcha;
// end of captcha addition
?>
<div>
<div class="floatleft width50 ">
<input class="highlight-button" type="submit" name="submit_ask" title="<?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_SUBMIT') ?>" value="<?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_SUBMIT') ?>" />
</div>
<div class="floatleft width50 text-right">
<label for="counter"><?php echo vmText::_('COM_VIRTUEMART_ASK_COUNT') ?></label>
<input type="text" value="0" size="4" class="counter" id="counter" name="counter" maxlength="4" readonly="readonly" />
</div>
</div>
</div>
<input type="hidden" name="virtuemart_product_id" value="<?php echo vRequest::getInt('virtuemart_product_id',0); ?>" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="view" value="productdetails" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="virtuemart_category_id" value="<?php echo vRequest::getInt('virtuemart_category_id'); ?>" />
<input type="hidden" name="task" value="mailRecommend" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
</div>
</div>
<?php }
}?>
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_VIRTUEMART_RECOMMEND_MENU" hidden="true">
<message><![CDATA[COM_VIRTUEMART_RECOMMEND_MENU_DESC]]></message>
</layout>
</metadata>
<?php
/**
*
* Show the product details page
*
* @package VirtueMart
* @subpackage
* @author KOHL Patrick
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: default.php 2810 2011-03-02 19:08:24Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined ( '_JEXEC' ) or die ( 'Restricted access' );
/* thank you for the Recommend mail */
if(VmConfig::get('usefancy',1)){
$onclick = 'parent.jQuery.fancybox.close();';
} else {
$onclick = 'parent.jQuery.facebox.close();';
}
?>
<div class="productdetails-view">
<?php echo vmText::_('COM_VIRTUEMART_RECOMMEND_THANK_YOU'); ?>
<button onclick="<?php echo $onclick ?>" type="button"><?php echo vmText::_('COM_VIRTUEMART_CLOSE'); ?></button>
</div>
<?php
defined('_JEXEC') or die('');
/**
* Renders the email for recommend to a friend
* @package VirtueMart
* @subpackage product details
* @author Maik Künnemann
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2014 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id$
*/
?>
<html>
<head>
<style type="text/css">
body, td, span, p, th { font-size: 12px; font-family: arial, helvetica, sans-serif; }
table, tr, td { border: 0; background:#fff;}
table.html-email {margin:10px auto;background:#fff; #dad8d8 1px;}
h2 { font-size: 1.6em; font-weight: normal; margin: 0px; padding: 0px; }
img {border: none;}
a {text-decoration: none; color: #000;}
a.product-details, a.product-details:visited {
border: solid #CAC9C9 1px;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
color: #555;
text-decoration: none;
padding: 3px 8px 2px 8px;
}
a.product-details:hover {color:#888;background: #f8f8f8;};
</style>
</head>
<body style="background: #F2F2F2;word-wrap: break-word;">
<div width="100%">
<table style="margin: auto; width: 600px; border: solid #dad8d8 1px" cellpadding="0" cellspacing="0" >
<tr>
<td valign="top" align="center" style="padding: 15px 25px;">
<img src="<?php echo JURI::root () . $this->vendor->images[0]->file_url ?>" />
<table border="0" cellpadding="0" cellspacing="0" class="html-email" width="100%">
<tr>
<td align="center" style="border-bottom : 1px solid #dad8d8;">
<span style="font-size: 14px; font-weight: bold"><?php echo vmText::sprintf ('COM_VIRTUEMART_RECOMMEND_MAIL_BODY', $this->name, $this->product->product_name); ?></span>
<br /><br /><?php echo $this->comment; ?><br /><br />
</td>
</tr>
<tr>
<td align="center" style="border-bottom : 1px solid #dad8d8; padding: 15px;">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<?php
$menuItemID = shopFunctionsF::getMenuItemId(vmLanguage::getLanguage()->getTag());
$product_link = JURI::root().'index.php?option=com_virtuemart&view=productdetails
&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&Itemid=' . $menuItemID;
?>
<td width="30%" align="center">
<a href="<?php echo $product_link ?>">
<?php echo $this->product->images[0]->displayMediaThumb('',false,'',true,false,true); ?>
</a>
</td>
<td width="70%" valign="top">
<h2><?php echo $this->product->product_name ?></h2>
<p style="margin: 15px 0; display:block;"><?php echo $this->product->product_s_desc ?></p>
<a href="<?php echo $product_link ?>" class="product-details"><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS') ?></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php echo $this->vendorAddress; ?>
</td>
</tr>
</table>
</div>
</body>
</html>
<?php
defined('_JEXEC') or die('');
/**
* Renders the email for recommend to a friend
* @package VirtueMart
* @subpackage product details
* @author Valérie Isaksen
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2012 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id$
*/
echo $this->vendorAddress;
echo "\n";
echo "\n";
echo vmText::sprintf ('COM_VIRTUEMART_MAIL_SHOPPER_NAME', $this->user->name);
echo "\n";
echo "\n";
echo vmText::sprintf('COM_VIRTUEMART_RECOMMEND_MAIL_MSG', $this->product->product_name, $this->comment);
echo "\n";
$link = JURI::root().'index.php?option=com_virtuemart';
echo "\n\n";
$link= JHTML::_('link', $link, $this->vendor->vendor_name) ;
/* GENERAL FOOTER FOR ALL MAILS */
echo vmText::_('COM_VIRTUEMART_MAIL_FOOTER' ) . $link;
echo "\n";
echo $this->vendor->vendor_name ."\n".$this->vendor->vendor_phone .' '.$this->vendor->vendor_store_name ."\n".strip_tags($this->vendor->vendor_store_desc)."\n".str_replace('<br />',"\n",$this->vendor->vendor_legal_info);
echo vmText::sprintf('COM_VIRTUEMART_RECOMMEND_MAIL_MSG', $this->product->product_name, $this->comment);
$link = JURI::root().'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->product->virtuemart_product_id ;
echo '<br /><b>'.JHTML::_('link',$link, $this->product->product_name).'</b>';
include(VMPATH_SITE .'/views/cart/tmpl/mail_html_footer.php');
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view title="COM_VIRTUEMART_RECOMMEND_VIEW" hidden="true">
<message><![CDATA[COM_VIRTUEMART_RECOMMEND_VIEW_DESC]]></message>
</view>
</metadata>
<?php
/**
*
* Product details view
*
* @package VirtueMart
* @subpackage
* @author RolandD
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: view.html.php 2796 2011-03-01 11:29:16Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
/**
* Product details
*
* @package VirtueMart
* @author Max Milbers
*/
class virtuemartViewrecommend extends VmView {
/**
* Collect all data to show on the template
*
* @author Max Milbers
*/
function display($tpl = null) {
$app = JFactory::getApplication();
if(!VmConfig::get('show_emailfriend',false)){
$app->redirect(JRoute::_('index.php?option=com_virtuemart'));
}
$this->login = '';
if(!VmConfig::get('recommend_unauth',false)){
$user = JFactory::getUser();
if($user->guest){
$this->login = shopFunctionsF::getLoginForm(false);
//$app->redirect(JRoute::_('index.php?option=com_virtuemart','JGLOBAL_YOU_MUST_LOGIN_FIRST'));
}
}
// Load the product
$productModel = VmModel::getModel('product');
$virtuemart_product_id = vRequest::getInt('virtuemart_product_id',0);
$this->product = $productModel->getProduct ($virtuemart_product_id);
$layout = $this->getLayout();
if($layout != 'form' and $layout != 'mail_confirmed'){
$this->renderMailLayout('','');
return true;
}
$this->show_prices = VmConfig::get('show_prices',1);
$document = JFactory::getDocument();
$document->setMetaData('robots','NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');
/* add javascript for price and cart */
//vmJsApi::jPrice();
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
$task = vRequest::getCmd('task');
if(empty($virtuemart_product_id)){
self::showLastCategory($tpl);
return;
}
//$product = $productModel->getProduct($virtuemart_product_id);
/* Set Canonic link */
$format = vRequest::getCmd('format', 'html');
if ($format == 'html') {
$document->addHeadLink( JUri::getInstance()->toString(array('scheme', 'host', 'port')).JRoute::_($this->product->link) , 'canonical', 'rel', '' );
}
/* Set the titles */
$document->setTitle(vmText::sprintf('COM_VIRTUEMART_PRODUCT_DETAILS_TITLE',$this->product->product_name.' - '.vmText::_('COM_VIRTUEMART_PRODUCT_RECOMMEND')));
if(empty($this->product)){
self::showLastCategory($tpl);
return;
}
$productModel->addImages($this->product,1);
/* Load the category */
$category_model = VmModel::getModel('category');
/* Get the category ID */
$virtuemart_category_id = vRequest::getInt('virtuemart_category_id');
if ($virtuemart_category_id == 0 && !empty($this->product)) {
if (array_key_exists('0', $this->product->categories)) $virtuemart_category_id = $this->product->categories[0];
}
shopFunctionsF::setLastVisitedCategoryId($virtuemart_category_id);
if($category_model){
$category = $category_model->getCategory($virtuemart_category_id);
$this->assignRef('category', $category);
$pathway->addItem(vmText::_($category->category_name),JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$virtuemart_category_id, FALSE));
}
//$pathway->addItem(vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS'), $uri->toString(array('path', 'query', 'fragment')));
$pathway->addItem($this->product->product_name,JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id='.$virtuemart_category_id.'&virtuemart_product_id='.$this->product->virtuemart_product_id, FALSE));
// for askquestion
$pathway->addItem( vmText::_('COM_VIRTUEMART_PRODUCT_ASK_QUESTION'));
/* Check for editing access */
/** @todo build edit page */
/* Load the user details */
$this->user = JFactory::getUser();
if ($this->product->metadesc) {
$document->setDescription( $this->product->metadesc );
}
if ($this->product->metakey) {
$document->setMetaData('keywords', $this->product->metakey);
}
if ($mainframe->getCfg('MetaTitle') == '1') {
$document->setMetaData('title', $this->product->product_s_desc); //Maybe better product_name
}
if ($mainframe->getCfg('MetaAuthor') == '1') {
$document->setMetaData('author', $this->product->metaauthor);
}
$this->captcha = shopFunctionsF::renderCaptcha('ask_captcha');
parent::display($tpl);
}
function renderMailLayout($doVendor, $recipient) {
$this->comment = nl2br(vRequest::getString('comment'));
$this->name = vRequest::getString('name');
if (VmConfig::get ('order_mail_html')) {
$tpl = 'mail_html';
} else {
$tpl = 'mail_raw';
}
$this->setLayout ($tpl);
// Load the product
$productModel = VmModel::getModel('product');
$virtuemart_product_id = vRequest::getInt('virtuemart_product_id',0);
$this->product = $productModel->getProduct ($virtuemart_product_id);
$productModel->addImages($this->product);
$layout = $this->getLayout();
//if($layout != 'form' and $layout != 'mail_confirmed'){
$user = JFactory::getUser ();
$vars['user'] = array('name' => $user->name, 'email' => $user->email);
$vars['vendorEmail'] = $user->email;
$vendorModel = VmModel::getModel ('vendor');
$this->vendor = $vendorModel->getVendor ($this->product->virtuemart_vendor_id);
$vendorModel->addImages ($this->vendor);
$this->vendor->vendorFields = $vendorModel->getVendorAddressFields();
$vars['vendorAddress']= shopFunctionsF::renderVendorAddress($this->product->virtuemart_vendor_id, ' - ');
$this->vendor->vendor_name =$user->name;
foreach( $vars as $key => $val ) {
$this->{$key} = $val;
}
$this->subject = vmText::sprintf('COM_VIRTUEMART_RECOMMEND_PRODUCT',$this->name, $this->product->product_name);
$this->isMail = true;
parent::display();
}
public function showLastCategory($tpl) {
$this->prepareContinueLink();
parent::display ($tpl);
}
}
// pure php no closing tag