Jump to content

Order_Details no work as me need


Recommended Posts

Hi, i no enougth idea prestashop yet, but need add the session nickname to class Order_Detailts, i test whit:

	protected function create(Order $order, Cart $cart, $product, $id_order_state, $id_order_invoice, $use_taxes = true, $id_warehouse = 0)
	{
		if ($use_taxes)
			$this->tax_calculator = new TaxCalculator();

		$this->id = null;

		$this->product_id = (int)($product['id_product']);
		$this->product_attribute_id = (int)($product['id_product_attribute'] ? (int)($product['id_product_attribute']) : null);
		$this->email_seller= $cookie->email;

See "$this->email_seller= $cookie->email;"

This no work, but if i use this is working:

$this->email_seller= 'HelloHello';

 

But i need use the email of user login session. Anobody can help me?

 

Sorry bad english, Regards!

Link to comment
Share on other sites

this is why $cookie variable doesnt work.

prestashop 1.5.x doesn't use $cookie anymore

you can use it, but before you use it you have to define global variable, something like

global $cookie

but in fact, in 1.5.x you have to use context object, like it is described here: http://doc.prestashop.com/display/PS15/Using+the+Context+Object

 

Oh, thanks, so, how i can save the email of sombody loged? I Lost =/

$this->context->email¿?

Link to comment
Share on other sites

×
×
  • Create New...