Revision 353

Date:
2013/05/29 12:24:54
Author:
ahitrov
Revision Log:
While saving the delivery the script sends the letter by the template found in project /comps/letters/
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/plugins/webshop/comps/contenido/webshop/delivery.html

     
    176 176 $document->status(4);
    177 177 $document->postman_id( $user->id );
    178 178 $document->etime( $now->ymd('-').' '.$now->hms );
    179 if ( $m->comp_exists('/comps/letters/order_delivered.msn') ) {
    180 my $profile = $keeper->{users}->get_profile( id => $order->uid );
    181 my $mailfrom = ref $project->params && $project->params->{mailfrom} ? $project->params->{mailfrom} : undef;
    182 if ( $profile && $mailfrom ) {
    183 my $sendmail = {
    184 to => $profile->name.' <'.$profile->email.'>',
    185 from => 'Интернет-магазин <'.$mailfrom.'>',
    186 subject => 'Подтверждение доставки',
    187 body => $m->scomp('/comps/letters/order_delivered.msn', profile => $profile, order => $order),
    188 };
    189 $m->comp('/inc/sendmail.msn', email => $sendmail);
    190 }
    191 }
    179 192 } elsif ( $ARGS{_ret_manager} ) {
    180 193 $document->status(1);
    181 194 } elsif ( $ARGS{_ret_facility} ) {