Remove text after "read more" in Product option "i" icon
9 years 5 months ago #269992
by assun
Remove text after "read more" in Product option "i" icon was created by assun
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":
Untitled-2.jpg
Thanks
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":
Somehow it gets ok, but it remains <p> and </ p> ...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>';
}
Untitled-2.jpg
Thanks
Please Log in or Create an account to join the conversation.
9 years 5 months ago - 9 years 5 months ago #269994
by Philip
Replied by Philip on topic Remove text after "read more" in Product option "i" icon
Hello,
Product_description comes with "<p>" & "</p>", and so maybe you can try to modify text and remove them, something like this kind :
and then, display your string.
Hope this will help you.
Regards
Product_description comes with "<p>" & "</p>", and so maybe you can try to modify text and remove them, something like this kind :
Code:
$string = str_replace("<p>", "", $string);
$string = str_replace("</p>", "", $string);
Hope this will help you.
Regards
Last edit: 9 years 5 months ago by Philip.
Please Log in or Create an account to join the conversation.
Time to create page: 0.106 seconds