[Zope] Zope Examples - Shopping Cart

Rares Vernica verni0@msn.com
Tue, 06 Aug 2002 10:45:16 +0300


Hi,

I'm trying to figure out how a shopping cart is working in Zope.
I've looked at the "Shopping Cart" Example in Zope (2.5.1).
The "index_html" is in ZPT language and I rewrite it as a DTML 
Method/Document.
The page seems to work until I push the "Add Items" button, on the next page 
I get the error message:

Error Type: KeyError
Error Value: standard_html_header

Here is the contents of my "index_htm" page (only the "Add item" part):

<dtml-var standard_html_header>
<h2>Add Items</h2>
<form action="addItems">
<table cellpadding="8" cellspacing="0" border="0">
	<tr align="left" class="normal">
		<th>Item</th>
		<th>Description</th>
		<th>Price</th>
		<th>Quantity</th>
	</tr>
	<dtml-in getItem>
		<tr valign="top">
			<td><dtml-var "_.getitem('sequence-item')['title']"></td>
			<td><dtml-var "_.getitem('sequence-item')['description']"></td>
			<td><dtml-var "_.getitem('sequence-item')['price']"></td>
			<td>
				<input type="hidden" name="orders.id:records" 
value="_.getitem('sequence-item')['id']">
				<input type="text" name="orders.quantity:records" value="0" 
size="3"></td>
		</tr>
	</dtml-in>
	<tr>
		<td colspan="2"></td>
		<td colspan="2"><input type="submit" value="Add Items"></td>
	</tr>
</table>
</form>
<dtml-var standard_html_footer>

I've left the rest of the scripts unmodified.
What could it be?

Thanks in advance,
Rares

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com