Jump to content

Edit History

ps8modules

ps8modules

Hi override Product.php function update().

/* added */
$this->date_add = date('Y-m-d H:i:s');

 

Or in your module add hook:

public function hookActionObjectProductUpdateAfter($params)
{
    $db = Db::getInstance();
    $db->execute("UPDATE "._DB_PREFIX_."product SET date_add = '".date('Y-m-d H:i:s')."' WHERE id_product = ".$params['object']->id);
    $db->execute("UPDATE "._DB_PREFIX_."product_shop SET date_add = '".date('Y-m-d H:i:s')."' WHERE id_product = ".$params['object']->id);
}

 

ps8modules

ps8modules

Hi override Product.php function update().

/* added */
$this->date_add = date('Y-m-d H:i:s');

 

×
×
  • Create New...