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

EA3KZ Salvador Caballé scaballe at gmail.com
Wed Oct 8 21:25:39 UTC 2014


El 08/10/14 21:02, Greg Hanson ha escrit:
> On 10/8/2014 11:49 AM, Salvador Caballe wrote:
>> 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
>> sql="
>> SELECT sku,timed_promotion,start_date,finish_date
>> FROM [either]__UI_MERCH_TABLE__[or]merchandising[/either]
>> WHERE featured = '[control promo_type specials]'
>
> One way to do it:
>
> SELECT m.sku, m.timed_promotion, m.start_date, m.finish_date
> FROM [either]__UI_MERCH_TABLE__[or]merchandising[/either] m, inventory i
> WHERE m.featured = '[control promo_type specials]'
> AND i.sku = m.sku
> AND i.quantity >= 1
>
>
>

Greg,

thanks for your fast answer
it works, but shows the inactive items.

Salvador





More information about the interchange-users mailing list