Jump to content

Edit History

Doumakii

Doumakii

i solved the issue by removing a condition in the ReasuranceActivity.php

i commented on github as well

https://github.com/PrestaShop/blockreassurance/commit/37d0fb1eafe8c227281e12e9a1422980b0d76816#commitcomment-60858987

 public static function getAllBlockByStatus($id_lang = 1, $id_shop = 1)
    {
        $sql = 'SELECT * FROM `' . _DB_PREFIX_ . 'psreassurance` pr
            LEFT JOIN ' . _DB_PREFIX_ . 'psreassurance_lang prl ON (pr.id_psreassurance = prl.id_psreassurance)
            WHERE prl.id_lang = "' . (int) $id_lang . '" 
                AND prl.id_shop = "' . (int) $id_shop . '"
                AND pr.status = 1
            ORDER BY pr.position';

        $result = Db::getInstance()->executeS($sql);

        foreach ($result as &$item) {
            $item['is_svg'] = !empty($item['custom_icon']);
          /*   {* removed this && (ImageManager::getMimeType(str_replace(__PS_BASE_URI__, _PS_ROOT_DIR_ .
            
DIRECTORY_SEPARATOR, $item['custom_icon'])) == 'image/svg'); *}
       */ }

        return $result;
    }
}

image.thumb.png.8f665f199dad5578418863605e35117f.png

Doumakii

Doumakii

i solved the issue by removing a condition in the ReasuranceActivity.php

 

 public static function getAllBlockByStatus($id_lang = 1, $id_shop = 1)
    {
        $sql = 'SELECT * FROM `' . _DB_PREFIX_ . 'psreassurance` pr
            LEFT JOIN ' . _DB_PREFIX_ . 'psreassurance_lang prl ON (pr.id_psreassurance = prl.id_psreassurance)
            WHERE prl.id_lang = "' . (int) $id_lang . '" 
                AND prl.id_shop = "' . (int) $id_shop . '"
                AND pr.status = 1
            ORDER BY pr.position';

        $result = Db::getInstance()->executeS($sql);

        foreach ($result as &$item) {
            $item['is_svg'] = !empty($item['custom_icon']);
          /*   {* removed this && (ImageManager::getMimeType(str_replace(__PS_BASE_URI__, _PS_ROOT_DIR_ .
            
DIRECTORY_SEPARATOR, $item['custom_icon'])) == 'image/svg'); *}
       */ }

        return $result;
    }
}

image.thumb.png.8f665f199dad5578418863605e35117f.png

×
×
  • Create New...