[ic] loop list on different item-code

Paul Jordan interchange-users@icdevgroup.org
Mon Aug 26 00:02:01 2002


Hi guys!


I am trying to set up products that are "sets" of other products. I am
having trouble decrementing the inventory for all associated skus.

First off, my product sku is da00001 however when it gets to log_transaction
it looks more like da00001h. This is normal for my store because I use a
custom onfly routine and custom options, so don't sweat that.

I need to get a space separated list of sku's from a field in products
called sku_set. I must first [filter 7] or substring the first seven digits
from my purchased sku (da00001h) to get da00001 again.

Then I need to take the space separated list and loop through inventory
decrement. In log_transactions I have:


[tmp orig_sku][filter 7][item-code][/filter][/tmp]

[loop list="[data products sku_set [scratch orig_sku]]"]
        [data
                table=inventory
                col=quantity
                key="[loop-code]"
                increment=1
                value="-1"
        ]
[/loop]

I have tried many ways, but this way seems the closest to me. I just need to
figure out how to fix:

[loop list="[data products sku_set [scratch orig_sku]]"]

I know this is wrong syntax, but I haven't been able to figure out how to
base this products table access on an inline altered [item-code]. No matter
what I try I always run into this type of wrong syntax -> ]] and quoting
does no good.


I have been away from IC for a month or so, so if I am overlooking something
simple just say so. I feel like I have cobwebs in my head :)

TIA

Paul

BTW I have no error logs because I guess IC does not log errors in something
benign like loops