MCQs > IT & Programming > Magento > Which piece of code can be used to get Magento clients by payment method?

Magento MCQs

Which of the following piece of codes can be used to get Magento clients by payment method?

Answer

Correct Answer: $collection = Mage::getResourceModel('sales/order_payment_collection')->addFieldToSelect('*')->addFieldToFilter('method', "mundipagg_boleto"); foreach ($collection as $orderPayment) { $orderId = $orderPayment->getParentId(); $order = Mage::getModel('sales/order')->load($orderId); $customerId = $order->getCustomerId(); }

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Magento Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Magento Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it