Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • Mo0nlight Moderator
    #1004943

    Hi,

    Could you clarify in more details? as the Product label still shows well on our demo site

    You can provide the credentials of your site i.e: URL and Admin login info so I will check for you.

    Regards


    1. Screen-Shot-2017-01-24-at-9.06.07-AM
    seventys Friend
    #1005277
    This reply has been marked as private.
    Saguaros Moderator
    #1007242

    Hi,

    Do you mean this label? I checked and still see it’s showing now: http://prntscr.com/e30ang

    Could you send the URL where it doesn’t show? as I’m not familiar with your native language.

    Regards

    seventys Friend
    #1007360

    Hi Saguaros,
    Sorry i should’ve explained with more details.
    yes that’s what I mean, if you check the backend of my site, in eshop components, you’ll find a label called "SALE". The following link is one of the products that the label is assigned to:
    PRODUCT
    Now, if you check the JA Mega Filter page (first product from right) that contains that product, the label isn’t showing:
    Product List

    I think the screenshot clarifies what I say


    1. scrsht
    Mo0nlight Moderator
    #1007489

    Hi,

    You can try this tweak:

    Open the file : plugins/jamegafilter/eshop/helper.php

    Look for the code :

            return $item;
        }
    
        public function getProductCategories($categories, $langCode = 'en-GB')
        {

    Add this code above.

            $labels = EshopHelper::getProductLabels($item->id);
            $strlabel = '';
            for ($i = 0; $n = count($labels), $i < $n; $i++)
            {
                $label = $labels[$i];
                if ($label->label_style == 'rotated' && !($label->enable_image && $label->label_image))
                {
                    $strlabel .= '<div class="cut-rotated">';
                }
                if ($label->enable_image && $label->label_image)
                {
                    $imageWidth = $label->label_image_width > 0 ? $label->label_image_width : EshopHelper::getConfigValue('label_image_width');
                    if (!$imageWidth)
                        $imageWidth = 50;
                    $imageHeight = $label->label_image_height > 0 ? $label->label_image_height : EshopHelper::getConfigValue('label_image_height');
                    if (!$imageHeight)
                        $imageHeight = 50;
                    $strlabel .= '<span class="horizontal '.$label->label_position.' small-db" style="opacity: '.$label->label_opacity.';background-image: url(' . str_replace('administrator/','',$label->label_image) . '); background-repeat: no-repeat; width: '.$imageWidth.'px; height: '.$imageHeight.'px; box-shadow: none;"></span>';
                }
                else 
                {
                    $strlabel .= '<span class="'.$label->label_style.' '.$label->label_position.' small-db" style="float:left;background-color: #'.$label->label_background_color.'; color: #'.$label->label_foreground_color.'; opacity: '.$label->label_opacity.';'.($label->label_bold ? 'font-weight: bold;' : '').'">'.$label->label_name.'</span>';
                }
                if ($label->label_style == 'rotated' && !($label->enable_image && $label->label_image))
                {
                    $strlabel .= '</div>';
                }
            }
            $item->labels = $strlabel;

    Open the file : plugins/jamegafilter/eshop/tmpl/default.php

    Look for :

    JHtml::stylesheet('components/com_eshop/assets/colorbox/colorbox.css');

    Add this code underneath:

    JHtml::stylesheet('components/com_eshop/assets/css/labels.css');

    Open the file : plugins/jamegafilter/eshop/layouts/default/product-item.php

    Add this tag code:

    {labels|s}

    to any place you wish.

    Regards

    seventys Friend
    #1007637

    Hi Mo0nlight,
    I tried this, nothing happens.

    Mo0nlight Moderator
    #1007718

    Hi,

    You had to index again to make it work.

    If there is still no go, you can provide the FTP account of your site, I will take a look.

    Regards

    seventys Friend
    #1007836
    This reply has been marked as private.
    Mo0nlight Moderator
    #1007854

    Hi,

    I accessed with provided ftp but could not see any files or folders. Please check your config again.

    Regards

    seventys Friend
    #1008066

    Sorry Mo0nlight,
    You can check now.

    Mo0nlight Moderator
    #1008361

    Hi,

    Edit file : plugins/jamegafilter/eshop/helper.php

    $labels = EshopHelper::getProductLabels($item->id);

    Change to

    $labels = EshopHelper::getProductLabels($item->id, $lang->lang_code);

    It’s working now.

    Regards

    seventys Friend
    #1008609

    Hi Mo0nlight
    It worked.

    Thanks.

Viewing 12 posts - 1 through 12 (of 12 total)

This topic contains 12 replies, has 3 voices, and was last updated by  seventys 7 years, 9 months ago.

The topic ‘Displaying Eshop labels on product list’ is closed to new replies.