Jump to content

I Want to show a custom field order_detail's in PaymentModule


Recommended Posts

I have a module to customize productos, and all is working over the backoffice, but i need to show this field value into the email order confirmation.


I try to modify the OrderDetail class with no success and too trying to edit the PaymentModule but the field is not appearing inside the order object, because i did try to find with this sentence but there is not my field:


public function hookActionValidateOrder($params)
$id_order = intval($order = $params['order']->id);
// now save the session values.....
foreach($_SESSION as $data => $datavalue)
if($data == 'product_sessionkey')
foreach($datavalue as $prd_id => $key_value)
$arr = explode('-',$prd_id);
$productid = $arr[0];
$product_attribute_id = $arr[1];
$product_proyecto = $_SESSION['blablabla']['proyecto'];
$product_serial = $_SESSION['blablabla']['serial'];
 $upSq_ = "update  "._DB_PREFIX_."order_detail Set designer_session_id = '" .$product_serial."', url_pdf = '" .$product_proyecto."' where product_id = ".$productid ." and product_attribute_id = ".$product_attribute_id ." and id_order =".$id_order ;
$resultData = Db::getInstance()->execute($upSq_);
$details = $params['order'];
echo "<pre>";
echo "<pre>";
Please help, and thank you for your time.
Link to comment
Share on other sites

Finally i found the solution through a context variable, 




Then in PaymentModule.php:


$products_list .=
'<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';">
<td style="padding: 0.6em 0.4em;width: 15%;">'.Context::getContext()->cookie->proyecto.'</td>


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...