¿Tienes una pregunta?

Si usted tiene cualquier pregunta, escriba a continuación lo que está buscando!

Change Magento`s default phone numbers and callouts before site launch


Crear un archivo en app/local/Mage/AdminNotification/Model/Resource/Inbox.php y copiar lo mismo en ese archivo lo de app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php pero cambiando la última función:

public function parse(Mage_AdminNotification_Model_Inbox $object, array $data)
    {
        $adapter = $this->_getWriteAdapter();
        foreach ($data as $item) {
            $select = $adapter->select()
                ->from($this->getMainTable())
                ->where('title = ?', $item['title']);

            if (empty($item['url'])) {
                $select->where('url IS NULL');
            } else {
                $select->where('url = ?', $item['url']);
            }

            if (isset($item['internal'])) {
                $row = false;
                unset($item['internal']);
            } else {
                $row = $adapter->fetchRow($select);
            }

            if (!$row) {
                $adapter->insert($this->getMainTable(), $item);
            }
        }
    }

Por la siguiente:

public function parse(Mage_AdminNotification_Model_Inbox $object, array $data)
    {
        $adapter = $this->_getWriteAdapter();
        foreach ($data as $item) {
            $select = $adapter->select()
                ->from($this->getMainTable())
                ->where('url=? OR url IS NULL', $item['url'])
                ->where('title=?',$item['title']);

            if (isset($item['internal'])) {
                $row = false;
                unset($item['internal']);
            } else {
                $row = $adapter->fetchRow($select);
            }

           if (!$row) {
                $adapter->insert($this->getMainTable(), $item);
            }
        }
    }

Fuente: https://www.goivvy.com/blog/magentonotificationbug

Commentarios

commentarios

Deje un comentario

Tu dirección de correo electrónico no será publicada. Los campos requeridos están marcados *

Puedes usar las siguientes etiquetas y atributos HTML <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>