[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: quantity of accessories/sizes follow-up question
****** message to minivend-users from "Christian J. =?iso-8859-1?Q?M=FCller?=" <cmueller@polinet.ch> ******
Try this (untested):
[perl interpolate=1]
@number = [data products yourattributefield key];
return $number;
[/perl]
Chris
Edward Mack wrote:
>
> ****** message to minivend-users from "Edward Mack" <emack@mackcom.com> ******
>
> I am interested in doing something that will show the quantity of sizes an
> item is available in. For example: "This item is available in 4 sizes",
> where the "4" would be generated based on the number of sizes (or commas) in
> the sizes attribute field of the products database. i.e.: 7", 8", 9", 10"
>
> The following code was suggested and works, however it counts the number of
> commas and spaces... So 7", 7 1/2", 8 1/2" gives me a result of 5 not the
> desired result of 3. I see the same behavior when using the
> [loop-increment] tag. Is there a way to choose the delimiter the [loop ...]
> tag uses?
>
> Thank you for your help!
>
> [set sizeloopcount][/set]
> [loop arg=[item-field size]]
> [perl arg=scratch interpolate=1]
> $Safe{'scratch'}{'sizeloopcount'}
> ++;
> return '';
> [/perl]
> [/loop]
> There are [scratch sizeloopcount] sizes available.
>
> ____________________________________________
> Trust Mack Communications for:
> * Great Computer Deals
> http://www.handtech.com/com_asp/public/catalog/tcweb.asp?host=1839
> * Web site design and Palm Pilot development:
> http://www.mackcom.com
>
> -
> To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list