Revision 8c73a980
Von Werner Hahn vor mehr als 8 Jahren hinzugefügt
SL/ShopConnector/Shopware.pm | ||
---|---|---|
5 | 5 |
use parent qw(SL::ShopConnector::Base); |
6 | 6 |
|
7 | 7 |
use SL::JSON; |
8 |
#use JSON; |
|
9 | 8 |
use LWP::UserAgent; |
10 | 9 |
use LWP::Authen::Digest; |
11 | 10 |
use SL::DB::ShopOrder; |
... | ... | |
180 | 179 |
|
181 | 180 |
# TODO: Prices (pricerules, pricegroups, |
182 | 181 |
my $cvars = { map { ($_->config->name => { value => $_->value_as_text, is_valid => $_->is_valid }) } @{ $part->cvars_by_config } }; |
183 |
my $categories = { map { ( name => $_) } @{ $shop_part->{shop_category} } }; |
|
184 |
$main::lxdebug->dump(0, 'WH: CATEGORIES',\$categories); |
|
182 |
#my $categories = { map { ( name => $_) } @{ $shop_part->{shop_category} } }; |
|
183 |
my @cat = (); |
|
184 |
foreach my $row_cat ( @{ $shop_part->shop_category } ) { |
|
185 |
$main::lxdebug->dump(0, 'WH:ROWCAT ',\$row_cat); |
|
186 |
|
|
187 |
my $temp = { ( id => @{$row_cat}[0], ) }; |
|
188 |
$main::lxdebug->dump(0, 'WH: TEMP: ', \$temp); |
|
189 |
|
|
190 |
push ( @cat, $temp ); |
|
191 |
#push ( @cat, map { ( name => $_[1]) } @{ $row_cat } ); |
|
192 |
} |
|
193 |
$main::lxdebug->dump(0, 'WH: CATEGORIES',\@cat); |
|
185 | 194 |
my $images = SL::DB::Manager::File->get_all( where => [ modul => 'shop_part', trans_id => $part->{id} ]); |
186 | 195 |
$main::lxdebug->dump(0, 'WH: IMAGES',\@{ $images } ); |
187 | 196 |
my $images2 = { map { |
... | ... | |
233 | 242 |
active => $shop_part->active, |
234 | 243 |
images => [ @images3 ], |
235 | 244 |
__options_images => { replace => 1, }, |
236 |
categories => [ { path => 'Deutsch|test2' }, ], #[ $categories ], |
|
245 |
categories => [ @cat ], #{ path => 'Deutsch|test2' }, ], #[ $categories ],
|
|
237 | 246 |
|
238 | 247 |
) |
239 | 248 |
; |
Auch abrufbar als: Unified diff
ShopPart: ArtikelKategorien werden über ID in den Shop dem Artikle zugeordnet