AbanteCart Community

Shopping Cart Operations => Built-in Features => Topic started by: dhigz on September 13, 2020, 04:08:49 PM

Title: Resouce Library Modal Icon images
Post by: dhigz on September 13, 2020, 04:08:49 PM
I am a  long term user of AbanteCart. It has always annoyed me that all icons how in the Resource Library Modal with the fa-code icon instead of the actual icon. Since my the issue has been corrected in the Media Manager and icons show as they truly are and my level of frustration reached a peak, I decided to fix the problem. Little did I know how easy it was.

A small edit to /admin/view/default/template/responses/common/resource_library.tpl is all it took.

On line 184 find:
Code: [Select]
<?php if ($rl['resource_code']) { ?>
<div class="thmb-prev thmb-icon">
<i class="fa fa-code fa-3"></i>
        </div>
<?php } else { ?>

Change it to:

Code: [Select]
<?php if ($rl['resource_code']) { ?>
<div class="thmb-prev thmb-icon">
<?php echo $rl['resource_code']; ?>
         </div>
<?php } else { ?>

Please consider making this change in future releases.

Title: Re: Resouce Library Modal Icon images
Post by: Basara on September 13, 2020, 10:31:28 PM
Hello.
Thank you for the suggestion we will check your code.
One notice, to display font-awesome or other icons require additional CSS and font resources to be loaded in the admin.
Title: Re: Resouce Library Modal Icon images
Post by: HADY on September 14, 2020, 05:22:20 AM
I am a  long term user of AbanteCart. It has always annoyed me that all icons how in the Resource Library Modal with the fa-code icon instead of the actual icon. Since my the issue has been corrected in the Media Manager and icons show as they truly are and my level of frustration reached a peak, I decided to fix the problem. Little did I know how easy it was.

A small edit to /admin/view/default/template/responses/common/resource_library.tpl is all it took.

On line 184 find:
Code: [Select]
<?php if ($rl['resource_code']) { ?>
<div class="thmb-prev thmb-icon">
<i class="fa fa-code fa-3"></i>
        </div>
<?php } else { ?>

Change it to:

Code: [Select]
<?php if ($rl['resource_code']) { ?>
<div class="thmb-prev thmb-icon">
<?php echo $rl['resource_code']; ?>
         </div>
<?php } else { ?>

Please consider making this change in future releases.



good point...
Thanks...
Title: Re: Resouce Library Modal Icon images
Post by: abolabo on September 14, 2020, 08:29:20 AM
not sure it's a good idea.
If you accidentally posted some wrong html-code as code of resource you cannot to change it back because whole page will be broken