Fabrizio Barachino
|
Wednesday 11 August 2004 9:09:16 am
Dear guys, I'm trying to make a product class with different prices. I used eZOption Datatype but when I want add the product in the basket this error appears: "Fatal error: eZ publish did not finish it's request The execution of eZ publish was abruptly ended, the debug output is present below." The product class has:
Title
Description Price (this is made whit eZOption)
I've searched in the forum but I didn't find any solution. And I'm not sure that my solution is the right way. Someone could help me?
Regards Fabrizio
|
Bård Farstad
|
Thursday 12 August 2004 12:00:41 am
Fabrizio, you need to have an ezprice datatype for your product as well. This will work as the base price, the options will then be added to the base price. It will work to have the value of the ezprice datatype 0, but it needs to be present. Cheers, --bård
Documentation: http://ez.no/doc
|
Fabrizio Barachino
|
Friday 13 August 2004 3:22:48 am
I've used this code:
{* Product - Full view *}
<div class="content-view-full">
<div class="class-product">
<form method="post" action={"content/action"|ezurl}>
<h1>{$node.name|wash()}</h1>
{section show=$node.object.data_map.image.content}
<div class="attribute-image">
{attribute_view_gui alignment=right image_class=medium attribute=$node.object.data_map.image.content.data_map.image}
</div>
{/section}
<div class="attribute-short">
{attribute_view_gui attribute=$node.object.data_map.short_description}
</div>
<div class="attribute-long">
{attribute_view_gui attribute=$node.object.data_map.description}
</div>
<div class="attribute-price">
<p>
{attribute_view_gui attribute=$node.object.data_map.price}
</p>
</div>
<div class="attribute-price">
<p>
{attribute_view_gui attribute=$node.object.data_map.option}
</p>
</div>
{section show=is_unset( $versionview_mode )}
<div class="content-action">
<input type="submit" class="defaultbutton" name="ActionAddToBasket" value="{"Add to basket"|i18n("design/base")}" />
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
<input type="hidden" name="ViewMode" value="full" />
</form>
</div>
{/section}
<div class="attribute-pdf">
<p>
<a href={concat('/content/pdf/',$node.node_id)|ezurl}>{"Download this product sheet as PDF"|i18n("design/base")}</a>
</p>
</div>
<h2>{"Product reviews"|i18n("design/base")}</h2>
<div class="content-view-children">
{section var=review loop=fetch_alias( reviews, hash( parent_node_id, $node.node_id ) )}
{node_view_gui view='line' content_node=$review}
{/section}
</div>
{* Are we allowed to create new object under this node? *}
{section show=$node.object.can_create}
<div class="content-action">
<form method="post" action={"content/action"|ezurl}>
<input type="hidden" name="ClassIdentifier" value="review" />
<input type="hidden" name="NodeID" value="{$node.node_id}" />
<input class="button" type="submit" name="NewButton" value="{'New review'|i18n( 'design/base' )}" />
</form>
</div>
{section-else}
<div class="message-warning">
<h3>{"You are not allowed to create comments."|i18n("design/base")}</h3>
</div>
{/section}
{let related_purchase=fetch( shop, related_purchase, hash( contentobject_id, $node.contentobject_id,
limit, 10 ) )}
{section show=$related_purchase}
<h2>{"People who bought this also bought"|i18n("design/base")}</h2>
<div class="relatedorders">
{section var=product loop=$related_purchase}
{content_view_gui view=text_linked content_object=$product.item}
{/section}
</div>
{/section}
{/let}
</div>
</div>
I've put the tag form on top. In the original code it was before the action button. Thank you again :)
Regards Fabrizio
|