Jump to content

Web services API - impossible to insert custom date for a product


Eli Ivanova

Recommended Posts

Hello,

 

Using Prestashop web services API I imported successfully large number of products. The issue I have is that it seems not possible to insert custom dates for a product (both date_add & date_upd). I'm using the following code:

$webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
$xml = $webService -> get(array('url' => PS_SHOP_PATH . '/api/products?schema=blank'));
$resources = $xml -> children() -> children();

$resources->date_add = '2011-06-06 15:01:17';
$resources->date_upd = '2011-06-06 15:42:17';

It works well for categories, but for products the system always inserts the current date&time.

 

Is there anyone with the same issue? Any help on resolving that?

 

Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...