AAAAPK v;C\Q
view.html.phpnu W+A 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'){
return $this->renderMailLayout('','');
}
$show_prices = VmConfig::get('show_prices',1);
if($show_prices == '1'){
if(!class_exists('calculationHelper')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'calculationh.php');
}
$this->assignRef('show_prices', $show_prices);
$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 = JRequest::getCmd('task');
if (!class_exists('VmImage'))
require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php');
if(empty($virtuemart_product_id)){
self::showLastCategory($tpl);
return;
}
//$product = $productModel->getProduct($virtuemart_product_id);
/* Set Canonic link */
$format = JRequest::getWord('format', 'html');
if ($format == 'html') {
$document->addHeadLink( $this->product->link , 'canonical', 'rel', '' );
}
/* Set the titles */
$document->setTitle(JText::sprintf('COM_VIRTUEMART_PRODUCT_DETAILS_TITLE',$this->product->product_name.' - '.JText::_('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 = JRequest::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];
}
if(!class_exists('shopFunctionsF'))require(JPATH_VM_SITE.DS.'helpers'.DS.'shopfunctionsf.php');
shopFunctionsF::setLastVisitedCategoryId($virtuemart_category_id);
if($category_model){
$category = $category_model->getCategory($virtuemart_category_id);
$this->assignRef('category', $category);
$pathway->addItem($category->category_name,JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$virtuemart_category_id, FALSE));
}
//$pathway->addItem(JText::_('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( JText::_('COM_VIRTUEMART_PRODUCT_ASK_QUESTION'));
/* Check for editing access */
/** @todo build edit page */
/* Load the user details */
$this->assignRef('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);
}
parent::display($tpl);
}
function renderMailLayout($doVendor, $recipient) {
$this->comment = nl2br(JRequest::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']= shopFunctions::renderVendorAddress($this->product->virtuemart_vendor_id, ' - ');
$this->vendor->vendor_name =$user->name;
foreach( $vars as $key => $val ) {
$this->$key = $val;
}
$this->subject = JText::sprintf('COM_VIRTUEMART_RECOMMEND_PRODUCT',$this->name, $this->product->product_name);
parent::display();
}
private function showLastCategory($tpl) {
$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId();
$categoryLink='';
if($virtuemart_category_id){
$categoryLink='&virtuemart_category_id='.$virtuemart_category_id;
}
$continue_link = JRoute::_('index.php?option=com_virtuemart&view=category'.$categoryLink, FALSE);
$continue_link_html = ''.JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING').'';
$this->assignRef('continue_link_html', $continue_link_html);
// Display it all
parent::display($tpl);
}
}
// pure php no closing tagPK v;C\J metadata.xmlnu W+A
PK v;C\
index.htmlnu W+A PK v;C\) tmpl/.htaccessnu W+A
Order allow,deny
Deny from all
PK v;C\ tmpl/index.htmlnu W+A PK v;C\_
tmpl/form.phpnu W+A addScriptDeclaration('
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);
/* Let's see if we found the product */
if (empty ( $this->product )) {
echo JText::_ ( 'COM_VIRTUEMART_PRODUCT_NOT_FOUND' );
echo '
' . $this->continue_link_html;
} else {
$session = JFactory::getSession();
$mailRecommendData = $session->get('mailrecommend', 0, 'vm');
if(!empty($this->login)){
echo $this->login;
}
if(empty($this->login) or VmConfig::get('recommend_unauth',false)){
?>
product->product_name ?>
product->product_s_desc)) { ?>
product->product_s_desc ?>
product->images[0]->displayMediaThumb('class="modal product-image"',false); ?>
PK v;C\%n
tmpl/form.xmlnu W+A
PK v;C\j_t t tmpl/mail_confirmed.phpnu W+A
PK v;C\A7
7
tmpl/mail_html.phpnu W+A
|
|
name, $this->product->product_name); ?>
comment; ?>
|
getTag());
$product_link = JURI::root().'index.php?option=com_virtuemart&view=productdetails
&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&Itemid=' . $menuItemID;
?>
|
product->product_name ?>
product->product_s_desc ?>
Product details
|
|
vendorAddress; ?>
|
PK v;C\T@) ) tmpl/mail_raw.phpnu W+A vendorAddress;
echo "\n";
echo "\n";
echo JText::sprintf ('COM_VIRTUEMART_MAIL_SHOPPER_NAME', $this->user->name);
echo "\n";
echo "\n";
echo JText::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 JText::_('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('
',"\n",$this->vendor->vendor_legal_info);
echo JText::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 '
'.JHTML::_('link',$link, $this->product->product_name).'';
include(JPATH_VM_SITE.DS.'views'.DS.'cart'.DS.'tmpl'.DS.'mail_html_footer.php');
PK v;C\) .htaccessnu W+A
Order allow,deny
Deny from all
PK v;C\Q
view.html.phpnu W+A PK v;C\J metadata.xmlnu W+A PK v;C\
index.htmlnu W+A PK v;C\)
tmpl/.htaccessnu W+A PK v;C\ tmpl/index.htmlnu W+A PK v;C\_
tmpl/form.phpnu W+A PK v;C\%n
^5 tmpl/form.xmlnu W+A PK v;C\j_t t e6 tmpl/mail_confirmed.phpnu W+A PK v;C\A7
7
; tmpl/mail_html.phpnu W+A PK v;C\T@) ) H tmpl/mail_raw.phpnu W+A PK v;C\) P .htaccessnu W+A PK ] P