Hi
I created a DATETIME column in the cscart_products table and a corresponding input form in update.tpl.
When I update the products, it works fine the first time. However, if I make a change in other inputs, such as the product name, the value in the DATETIME column I’ve created gets overwritten to 0.
A custom STRING field in the products table does not get overwritten, but only this DATETIME column.
Any idea why this is happening? Thank you in advance.
Below are the codes:
/backend/templates/products/update.tpl
{__("available_until")}:
/controllers/backend/products.php
in ($mode == ‘m_override’)
if (isset($product_data['avail_until'])) { $product_data['avail_until'] = $product_data['avail_until']; }
under
if (isset($product_data['avail_since'])) { $product_data['avail_since'] = fn_parse_date($product_data['avail_since']); }
in($mode == ‘m_update’)
'avail_until' => 'products_data',
under
'avail_since' => 'products_data',
and
under
elseif ($field == 'avail_since') { $desc = 'available_since'; }