VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Artemi0 on April 03, 2015, 10:04:09 AM

Title: Virtuemart clean HTML?
Post by: Artemi0 on April 03, 2015, 10:04:09 AM
Hello !:
Use Virtuemart 2.9.9e, preinstalled with a workforce of CMSMART "Printing Company Template" Joomla! 3.4.1 Stable

Everything works perfect, but ...

After adding a position in product template (using an override....)


<?php if (!empty($this->product->customfieldsSorted['my-position'])) {
       
$this->position='my-position';
       echo 
$this->loadTemplate('customfields');
    }
    
?>


and assign that position a custom field type "Editor" in the product description text that I write is shown, but as plain text without formatting or pictures ....

I have found that neither Joomla or configuration editor (JCE in this case) are the "guilty" cleaning code i've tried other wysiwyg editors and always happens the same, only shows the raw text.

The forum can not find anyone with this problem ... Any ideas?

Excuse my english and thanks for your great work!
Title: Re: Virtuemart clean HTML?
Post by: balai on April 03, 2015, 10:20:28 AM
I think the editor is displayed only in the backend. This is how it is designed to work.

If you want to have a user input, try the "Customer Text Input" plugin. It does not have an editor but you can give one with some modifications to that plugins output.

Title: Re: Virtuemart clean HTML?
Post by: Artemi0 on April 03, 2015, 11:01:55 AM
No, i don't want to show an text field with editor to buyers.

I want to add an extended description, especific times to delivery, etc,  in product details.

He is now working,  when write some text whit editor wysiwyg that is shown in assigned position of the template,  but is a raw text, no HTML code (no images, no H3 tags, etc...)


I don't know if it is well explained, my English is very limited... thanks for your time.
Title: Re: Virtuemart clean HTML?
Post by: balai on April 03, 2015, 11:09:05 AM
aha
I suppose the text you are entering is somehow filtered/sanitized
Don't know if this happens when it is saved (input) or in the output.
You can have a look at the table virtuemart_product_customfields to see how this custom field is saved
Title: Re: Virtuemart clean HTML?
Post by: GJC Web Design on April 03, 2015, 11:21:58 AM
Virtuemart 2.9.9e is/was a pre release development version... you should be on 3.0.6.4
Title: Re: Virtuemart clean HTML?
Post by: Artemi0 on April 04, 2015, 08:50:47 AM
Hi!

First , let me thank you for your time

Balai
QuoteI suppose the text you are entering is somehow filtered/sanitized
Don't know if this happens when it is saved (input) or in the output.
You can have a look at the table virtuemart_product_customfields to see how this custom field is saved

Yes, the problem its the sanitation in VM. This happens when saved. The table svirtuemart_product_customfields hows the text stored in plain text. If change this whit codified text, directly in phpMyAdmin, it show at frontend Ok,

Some idea to solve this?


Quote from: GJC Web Design on April 03, 2015, 11:21:58 AM
Virtuemart 2.9.9e is/was a pre release development version... you should be on 3.0.6.4

GJC  you're right and it would be safer, but I bought a package {Joomla (updated)+ VM(2.9.9e)+ Template (Printing VM by CMSMART, customized) } with some custom extensions and i can't update whitout damaging others components and functions...

I´m waiting reply developer to know when they make an update, but I think this is more urgent for me than for them.

Some idea?

Title: Re: Virtuemart clean HTML?
Post by: David Kan on April 06, 2015, 10:35:55 AM
Hello

We are the developer

For sure, we need to know which one you choose to display (on the front-end):

1. http://gyazo.com/d3fc2d232cef20ee603f39a03bac93d7
2. http://gyazo.com/28d9c02780299c837eeba3cf832286f1