更新时间:2023-11-29 21:35:46
如果我正确理解,您要删除与特定用户关联的所有愿望清单项目吗? ...
If i understand correctly, you want to delete all wishlist items associated with a particular user? ...
$customerId = 1; // Replace with the customer id you are targetting
$itemCollection = Mage::getModel('wishlist/item')->getCollection()
->addCustomerIdFilter($customerId);
foreach($itemCollection as $item) {
$item->delete();
}