Magento+;Shopfusion singleton是空的
我正在使用Magento和Typo3(Shopfusion)。我有一个用于上传订单图像的扩展,它在“纯”Magento中工作,但通过Shopfusion在Magento中工作 我已经尽可能地调试了Magento。在shopfusion中,以下单例引入一个空数组。我检查了“RedPandaPlus\u OrderAttachments\u Block\u Attachments”中的getOrderAttachments,发现它没有被调用 单身人士电话: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
$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,我需要知道您在哪里调用此方法