News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Virtuemart send invoice by email but lose a session variable.

Started by ffredt, October 02, 2017, 11:30:38 AM

Previous topic - Next topic

ffredt

Hi people,

Virtuemart send order by email but lose a session variable.

I added a session variable in category, Product, cart and confirmation email.

For example I added in/templates/uniquashop/html/com_virtuemart/category/default.php this code:


$getCompID = JRequest::getVar('my_var');
$session = JFactory::getSession();
$session->set('comID', $getCompID);
if (isset($getCompID)){
echo JText::_ ('VM_MYTEXT_1').' '.$session->get('comID').' '.JText::_ ('VM_MYTEXT_2');
}

I added this

$session = JFactory::getSession();
if (isset($session)){
echo JText::_ ('VM_MYTEXT_1').' '.$session->get('comID');}

in the invoice with /templates/my_template/html/com_virtuemart/invoice/mail_html_shopperaddresses.php

The email is sent with all the information of the order and adress of customer but it doesn't send the variable  "my_partner" .
It only displays the result of <?php echo JText::_ ('VM_MYTEXT_1'); ?> and have losen $session->get('comID'). The result of this  variable doesn't show !

Thanks for help
Fred