Author Topic: [SOLVED] Short description with WYSIWYG and HTML - possible?  (Read 15433 times)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9856
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Second product description - possible?
« Reply #15 on: September 28, 2011, 11:09:04 am »
Yepp, this file, the save function should look like this
Code: [Select]
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);
}
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Razva

  • Jr. Member
  • **
  • Posts: 55
Re: Second product description - possible?
« Reply #16 on: September 28, 2011, 11:33:06 am »
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

  • Beginner
  • *
  • Posts: 28
Re: [SOLVED] Short description with WYSIWYG and HTML - possible?
« Reply #17 on: November 07, 2011, 06:30:22 am »
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10352
  • VirtueMart Version: 3+
Re: [SOLVED] Short description with WYSIWYG and HTML - possible?
« Reply #18 on: November 07, 2011, 15:10:18 pm »
Aliciah85.   short DESCRIPTION? or FULL DESCRIPTION?

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

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

Aliciah85

  • Beginner
  • *
  • Posts: 28
Re: [SOLVED] Short description with WYSIWYG and HTML - possible?
« Reply #19 on: November 09, 2011, 03:42:44 am »
it was both. something i did fixed it, but i have no idea what :(

arcturus

  • Beginner
  • *
  • Posts: 22
  • VirtueMart Version: 3.5.0
Re: [SOLVED] Short description with WYSIWYG and HTML - possible?
« Reply #20 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

Code: [Select]
<textarea class="inputbox" name="product_s_desc" id="product_s_desc" cols="65" rows="3" ><?php echo $this->product->product_s_desc?></textarea>
for

Code: [Select]
<?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
Cheers,
George
https://www.proxima-mundi.ro

Now I'm using Joomla! 3.9.11 and VM 3.5.0 10097 on PHP 7.3