0

Let's say I want to send my best customers a free sticker. I have all my best customers in a group aptly named Best Customers. Are there any extensions or programatic ways to create an order of one sticker for all customers in Best Customers?

Maybe I could modify this solution to fit my needs, but I'm not sure how. Any ideas?

Inchoo Programmatically create order

  • what is sticker order? do you mean order? – Nickool Aug 14 '15 at 20:00
0

I think you need to first get the customers of that group whatever id the group has:

$collection = Mage::getModel('customer/customer')
        ->getCollection()
        ->addAttributeToSelect('*')
        ->addFieldToFilter('group_id', 4);

then after you created the order(the link you mentioned somehow), you should assign each order to each customer in a loop like, create this order, assign this customer to order

 $order->setCustomerId($Customer->getId());
 $order->setCustomerFirstname($Customer->getFirstname()); 
$orderbyid->setCustomerLastname($Customer->getLastname());
$orderbyid->setCustomerEmail($Customer->getEmail());
$orderbyid->save(); 

also there are many extension for assign order to customers, it might not be exactly for customer groups

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.