Forums / General / Price and date from php script?

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.