GITLAB

Snippets

Sign in
  • Sign in

override/classes/pdf/HTMLTemplate.php (1.7.5+)
Add new snippet


#118 by 72f60816e60779e1cff35b00d383cb94?s=40&d=identicon doekia
← discover snippets
HTMLTemplate.php Buy Me a Coffee at ko-fi.com
raw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?php

abstract class HTMLTemplate extends HTMLTemplateCore
{
    /*
    ** dk: 09/04/19: Fix nasty logo bug for 1.7.5.1+ branch
    */
    protected function getLogo()
    {
        $id_shop = (int) $this->shop->id;
        $invoiceLogo = Configuration::get('PS_LOGO_INVOICE', null, null, $id_shop);
        if ($invoiceLogo && file_exists(_PS_IMG_DIR_ . $invoiceLogo)) {
            return _PS_IMG_.$invoiceLogo;
        }
        $logo = Configuration::get('PS_LOGO', null, null, $id_shop);
        if ($logo && file_exists(_PS_IMG_DIR_ . $logo)) {
            return _PS_IMG_.$logo;
        }
        return null;
    }
}