LOOP PRODUCT TAG

General ShopSite user discussion

LOOP PRODUCT TAG

Postby bubblefast » Sat Apr 28, 2007 2:19 pm

It appears to me that the LOOP PRODUCT TAG puts a space between each row of product. Is there a way to delete this extra row by modifying the tag or using a different tag?

Thanks,
Mark
bubblefast
 
Posts: 9
Joined: Sat Apr 07, 2007 4:16 pm

Postby Jim » Sat Apr 28, 2007 6:22 pm

Are you using a custom template? If so what does your page template have between the Loop Product tag and end loop product tag? What does your product template look like? Are you trying to place multiple columns of products across a page?

If you are not using a custom template what ShopSite page and product templates are you usingZ?
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

LOOP PRODUCT TAG

Postby bubblefast » Sat Apr 28, 2007 6:45 pm

I'm trying to be as basic as possible so I can learn. I have 100 products of a similar nature that I want to put in a table. I do not want spaces between any of the rows. I need to compress my space.

I created a very basic page template:

[-- DEFINE PAGE --]
<html>
# This define is used to control how the page will look
[-- LOOP PRODUCTS --]
[-- PRODUCT --]
[-- END_LOOP PRODUCTS --]
</html>
[-- END_DEFINE PAGE --]

and a very basic product template:

<FORM action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post>
<table>
<tr>
<td>[--product.graphic --]</td>
<td>[--product.name--]</td>
<td>[--product.sku--]</td>
<td>[--product.productdescription --]</td>
<td>[--product.price--]</td>
<td><input type=text size=2 name="[-- PRODUCT.RECORDNUMBER --]:qnty" value="1"></td>
<td><input type=hidden name=storeid value=[--STORE_ID--]>
<input type=hidden name=dbname value=products>
<input type=hidden name=function value=add>
<input type=hidden name=itemnum value=[-- product.RecordNumber --]>
<input type=image src="[--OUTPUT_DIRECTORY_URL--]/media/themesmedia/tab_blue_button_view.gif">
<a href="[-- Shopping_Cart_URL --]">[-- PRODUCT.AddCartButton --]</a></td>
</tr>
</table>
</FORM>


This works, but there still is a space between rows. Do you have any suggestions?
bubblefast
 
Posts: 9
Joined: Sat Apr 07, 2007 4:16 pm

Postby Jim » Sun Apr 29, 2007 9:20 am

There are default values that browsers use for spacing around and within a table. You can modify the various spacing features by using style sheets.

You should check out a good style book to see how this is done. You can also get information of the web at various sites by searching for "Table style sheet". You might want to check the site
http://www.w3.org/TR/REC-CSS2/tables.html for some basic information.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 55 guests