1 # This file has been auto-generated only because it didn't exist.
2 # Feel free to modify it at will; it will not be overwritten automatically.
8 use SL::DB::MetaSetup::Shop;
9 use SL::DB::Manager::Shop;
10 use SL::DB::Helper::ActsAsList;
11 use SL::Locale::String qw(t8);
13 __PACKAGE__->meta->initialize;
20 push @errors, $::locale->text('The description is missing.') unless $self->{description};
21 push @errors, $::locale->text('The path is missing.') unless $self->{path};
22 push @errors, $::locale->text('The Host Name is missing') unless $self->{server};
23 push @errors, $::locale->text('The Host Name seems invalid') unless $self->{server} =~ m/[0-9A-Za-z].\.[0-9A-Za-z]/;
24 push @errors, $::locale->text('The Protocol for Host Name seems invalid (expected: http:// or https://)!')
25 if ($self->{server} =~ m/:/ && $self->{server} !~ m/(^https:\/\/|^http:\/\/)/);
26 push @errors, $::locale->text('The Proxy Name seems invalid') . $self->{proxy} . ':' unless !$self->{proxy} || $self->{proxy} =~ m/[0-9A-Za-z].\.[0-9A-Za-z]/;
27 push @errors, $::locale->text('Orders to fetch neeeds a positive Integer')
28 unless $self->{orders_to_fetch} > 0;
30 # not yet implemented checks
31 push @errors, $::locale->text('Transaction Description is not yet implemented') if $self->{transaction_description};
32 if ($self->{connector} eq 'shopware6') {
33 push @errors, $::locale->text('Shipping cost article is not implemented') if $self->{shipping_costs_parts_id};
34 push @errors, $::locale->text('Fetch from last order number is not implemented') if $self->{last_order_number};
36 push @errors, $::locale->text('Use Long Description from Parts is only for Shopware6 implemented')
37 if $self->{use_part_longdescription};
45 my @shops_dd = ( { title => t8("all") , value =>'' } );
46 my $shops = SL::DB::Manager::Shop->get_all( where => [ obsolete => 0 ] );
47 my @tmp = map { { title => $_->{description}, value => $_->{id} } } @{ $shops } ;
62 SL::DB::Shop - Model for the 'shops' table
66 This is a standard Rose::DB::Object based model and can be used as one.
74 Returns an error if the shop description is missing
78 Returns an array of hashes for dropdowns in filters
84 Werner Hahn E<lt>wh@futureworldsearch.netE<gt>
86 G. Richardson E<lt>grichardson@kivitendo-premium.deE<gt>