[ic] show only the items in stock in promo component

Salvador Caballe scaballe at gmail.com
Wed Oct 8 18:49:31 UTC 2014

I  just want to show the items in stock, in the promo component
(standard catalog) but I don't know how modify the search to look 
inventory table and merchandising table.

this is the promo component code:

[query arrayref=main
SELECT sku,timed_promotion,start_date,finish_date
FROM [either]__UI_MERCH_TABLE__[or]merchandising[/either]
WHERE featured = '[control promo_type specials]'
[perl tables="__UI_MERCH_TABLE__ merchandising"]
my @out;
my $ref;
my $db;
delete $Scratch->{promo_codes};
my $date = $Tag->time( { body => '%Y%m%d' } );
$ref = $Tmp->{main} or return;
for(@$ref) {
my $line = $_;
push(@out, $line->[0]), next if ! $line->[1];
next if $line->[2] gt $date;
next if $line->[3] lt $date;
push @out, $line->[0];
$Scratch->{promo_codes} = join(' ', @out);

best regards
Salvador Caballé

More information about the interchange-users mailing list