VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Dragoner on August 17, 2016, 08:55:01 AM

Title: Order email - RAW - customfields
Post by: Dragoner on August 17, 2016, 08:55:01 AM
Hi, I need advice how to erase  red underlined DIV from raw order email? There need be only the name customfield (yellow box on screen).

Thank you
David
Title: Re: Order email - RAW - customfields
Post by: Dragoner on August 17, 2016, 09:49:53 AM
Can i load only customfield value without name?

Thanks
David
Title: Re: Order email - RAW - customfields
Post by: GJC Web Design on August 17, 2016, 10:35:16 AM
You need to adapt your components\com_virtuemart\views\invoice\tmpl to display how u want if u don't want to use plain text in your custom I guess
Title: Re: Order email - RAW - customfields
Post by: Dragoner on August 17, 2016, 12:51:42 PM
Thanks for reply.

I have this code in /components/com_virtuemart/views/invoice/tmpl/mail_raw_pricelist.php

   
if (!class_exists('VirtueMartModelCustomfields'))
    require(VMPATH_ADMIN . DS . 'models' . DS . 'customfields.php');
$product_attribute = VirtueMartModelCustomfields::CustomsFieldOrderDisplay($item, 'FE');
echo "\n" . $product_attribute . "\n";



I donť know how can i change it.

Thanks
David
Title: Re: Order email - RAW - customfields
Post by: jenkinhill on August 17, 2016, 13:41:49 PM
What VirtueMart version is that? 
Title: Re: Order email - RAW - customfields
Post by: GJC Web Design on August 17, 2016, 16:43:39 PM
but assume something like

echo "\n" .  strip_tags($product_attribute) . "\n";
Title: Re: Order email - RAW - customfields
Post by: jenkinhill on August 17, 2016, 17:22:00 PM
It is a bug, I just replicated it in VM 3.0.17.6   HTML mail is fine, it's just a problem with plain text mail (I have never used text mail on VM before).
Title: Re: Order email - RAW - customfields
Post by: Milbo on August 18, 2016, 10:07:51 AM
Not trivial to change this. It could work with the strip_tags($product_attribute), then it is trivial, but if it does not work, then we need an extra param for the VirtueMartModelCustomfields::CustomsFieldOrderDisplay function, which renders without tags
Title: Re: Order email - RAW - customfields
Post by: Dragoner on August 19, 2016, 14:00:59 PM
I have version 3.0.17.4, my client want to use RAW (plain text) emails. Will it be repair in next version?

Thank you.
David
Title: Re: Order email - RAW - customfields
Post by: GJC Web Design on August 19, 2016, 14:53:02 PM
Have u tried this?

echo "\n" .  strip_tags($product_attribute) . "\n";