Price and date from php script?

Author Message

Carlos Revillo

Sunday 18 June 2006 7:54:41 am

Hi. I'm working with a extension to add content to ez content tree.

Let's suppose my class has these attributes
"name" -> text
"manufacturer" -> text
"price" -> ezprice
"date" -> ezdate.

I can add content to name and manufacturer attributes if i do something like

$contentObjectAttributes[0]->setAttribute( 'data_text', $name);
$contentObjectAttributes[0]->store();
$contentObjectAttributes[1]->setAttribute( 'data_text', $manufacturer);
$contentObjectAttributes[1]->store();

but i don't know what do i have to do with price and dateattributes,

For price, I tried

$contentObjectAttributes[2]->setAttribute( 'data_float', $price);
$contentObjectAttributes[2]->store();

That works for price, but how can i set IVA and things like that from my php script?.

Thank you again.

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 31 2025 06:28:27
Script start
Timing: Jan 31 2025 06:28:27
Module start 'layout'
Timing: Jan 31 2025 06:28:27
Module start 'content'
Timing: Jan 31 2025 06:28:28
Module end 'content'
Timing: Jan 31 2025 06:28:28
Script end

Main resources:

Total runtime0.9123 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1250151.2109
Module start 'layout' 0.00480.0021 739.335936.6484
Module start 'content' 0.00680.9046 775.9844826.9766
Module end 'content' 0.91140.0009 1,602.96097.8516
Script end 0.9123  1,610.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3164160.0002
Check MTime0.00120.1301160.0001
Mysql Total
Database connection0.00070.078710.0007
Mysqli_queries0.874295.8248460.0190
Looping result0.00050.0508440.0000
Template Total0.886297.120.4431
Template load0.00200.217720.0010
Template processing0.884296.916820.4421
Template load and register function0.00140.149910.0014
states
state_id_array0.00030.032010.0003
state_identifier_array0.00070.074020.0003
Override
Cache load0.00160.1740160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.062110.0006
Fetch class attribute name0.00190.204810.0019
XML
Image XML parsing0.00010.010710.0001
class_abstraction
Instantiating content class attribute0.00000.000810.0000
General
dbfile0.00060.0669100.0001
String conversion0.00000.000740.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/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: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs