Re: Add Product Description to Invoice/orders/emails ect;
cont'd:
step 2:
in includes/classes/order.php find
PHP Code:
$sql_data_array = array('orders_id' => $zf_insert_id,
'products_id' => zen_get_prid($this->products[$i]['id']),
//'products_model' => $this->products[$i]['model'],
'products_name' => $this->products[$i]['name'],
'products_description' => zen_get_products_description($this->products[$i]['id']),
'products_price' => $this->products[$i]['price'],
'final_price' => $this->products[$i]['final_price'],
'onetime_charges' => $this->products[$i]['onetime_charges'],
'products_tax' => $this->products[$i]['tax'],
'products_quantity' => $this->products[$i]['qty'],
'products_priced_by_attribute' => $this->products[$i]['products_priced_by_attribute'],
'product_is_free' => $this->products[$i]['product_is_free'],
'products_discount_type' => $this->products[$i]['products_discount_type'],
'products_discount_type_from' => $this->products[$i]['products_discount_type_from'],
'products_prid' => $this->products[$i]['id']);
zen_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
to this:
PHP Code:
$sql_data_array = array('orders_id' => $zf_insert_id,
'products_id' => zen_get_prid($this->products[$i]['id']),
//'products_model' => $this->products[$i]['model'],
'products_name' => $this->products[$i]['name'],
'products_description' => zen_get_products_description($this->products[$i]['id']),
[COLOR="Red"][B]'products_url' => zen_get_products_url($this->products[$i]['id']),[/B][/COLOR]
'products_price' => $this->products[$i]['price'],
'final_price' => $this->products[$i]['final_price'],
'onetime_charges' => $this->products[$i]['onetime_charges'],
'products_tax' => $this->products[$i]['tax'],
'products_quantity' => $this->products[$i]['qty'],
'products_priced_by_attribute' => $this->products[$i]['products_priced_by_attribute'],
'product_is_free' => $this->products[$i]['product_is_free'],
'products_discount_type' => $this->products[$i]['products_discount_type'],
'products_discount_type_from' => $this->products[$i]['products_discount_type_from'],
'products_prid' => $this->products[$i]['id']);
zen_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
and find the line:
PHP Code:
$this->products_ordered_attributes = '';
and change to this :
PHP Code:
//-----------$this->products_ordered_attributes = '';
$this->products_ordered_attributes = "\n\n" . "Product Link: " . zen_get_products_url($this->products[$i]['id']) . "\n\n" . "Product Details: " ;
thats it. works perfect!! :smartalec:
Re: Add Product Description to Invoice/orders/emails ect;
please remove the unnecessary "... "
or this one. sorry for that:
PHP Code:
$sql_data_array = array('orders_id' => $zf_insert_id,
'products_id' => zen_get_prid($this->products[$i]['id']),
//'products_model' => $this->products[$i]['model'],
'products_name' => $this->products[$i]['name'],
'products_description' => zen_get_products_description($this->products[$i]['id']),
'products_url' => zen_get_products_url($this->products[$i]['id']),
'products_price' => $this->products[$i]['price'],
'final_price' => $this->products[$i]['final_price'],
'onetime_charges' => $this->products[$i]['onetime_charges'],
'products_tax' => $this->products[$i]['tax'],
'products_quantity' => $this->products[$i]['qty'],
'products_priced_by_attribute' => $this->products[$i]['products_priced_by_attribute'],
'product_is_free' => $this->products[$i]['product_is_free'],
'products_discount_type' => $this->products[$i]['products_discount_type'],
'products_discount_type_from' => $this->products[$i]['products_discount_type_from'],
'products_prid' => $this->products[$i]['id']);
zen_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
Re: Add Product Description to Invoice/orders/emails ect;
ok, i have this one up and running..
maybe someone knows how to make 2 different confirmation emails to admin and customer...
all i want for the admin is having the "Product URL" and for the customer would only be the standard format.
so this way i can automatically forward the confirmation to the printer.
any help is much appreciated..
Re: Add Product Description to Invoice/orders/emails ect;
golowenow,
I've been wanting to add the product description to our docs for months (everytime the packing lists printed with the meaningless 'model'). I recently found your most thorough walk-through (perfect, i might add) on doing this. Granted, Dr. Byte helped jump start it with the database mod, but your tutorial above was really good.
Thank you for taking the time to document this on-line for others.
Matt
Re: Add Product Description to Invoice/orders/emails ect;
Re: Add Product Description to Invoice/orders/emails ect;
I noted a formatting issue with the product description in my i pad emails where the product description will not wrap to the next line.
Eventually, the solution that I implemented was to rem out the <nobr> and </nobr> tags on lines 899 and 901, respectively, of the \includes\classes\order.php file. It fixed the i pad email formatting by allowing the description to wrap. I have not found any unwanted side effects anywhere else...so far.
Code:
//'<nobr>' .
'<small><em> '. nl2br($this->products_ordered_attributes) .'</em></small>' .
//'</nobr>' .
Thought I'd put this out there for anyone else to use.
Matt
Re: Add Product Description to Invoice/orders/emails ect;
Hi everyone!
I have followed the steps written here below but i have no results:
After i have insert the code mentioned when I click on buy button I have back a blank page. I use Zen-Cart 1.3.9e italian version.
There's anyone that understand what I'm wrong??
Thanks in advanced.
Bye bye
Re: Add Product Description to Invoice/orders/emails ect;
Quote:
Originally Posted by
mercurioservice
... I have back a blank page...
https://www.zen-cart.com/tutorials/index.php?article=82
Re: Add Product Description to Invoice/orders/emails ect;
Thanks for reply!!! I just made it and it's working!!
Now i have to insert the same field in online order that the customer can see after login. I see that the file maybe is tpl_account_history_info_default.php but i do know the code to insert to show the field 'products_description' .
Thanks in advanced
Re: Add Product Description to Invoice/orders/emails ect;
Is there an updated code for V151?