eZ Community » Forums » General » Help whit datatypes
expandshrink

Help whit datatypes

Help whit datatypes

Wednesday 11 August 2004 6:09:16 pm - 5 replies

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

Thursday 12 August 2004 9: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

Thursday 12 August 2004 1:31:49 pm

Thank you very much.

But now when I click on Add To basket it doesn't add the value.

I've tried whit the admin full view product.tpl and it works

Maybe there something wrong on product.tpl in the shop side.

Thursday 12 August 2004 1:57:28 pm

> But now when I click on Add To basket it doesn't add the value.

I've found the solution. blunk.gif Emoticon

Thank you for the suggestion

Thursday 12 August 2004 4:01:17 pm

Great,

What was the actual problem and fix? ( It would be nice to get here in case other users get the same problem ).

--bård

Friday 13 August 2004 12:22:48 pm

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 happy.gif Emoticon

Regards
Fabrizio

Modified on Saturday 14 August 2004 11:34:09 am by Fabrizio Barachino

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from