MiniVend Akopia Services

[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 Ryan Hertz <rhertz@gyb.baits.com>     ******

At 09:29 PM 6/10/99 , 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?

	Whoa, wait a second - if you have sizes of 7", 7 1/2", etc, you will find
that whenever someone orders 7 1/2" their order will mutate into 7".

	You need to state your sizes in the products.asc like this:

	2,1,10=1/0,20=2/0,30=3/0,40=4/0,50=5/0

	So the select field will show "3/0", but the value will be "30"...  the
loop increment tag will then work correctly.

>
>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
> 

Ryan Hertz                                              tel  520-645-3812
Webmaster                                               tel  800-645-BAIT
Advertising Director                                    fax  520-645-2588
Gary Yamamoto Custom Baits, Inc.            http://www.yamamoto.baits.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


Search for: Match: Format: Sort by: