0
事件只運行一次。我在通過觀察員將產品添加到購物車後添加了自定義價值事件checkout_quote_init 它工作正常,但如果客戶登錄並下了訂單,那麼在第一順序中,值被插入到引用中,但第二次觀察者未運行。觀察者只運行一次
<checkout_quote_init>
<observers>
<youva_custom>
<type>singleton</type>
<class>custom/observer</class>
<method>setqoutevalue</method>
</youva_custom>
</observers>
</checkout_quote_init>
public function setqoutevalue($observer) {
$event = $observer->getEvent();
$_quote = $event->getQuote();
$_quote->setCustomevalue($customevalue);
$_quote->save();
}