php - How to change the status of order from pending to payment done by credit card? -


in magento when create order using credit card payment type after completing order display me order status pending. instead of want payment through credit card status or credit card payment admin aware payment completed.

actually want add new status if possible orders done using credit cards, it's easy admin filter it.

snapshot of credit card screen

"new order status" options need set orders made cc payment method. depending on magento version there 2 ways of adding new order statuses:

magento ce 1.6+ (ee 1.10+)

this simple. go admin panel > system > order statuses , create new 1 there. click on 'assign status state'. statuses list select new created status , states list select 'new'. has state 'new', otherwise won't listed @ payment method's config.

here's step step of adding new order status:

  1. go admin panel > system > order statuses. see grid of statuses defined far.
  2. click on 'create new status' button
  3. you see new status edit page. must fill 'status code' , 'status label', because they're mandatory. status code can e.g. 'cc_payment' , status label e.g. 'credit card payment'. other fields can omit, since other language labels.
  4. click on 'save status' button. redirected order statuses grid. should see new status on list.
  5. click on 'assign status state' button (next 'create new status').
  6. from 'order status' drop-down list select new status ('credit card payment'). 'order state' drop-down list select 'new'.
  7. click on 'save status assignment' button.
  8. go payment method configuration (system > configuration > payment methods) , set new order status desired.

magento ce 1.5 (ee 1.8) , lower

managind order statuses , states done config.xml. so, in order add new status, create new module (e.g. company_sales) , in config.xml put similar xml structure one:

 <global>     <sales>         <order>             <statuses>                 <cc_payment translate="label"><label>credit card payment</label></cc_payment>             </statuses>             <states>                 <new>                     <statuses>                         <cc_payment default="0"/>                     </statuses>                 </new>             </states>         </order>     </sales> </global>  

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -