Help whit datatypes

Author Message

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

Thursday 12 August 2004 4:31:49 am

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.

Fabrizio Barachino

Thursday 12 August 2004 4:57:28 am

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

I've found the solution. ;)

Thank you for the suggestion

Bård Farstad

Thursday 12 August 2004 7:01:17 am

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

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:39:22
Script start
Timing: Jan 18 2025 19:39:22
Module start 'layout'
Timing: Jan 18 2025 19:39:22
Module start 'content'
Timing: Jan 18 2025 19:39:22
Module end 'content'
Timing: Jan 18 2025 19:39:22
Script end

Main resources:

Total runtime0.6695 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.1563153.4375
Module start 'layout' 0.00530.0028 742.593839.3750
Module start 'content' 0.00810.6602 781.9688587.9531
Module end 'content' 0.66830.0012 1,369.921916.1875
Script end 0.6695  1,386.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4471160.0002
Check MTime0.00120.1762160.0001
Mysql Total
Database connection0.00070.111410.0007
Mysqli_queries0.610291.1469660.0092
Looping result0.00060.0864640.0000
Template Total0.642896.020.3214
Template load0.00180.274920.0009
Template processing0.640995.732220.3205
Template load and register function0.00020.033910.0002
states
state_id_array0.00060.097110.0006
state_identifier_array0.00150.224320.0008
Override
Cache load0.00160.2433430.0000
Sytem overhead
Fetch class attribute can translate value0.00060.096820.0003
Fetch class attribute name0.00100.149770.0001
XML
Image XML parsing0.00060.083620.0003
class_abstraction
Instantiating content class attribute0.00000.002780.0000
General
dbfile0.00080.1122170.0000
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs