Revision 7df8f2e4
Von Werner Hahn vor etwa 7 Jahren hinzugefügt
SL/ShopConnector/Shopware.pm | ||
---|---|---|
190 | 190 |
} |
191 | 191 |
$shop_order->save; |
192 | 192 |
|
193 |
# DF Versandkosten als Position am ende einfügen Dreschflegelspezifisch event. konfigurierbar machen |
|
194 |
if (my $shipping = $import->{data}->{dispatch}->{name}) { |
|
195 |
my %shipping_partnumbers = ( |
|
196 |
'Auslandsversand Einschreiben' => { 'partnumber' => '900650'}, |
|
197 |
'Auslandsversand' => { 'partnumber' => '900650'}, |
|
198 |
'Versandpauschale Inland' => { 'partnumber' => '905500'}, |
|
199 |
'Kostenloser Versand' => { 'partnumber' => '905500'}, |
|
200 |
); |
|
201 |
# TODO description für Preis muss angepasst werden |
|
202 |
my %shipping_pos = ( description => $import->{data}->{dispatch}->{name}, |
|
203 |
partnumber => $shipping_partnumbers{$shipping}->{partnumber}, |
|
204 |
price => $import->{data}->{invoiceShipping}, |
|
205 |
quantity => 1, |
|
206 |
position => $position, |
|
207 |
tax_rate => 7, |
|
208 |
shop_trans_id => 0, |
|
209 |
shop_order_id => $id, |
|
210 |
); |
|
211 |
my $shipping_pos_insert = SL::DB::ShopOrderItem->new(%shipping_pos); |
|
212 |
$shipping_pos_insert->save; |
|
213 |
|
|
214 |
} |
|
215 |
# EOT Versandkosten DF |
|
216 | 193 |
my $attributes->{last_order_number} = $ordnumber; |
217 | 194 |
$self->config->assign_attributes( %{ $attributes } ); |
218 | 195 |
$self->config->save; |
... | ... | |
407 | 384 |
my ($self,$partnumber) = @_; |
408 | 385 |
|
409 | 386 |
my $url = $self->url; |
410 |
$partnumber = $::form->escape($partnumber);#shopware don't accept / in articlenumber |
|
387 |
my $partnumber = $::form->escape($partnumber);#shopware don't accept / in articlenumber
|
|
411 | 388 |
my $data = $self->connector->get("http://$url/api/articles/$partnumber?useNumberAsId=true"); |
412 | 389 |
my $data_json = $data->content; |
413 | 390 |
return SL::JSON::decode_json($data_json); |
Auch abrufbar als: Unified diff
Shopmodul: Versandkosten als Position anhängen rausgenommen, da Versandkosten kundenspezifisch gemacht werden