Skip to content

Instantly share code, notes, and snippets.

@snetty
Created February 6, 2013 09:55
Show Gist options
  • Save snetty/4721536 to your computer and use it in GitHub Desktop.
Save snetty/4721536 to your computer and use it in GitHub Desktop.
set default shipping and payment methods in lemonstand
public function extend_order_model($order){
if($order->is_new_record()){
$order->shipping_method = Shop_ShippingOption::create()->find_by_ls_api_code('no_shipping_required');
$order->payment_method = Shop_PaymentMethod::create()->find_by_ls_api_code('default');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment