Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 53e8b269

Von Jan Büren vor fast 3 Jahren hinzugefügt

  • ID 53e8b269113c3d06991224d2096c9a4a24d76f72
  • Vorgänger de17d33a
  • Nachfolger 68d61d09

Shopware6: Optionalen Proxy erlauben und Protokoll http oder https initialisieren

Unterschiede anzeigen:

SL/DB/MetaSetup/Shop.pm
24 24
  price_source             => { type => 'text' },
25 25
  pricetype                => { type => 'text' },
26 26
  protocol                 => { type => 'text', default => 'http', not_null => 1 },
27
  proxy                    => { type => 'text', default => '' },
27 28
  realm                    => { type => 'text' },
28 29
  server                   => { type => 'text' },
29 30
  shipping_costs_parts_id  => { type => 'integer' },
SL/DB/Shop.pm
21 21
  push @errors, $::locale->text('The path is missing.')        unless $self->{path};
22 22
  push @errors, $::locale->text('The Host Name is missing')    unless $self->{server};
23 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 Proxy Name seems invalid') unless $self->{proxy} =~ m/[0-9A-Za-z].\.[0-9A-Za-z]/;
24 25
  push @errors, $::locale->text('Orders to fetch neeeds a positive Integer')
25 26
                                                               unless $self->{orders_to_fetch} > 0;
26 27

  
SL/ShopConnector/Shopware6.pm
710 710
  my ($self) = @_;
711 711

  
712 712
  my $client = REST::Client->new(host => $self->config->server);
713

  
714
  $client->getUseragent()->proxy([$self->config->protocol], $self->config->proxy) if $self->config->proxy;
715

  
713 716
  $client->addHeader('Content-Type', 'application/json');
714 717
  $client->addHeader('charset',      'UTF-8');
715 718
  $client->addHeader('Accept',       'application/json');
sql/Pg-upgrade2/shops_6.sql
1
-- @tag: shop_add_proxy
2
-- @description: Shop-Config um Option Proxy erweitert
3
-- @depends: shops_5
4
-- @ignore: 0
5

  
6
ALTER TABLE shops ADD COLUMN proxy TEXT default '';
templates/webpages/shops/form.html
43 43
    <th align="right">[% 'Port' | $T8 %]</th>
44 44
    <td>[%- L.input_tag("shop.port", SELF.shop.port, size=5) %]</td>
45 45
  </tr>
46
  <tr>
47
    <th align="right">[% 'Proxy' | $T8 %]</th>
48
    <td>[%- L.input_tag("shop.proxy", SELF.shop.proxy, size=size) %]</td>
49
  </tr>
46 50
  <tr>
47 51
    <th align="right">[% 'Path' | $T8 %]</th>
48 52
    <td>[%- L.input_tag("shop.path", SELF.shop.path, size=size) %]</td>

Auch abrufbar als: Unified diff