Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b501cb33

Von Werner Hahn vor etwa 7 Jahren hinzugefügt

  • ID b501cb33a80ec6f7160a6d79c1d301c72cfda471
  • Vorgänger 2b511d4d
  • Nachfolger 3cec22a0

Shopmodul: Kommentare rausgenommen, Perldoc

Conflicts:
SL/Controller/ShopPart.pm
SL/ShopConnector/Shopware.pm

Webshop: Kommentare rausgenommen

Conflicts:
SL/Controller/ShopPart.pm

Unterschiede anzeigen:

SL/Controller/Shop.pm
144 144

  
145 145

  
146 146
1;
147

  
148
__END__
149

  
150
=encoding utf-8
151

  
152
=head1 NAME
153

  
154
  SL::Controller::Shop
155

  
156
=head1 SYNOPSIS
157

  
158

  
159
=head1 DESCRIPTION
160

  
161

  
162
=head1 BUGS
163

  
164
  None yet. :)
165

  
166
=head1 AUTHOR
167

  
168
  G. Richardson E<lt>information@kivitendo-premium.deE<gt>
169
  W. Hahn E<lt>wh@futureworldsearch.netE<gt>
SL/Controller/ShopOrder.pm
21 21

  
22 22
sub action_get_orders {
23 23
  my ( $self ) = @_;
24

  
24
  my $orders_fetched;
25 25
  my $active_shops = SL::DB::Manager::Shop->get_all(query => [ obsolete => 0 ]);
26 26
  foreach my $shop_config ( @{ $active_shops } ) {
27 27
    my $shop = SL::Shop->new( config => $shop_config );
28 28
    my $new_orders = $shop->connector->get_new_orders;
29
    push @{ $orders_fetched },@{ $new_orders };
29 30
  };
30 31
  $self->action_list;
32
  #TODO Flashinfo how many orders from wich shop have been fetched. infos in $orders_fetched
31 33
}
32 34

  
33 35
sub action_list {
......
180 182
}
181 183

  
182 184
1;
185

  
186
__END__
187

  
188
=encoding utf-8
189

  
190
=head1 NAME
191

  
192
  SL::Controller::ShopOrder - Handles th imported shoporders
193

  
194
=head1 SYNOPSIS
195

  
196

  
197
=head1 DESCRIPTION
198

  
199

  
200
=head1 BUGS
201

  
202
  None yet. :)
203

  
204
=head1 AUTHOR
205

  
206
  W. Hahn E<lt>wh@futureworldsearch.netE<gt>
207

  
208
=cut
SL/Controller/ShopPart.pm
340 340

  
341 341
1;
342 342

  
343
=pod
343
__END__
344 344

  
345 345
=encoding utf-8
346 346

  
347

  
347 348
=head1 NAME
348 349

  
349
SL::Controller::ShopPart - Controller for managing ShopParts
350
  SL::Controller::ShopPart - Controller for managing ShopParts
350 351

  
351 352
=head1 SYNOPSIS
352 353

  
353
ShopParts are configured in a tab of the corresponding part.
354
  ShopParts are configured in a tab of the corresponding part.
354 355

  
355 356
=head1 FUNCTIONS
356 357

  
358

  
357 359
=over 4
358 360

  
361

  
359 362
=item C<action_update_shop>
360 363

  
361
To be called from the "Update" button, for manually syncing a part with its
362
shop. Generates a  Calls some ClientJS functions to modifiy original page.
364
  To be called from the "Update" button, for manually syncing a part with its shop. Generates a  Calls some ClientJS functions to modifiy original page.
363 365

  
364
=back
365 366

  
366 367
=head1 AUTHORS
367 368

  
368
G. Richardson E<lt>information@kivitendo-premium.deE<gt>
369
  G. Richardson E<lt>information@kivitendo-premium.deE<gt>
370
  W. Hahn E<lt>wh@futureworldsearch.netE<gt>
371

  
372
=cut
369 373

  
370 374
=cut
371 375
1;
SL/ShopConnector/Shopware.pm
13 13
use SL::DB::ShopOrderItem;
14 14
use Data::Dumper;
15 15
use Sort::Naturally ();
16
use SL::Helper::Flash;
16 17
use Encode qw(encode_utf8);
17 18
use SL::Controller::ShopPart;
18 19

  
......
150 151
    }else{
151 152
      last;
152 153
    }
154
    my $shop = $self->config->description;
155

  
156
    my @fetched_orders = ($shop,$i);
157

  
158
    return \@fetched_orders;
153 159
  }
154 160
  # return $import;
155 161
};
......
188 194
  $main::lxdebug->dump(0, 'WH: UPDATE JSON: ', \$json);
189 195
  my $url = $self->url;
190 196
  my $part = SL::DB::Part->new(id => $shop_part->{part_id})->load;
191
$main::lxdebug->dump(0, 'WH: SHOPPART: ',\$part);
192 197

  
193 198
  # TODO: Prices (pricerules, pricegroups, multiple prices)
194 199
  my $cvars = { map { ($_->config->name => { value => $_->value_as_text, is_valid => $_->is_valid }) } @{ $part->cvars_by_config } };
......
275 280
  }
276 281
  if(@upload_img) {
277 282
    $self->connector->put("http://$url/api/generateArticleImages/$part->{partnumber}?useNumberAsId=true");
278
    #$self->connector->delete("http://$url/api/caches/");
279 283
  }
280 284
  return $upload_content->{success};
281 285
}
......
318 322

  
319 323
=head1 SYNOPSIS
320 324

  
325

  
321 326
=head1 DESCRIPTION
322 327

  
328

  
323 329
=head1 BUGS
324 330

  
325
None yet. :)
331
  None yet. :)
326 332

  
327 333
=head1 AUTHOR
328 334

  
335
  W. Hahn E<lt>wh@futureworldsearch.netE<gt>
329 336

  
330 337
=cut

Auch abrufbar als: Unified diff