Forums / General / Help whit datatypes

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

eZ debug

Timing: Jan 31 2025 04:22:42
Script start
Timing: Jan 31 2025 04:22:42
Module start 'content'
Timing: Jan 31 2025 04:22:42
Module end 'content'
Timing: Jan 31 2025 04:22:42
Script end

Main resources:

Total runtime0.1374 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.8203180.8516
Module start 'content' 0.00690.0072 768.6719101.9297
Module end 'content' 0.01410.1232 870.6016530.7344
Script end 0.1373  1,401.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.4811200.0002
Check MTime0.00130.9765200.0001
Mysql Total
Database connection0.00090.663810.0009
Mysqli_queries0.095469.44801410.0007
Looping result0.00110.76931390.0000
Template Total0.122889.410.1228
Template load0.00090.657210.0009
Template processing0.121988.744410.1219
Override
Cache load0.00060.452810.0006
Sytem overhead
Fetch class attribute can translate value0.00060.416310.0006
XML
Image XML parsing0.00020.147910.0002
General
dbfile0.00574.1166200.0003
String conversion0.00000.005630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs