Forums / General / Price and date from php script?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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.