AAAAPK AC\"jp tmpl/mail_raw_question.phpnu W+A vendor->vendor_store_name) . "\n" . "\n";
echo JText::_('COM_VIRTUEMART_QUESTION_ABOUT') . ' '. $this->product->product_name;
if ($this->product->product_sku) echo ' ('.JText::_('COM_VIRTUEMART_PRODUCT_SKU').' '.$this->product->product_sku .')' ;
echo "\n" . "\n";
echo JText::sprintf('COM_VIRTUEMART_QUESTION_MAIL_FROM', $this->user->name, $this->user->email) . "\n";
echo $this->comment. "\n";
PK AC\) tmpl/.htaccessnu W+A
Order allow,deny
Deny from all
PK AC\*
tmpl/form.phpnu W+A addScriptDeclaration('
jQuery(function($){
$("#askform").validationEngine("attach");
$("#comment").keyup( function () {
var result = $(this).val();
$("#counter").val( result.length );
});
});
');
/* 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();
$askQuestionData = $session->get('askquestion', 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="product-image"',false); ?>
PK AC\ tmpl/index.htmlnu W+A PK AC\s=
tmpl/mail_html_question.phpnu W+A
|
|
user['name'], $this->user['email']); ?>
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_sku) echo ' ('.JText::_('COM_VIRTUEMART_PRODUCT_SKU').' '.$this->product->product_sku .')' ; ?>
product->product_s_desc ?>
Product details
|
|
|
PK AC\GO O tmpl/mail_confirmed.phpnu W+A
PK AC\) .htaccessnu W+A
Order allow,deny
Deny from all
PK AC\ metadata.xmlnu W+A
PK AC\i
view.html.phpnu W+A redirect(JRoute::_('index.php?option=com_virtuemart','Disabled function'));
}
$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'));
}
}
$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 ();
$mainframe = JFactory::getApplication ();
$pathway = $mainframe->getPathway ();
$task = JRequest::getCmd ('task');
if (!class_exists('VmImage'))
require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php');
// Load the product
$product_model = VmModel::getModel ('product');
$category_model = VmModel::getModel ('Category');
$virtuemart_product_idArray = JRequest::getInt ('virtuemart_product_id', 0);
if (is_array ($virtuemart_product_idArray)) {
$virtuemart_product_id = $virtuemart_product_idArray[0];
} else {
$virtuemart_product_id = $virtuemart_product_idArray;
}
if (empty($virtuemart_product_id)) {
self::showLastCategory ($tpl);
return;
}
if (!class_exists ('VirtueMartModelVendor')) {
require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'vendor.php');
}
$product = $product_model->getProduct ($virtuemart_product_id);
// Set Canonic link
$format = JRequest::getWord('format', 'html');
if ($format == 'html') {
$document->addHeadLink ($product->canonical, 'canonical', 'rel', '');
}
// Set the titles
$document->setTitle (JText::sprintf ('COM_VIRTUEMART_PRODUCT_DETAILS_TITLE', $product->product_name . ' - ' . JText::_ ('COM_VIRTUEMART_PRODUCT_ASK_QUESTION')));
$this->assignRef ('product', $product);
if (empty($product)) {
self::showLastCategory ($tpl);
return;
}
$product_model->addImages ($product, 1);
/* Get the category ID */
$virtuemart_category_id = JRequest::getInt ('virtuemart_category_id');
if ($virtuemart_category_id == 0 && !empty($product)) {
if (array_key_exists ('0', $product->categories)) {
$virtuemart_category_id = $product->categories[0];
}
}
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 ($product->product_name, JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $virtuemart_category_id . '&virtuemart_product_id=' . $product->virtuemart_product_id, FALSE));
// for askquestion
$pathway->addItem (JText::_ ('COM_VIRTUEMART_PRODUCT_ASK_QUESTION'));
$this->assignRef ('user', JFactory::getUser ());
if ($product->metadesc) {
$document->setDescription ($product->metadesc);
}
if ($product->metakey) {
$document->setMetaData ('keywords', $product->metakey);
}
//We never want that ask a question is indexed
$document->setMetaData('robots','NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');
if ($mainframe->getCfg ('MetaTitle') == '1') {
$document->setMetaData ('title', $product->product_s_desc); //Maybe better product_name
}
if ($mainframe->getCfg ('MetaAuthor') == '1') {
$document->setMetaData ('author', $product->metaauthor);
}
parent::display ($tpl);
}
function renderMailLayout () {
$this->setLayout ('mail_html_question');
$this->comment = JRequest::getString ('comment');
$user = JFactory::getUser ();
if (empty($user->id)) {
$fromMail = JRequest::getVar ('email'); //is sanitized then
$fromName = JRequest::getVar ('name', ''); //is sanitized then
$fromMail = str_replace (array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromMail);
$fromName = str_replace (array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromName);
} else {
$fromMail = $user->email;
$fromName = $user->name;
}
$vars['user'] = array('name' => $fromName, 'email' => $fromMail);
$vendorModel = VmModel::getModel ('vendor');
if(empty($this->vendor)){
$this->vendor = $vendorModel->getVendor ();
$this->vendor->vendor_store_name = $fromName;
}
$vendorModel->addImages ($this->vendor);
$virtuemart_product_id = vRequest::getInt ('virtuemart_product_id', 0);
$productModel = VmModel::getModel ('product');
if(empty($this->product)){
$this->product = $productModel->getProduct ($virtuemart_product_id);
}
$productModel->addImages($this->product);
$this->subject = Jtext::_ ('COM_VIRTUEMART_QUESTION_ABOUT') . $this->product->product_name;
$this->vendorEmail = $this->user['email'];
// in this particular case, overwrite the value for fix the recipient name
$this->vendor->vendor_name = $this->user['name'];
if (VmConfig::get ('order_mail_html')) {
$tpl = 'mail_html_question';
} else {
$tpl = 'mail_raw_question';
}
$this->setLayout ($tpl);
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 AC\
index.htmlnu W+A PK AC\"jp tmpl/mail_raw_question.phpnu W+A PK AC\) 9 tmpl/.htaccessnu W+A PK AC\*
tmpl/form.phpnu W+A PK AC\ K tmpl/index.htmlnu W+A PK AC\s=
tmpl/mail_html_question.phpnu W+A PK AC\GO O \&