Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento+;Shopfusion singleton是空的_Magento_Magento 1.9 - Fatal编程技术网

Magento+;Shopfusion singleton是空的

Magento+;Shopfusion singleton是空的,magento,magento-1.9,Magento,Magento 1.9,我正在使用Magento和Typo3(Shopfusion)。我有一个用于上传订单图像的扩展,它在“纯”Magento中工作,但通过Shopfusion在Magento中工作 我已经尽可能地调试了Magento。在shopfusion中,以下单例引入一个空数组。我检查了“RedPandaPlus\u OrderAttachments\u Block\u Attachments”中的getOrderAttachments,发现它没有被调用 单身人士电话: $orderAttachments = M

我正在使用Magento和Typo3(Shopfusion)。我有一个用于上传订单图像的扩展,它在“纯”Magento中工作,但通过Shopfusion在Magento中工作

我已经尽可能地调试了Magento。在shopfusion中,以下单例引入一个空数组。我检查了“RedPandaPlus\u OrderAttachments\u Block\u Attachments”中的getOrderAttachments,发现它没有被调用

单身人士电话:

$orderAttachments = Mage::getSingleton('redpandaplus_orderattachments/session')->getOrderAttachments();
方法代码:

class RedPandaPlus_OrderAttachments_Block_Attachments extends Mage_Core_Block_Template
{
,...
    public function getOrderAttachments($orderId)
    {
        $collection = Mage::getModel('redpandaplus_orderattachments/orderattachment')->getCollection()
                        ->addFieldToFilter('order_id', $orderId);

        return $collection->toArray();
    }

,...
}

从代码中可以看出,调用中缺少$orderId参数:

$orderAttachments = Mage::getSingleton('redpandaplus_orderattachments/session')->getOrderAttachments();
为了帮助您获取orderId,我需要知道您在哪里调用此方法