VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: thefbi on February 17, 2017, 17:47:36 PM

Title: Hide shipment description in email
Post by: thefbi on February 17, 2017, 17:47:36 PM
Hello,

i am in VM 3.0.18 and Joomla 3.6.5.

I want to hide shipment description in the confirmation email. I have find a way with css to do that in the order form, but not in email. Because, the shipmentName is related to the name + description...
I have search in the com_virtuemart/invoice templates.

I have a lot of shipment, and i need some descriptions in backend to know what is for what. But i dont want this description public... It is what i want to do this feature.

Regards
Title: Re: Hide shipment description in email
Post by: GJC Web Design on February 17, 2017, 21:12:35 PM
the desc is stored with the name as a complete string in the table field..

so either split it off  .. I think from memory its surrounded in a <span>by php in the email template or over write the plugin name function in the plugin so as not to incl. the desc
Title: Re: Hide shipment description in email
Post by: thefbi on February 18, 2017, 18:03:47 PM
Hello,
thanks, you talk about this post ? : http://forum.virtuemart.net/index.php?topic=113044.msg455944#msg455944

Because i dont understand where i have to put this...
Title: Re: Hide shipment description in email
Post by: GJC Web Design on February 19, 2017, 21:30:16 PM
yes that should work if the desc is surrounded in a span

put it where ever u want the shipment name to display.. so replace the current

<td align="right" class="pricePad" colspan="6"><?php echo $this->orderDetails['shipmentName'] ?></td>

with

<td align="right" class="pricePad" colspan="6">
<?php echo substr($this->shipment_name, 0, strpos($this->shipment_name, '</span>')).'</span>';   
//       echo $this->orderDetails['shipmentName'];
     ?>
</td>

over ride

components\com_virtuemart\views\invoice\tmpl\invoice_items.php
Title: Re: Hide shipment description in email
Post by: thefbi on February 19, 2017, 22:26:48 PM
I have replace the string, but now, nothing appear. The shipment name isn't here in the email...
Title: Re: Hide shipment description in email
Post by: thefbi on February 23, 2017, 21:58:47 PM
OK, i have just modified the string to show a text : Shipping fees