ITEM Loop and Sample CALL program.cgi

This is an archive of old posting to the User Forum

ITEM Loop and Sample CALL program.cgi

Postby Scott Norman » Tue Apr 08, 2003 3:43 am

How does ITEMS loop work exactly. If put "[-- ITEM --]", no item shows, but
you see something like "ITEM --]" If you use the word ITEMS, all products
and links are returned. So is ITEM by itself wrong?

Does anybody have a sample CALL program.cgi that I can look at to see how it
works?

Thanks,

Scott
Scott Norman
 

Re: ITEM Loop and Sample CALL program.cgi

Postby loren_d_c » Tue Apr 08, 2003 8:10 am

The definition of [-- LOOP ITEMS --] is all products and links. If you
just want products, use [-- LOOP PRODUCTS --] instead. If you just want
links, use [-- LOOP LINKS --].

-Loren

Scott Norman wrote:
How does ITEMS loop work exactly. If put "[-- ITEM --]", no item shows, but
you see something like "ITEM --]" If you use the word ITEMS, all products
and links are returned. So is ITEM by itself wrong?

Does anybody have a sample CALL program.cgi that I can look at to see how it
works?

Thanks,

Scott
loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: ITEM Loop and Sample CALL program.cgi

Postby jim » Tue Apr 08, 2003 10:28 am

Scott,
Attached is a simple program that I use in the CALL statement. I wanted to be
able to create my own add to cart button using a different graphic in a custom
product template that includes a form. (note that you can do this in the current
version of ShopSite but when I needed to do it there wasn't a way to do it.) I
put the image name in the addtocartbutton text field of the product and used
that value to pass to the inf.pl program which would return just part of the
image description file (.inf.imagename) which is created by ShopSite to contain
the code for displaying an image. This is the information that you see when you
Edit Image Attributes, but it contains the text "<img src=" and in the place
where I was using it I didn't need the "<img " so I needed to have it stripped
as well as the closing ">" .

Here is the line of the custom template that invokes it.
<input type=image [-- CALL inf.pl ( OUTPUT_DIRECTORY_PATH ,
PRODUCT.addtocartbutton ,strip) --] >

Jim


Scott Norman wrote:

How does ITEMS loop work exactly. If put "[-- ITEM --]", no item shows, but
you see something like "ITEM --]" If you use the word ITEMS, all products
and links are returned. So is ITEM by itself wrong?

Does anybody have a sample CALL program.cgi that I can look at to see how it
works?

Thanks,

Scott
jim
 


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 51 guests