BenitoBenitez Posted February 7, 2014 Share Posted February 7, 2014 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 More sharing options...
vekia Posted February 7, 2014 Share Posted February 7, 2014 what ps version you use? everything depends on it Link to comment Share on other sites More sharing options...
BenitoBenitez Posted February 7, 2014 Author Share Posted February 7, 2014 what ps version you use? everything depends on it Lastest, thanks. Link to comment Share on other sites More sharing options...
vekia Posted February 7, 2014 Share Posted February 7, 2014 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 Link to comment Share on other sites More sharing options...
BenitoBenitez Posted February 7, 2014 Author Share Posted February 7, 2014 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 More sharing options...
vekia Posted February 7, 2014 Share Posted February 7, 2014 save? where you want to save it? Link to comment Share on other sites More sharing options...
BenitoBenitez Posted February 7, 2014 Author Share Posted February 7, 2014 save? where you want to save it? i need save email of who do new order manually. Database. table ps_order_details, see code first message Regards Link to comment Share on other sites More sharing options...
Recommended Posts