Lost "Featured Badge" in the last update

News Show Pro GK5 - flexible, responsive and easily extendable free Joomla module support forum.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Tue Nov 17, 2015 3:59 pm
Hi,

I lost the "featured badges" on my Virtuemart products in the last update (Module 1.9.2.1 on 02/11/2015)...Any advise?
User avatar
Fresh Boarder

teitbite
Thu Nov 19, 2015 4:32 pm
Hi

I do not think badges are supported by module. Was that a customisation to the module ?
User avatar
Moderator

GK User
Sun Nov 22, 2015 9:01 pm
I am using the Storefront template, which use the News Show Pro GK5 to display the virtuemart products.The module displays the "feature" products with a badge as it does in your demo site. After the update, the badge stopped displaying.
User avatar
Fresh Boarder

teitbite
Tue Nov 24, 2015 1:37 pm
Hi

Och yes, You are right. That is the only style supporting this badges and I forgot about it, sorry. Please send me an access to Your joomla panel and url to Your site.
User avatar
Moderator

teitbite
Tue Dec 01, 2015 12:17 pm
Hi

I'm afraid I will need an access to ftp. I cannot see any problems in settings, so issue must be in code.
User avatar
Moderator

teitbite
Thu Dec 10, 2015 1:10 pm
Hi

Thank You for the access. Looks like badges functionality were removed in some of the updates since most of the functions were rewritten. I've added in again by:

editing file /modules/mod_news_pro_gk5/tmpl/com_virtuemart/view.php and changed line 53 which looked like this:

Code: Select all
      return NSP_GK5_com_virtuemart_View::getImageHTML($only_url, $IMG_SOURCE, $links, $config, $IMG_LINK, $full_size_img);


into

Code: Select all
      return NSP_GK5_com_virtuemart_View::getImageHTML($only_url, $IMG_SOURCE, $links, $config, $IMG_LINK, $full_size_img, $item['featured']);


than at the end of file /modules/mod_news_pro_gk5/tmpl/view.php I replaced the code:

Code: Select all
         if($config['news_content_image_pos'] == 'center' && !$links) {
            $img_output .= '</div>';
         }
         
         return $img_output;


with

Code: Select all
         if($config['news_content_image_pos'] == 'center' && !$links) {
            $img_output .= '</div>';
         }
      
         if($is_featured && $config['vm_show_featured_badge']) {
            $badge = '<sup class="nspBadge">'.JText::_('MOD_NEWS_PRO_GK5_NSP_FEATURED').'</sup>';
         } else {
            $badge = '';
         }
   
         return $img_output . $badge;
User avatar
Moderator


cron