Remove text after "read more" in Product option "i" icon

  • Posts: 3
  • Thank you received: 0
  • Hikashop Business
8 years 3 weeks ago #269992

Hi,
How to remove text after <hr id="system-readmore" />, when point "i" icon on product option?
Untitled-1.jpg

I edited the file "product / option.php":

if(!empty($optionInfo->product_description) || !empty($optionInfo->product_url)){
$options='<img src="'.HIKASHOP_IMAGES.'info.png" alt="Information"/>';
$description = '';
if(!empty($optionInfo->product_description)){
// $description = $this->escape(strip_tags(JHTML::_('content.prepare',$optionInfo->product_description)));
$description = preg_replace('#<hr *id="system-readmore" */>.*#is','',$this->row->product_description);
$options='<span class="hikashop_option_info" title="'.$description.'">'.$options.'</span>';
}

Somehow it gets ok, but it remains <p> and </ p> ...
Untitled-2.jpg

Thanks

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4820
  • Thank you received: 654
  • MODERATOR
8 years 3 weeks ago #269994

Hello,

Product_description comes with "<p>" & "</p>", and so maybe you can try to modify text and remove them, something like this kind :

$string = str_replace("<p>", "", $string);
$string = str_replace("</p>", "", $string);
and then, display your string.

Hope this will help you.

Regards

Last edit: 8 years 3 weeks ago by Philip.

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum