News:

Support the VirtueMart project and become a member

Main Menu

[SOLVED] Short description with WYSIWYG and HTML - possible?

Started by Razva, September 27, 2011, 10:06:25 AM

Previous topic - Next topic

Milbo

Yepp, this file, the save function should look like this

function save(){

$data = JRequest::get('post');

if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php');
if(Permissions::getInstance()->check('admin')){
$data['product_desc'] = JRequest::getVar('product_desc','','post','STRING',2);
$data['product_s_desc'] = JRequest::getVar('product_s_desc','','post','STRING',2);
}

parent::save($data);
}
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Razva

#16
Hi Milbo,

Thanks for your time!

I've overwritten https://dev.virtuemart.net/svn/virtuemart/trunk/virtuemart/administrator/components/com_virtuemart/controllers/product.php but still...our VM installation doesn't saves any HTML. Should we disable the WYSIWYG and try to enter "raw" html?

Isn't there a way to keep the WYSIWYG + HTML?

Thanks!

LATER EDIT: IT WORKS!!! For posterity, you should replace the save() function from the default product.php with the function stated before by Milbo :)

Aliciah85

Hi Milbo- i have tried everything to get the product description to accept html to no avail. No matter what i do it strips the html and leaves just text.

I have changed the filtering permissions in the article options, i have checked that my JCE editor is set to not clean up code and i have downloaded and saved the newest product.php file (and then still overwritted the save function with the one you have stated above).

I have even copied the same save function used for category description as this is allowing html, but it did not change a thing!

i would appreciate any help you or any other users could give me!

thanks

PRO

Aliciah85.   short DESCRIPTION? or FULL DESCRIPTION?

are you set to super admin? look in vmart /shoppers


Aliciah85

it was both. something i did fixed it, but i have no idea what :(

man.of.earth

I found a simple solution. In /administrator/components/com_virtuemart/views/product/tmpl/product_edit_description.php:

Change

<textarea class="inputbox" name="product_s_desc" id="product_s_desc" cols="65" rows="3" ><?php echo $this->product->product_s_desc?></textarea>

for

<?php echo $this->editor->display('product_s_desc',  $this->product->product_s_desc'90%;''450''55''10', array('pagebreak''readmore') ) ; ?>

In order to keep this setting after VM updates, you may copy the modified file to
/administrator/templates/<backend_admin_template_folder>/html/com_virtuemart/product/product_edit_description.php

VirtueMart 3.2.14
Joomla 3.8.11
php 7.1

razor7

Quote from: arcturus on August 25, 2018, 11:34:03 AM
I found a simple solution. In /administrator/components/com_virtuemart/views/product/tmpl/product_edit_description.php:

Change

<textarea class="inputbox" name="product_s_desc" id="product_s_desc" cols="65" rows="3" ><?php echo $this->product->product_s_desc?></textarea>

for

<?php echo $this->editor->display('product_s_desc',  $this->product->product_s_desc'90%;''450''55''10', array('pagebreak''readmore') ) ; ?>

In order to keep this setting after VM updates, you may copy the modified file to
/administrator/templates/<backend_admin_template_folder>/html/com_virtuemart/product/product_edit_description.php

VirtueMart 3.2.14
Joomla 3.8.11
php 7.1

Cooool! it worked, thanks a lot!
MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store