Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Cannot bulk update “Set Product as New from Date” or other date fields
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

Set “Product as New from Date” is not working for me right now from the ‘bulk update’ page from the category list page in admin. With the bug-tracking not working I am not sure if this is a new issue. Does anyone have any idea as to whether this is a known issue?

I did a workaround in SOAP to bulk update my dates. I have not checked if any other attributes fail to bulk update.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mffowler
Member
 
Total Posts:  31
Joined:  2008-05-16
 

Does anyone know how to set “products to/from new dates” within the database? When there are bulk updates to be made the bulk update just doesn’t seem ton work properly and certainly is too slow for a query.

@Discovery: How do you use SOAP to do this?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

I have my own attribute for the dates so I can show when something is due but the same should work with the normal new from date attributes. You will have to look that one up in the API. As for the rest, you will be looking to write something like:

$host= ‘yourserver.com’;
$client= new SoapClient(’http://’.$host.’/index.php/api/soap/?wsdl’);
$apiuser= ‘admin’;
// API key is password
$apikey = ‘123123’;

$sess_id= $client->login($apiuser, $apikey);

while (($data = fgetcsv($Handle, 1000, “,")) !== FALSE)
{
$sku=$data[0] . “-” . $data[1] . “-” . $data[2];
$size=$data[2];
$colour=$data[1];
$qty=(int)$data[3];
$day=strtok($data[4], “/");
$month=strtok("/");
$year=strtok(” “);
$next_due = $year . “-” . $month . “-” . $day . “ 00:00:00”;

try
{ $next_due_update=$client->call($sess_id, ‘product.update’, array($sku, array(’next_due’=>$next_due)));
}
catch(Exception $e)
{
// Report product not updated with SOAP error message
}
}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top