Hi,
- You can create a mass action with the trigger "after an order is created", with a filter where the custom field is empty, and with an action "update the values" on the custom field column with the operation mode, using the MySQL concat (
www.w3schools.com/sql/func_mysql_concat.asp
) and date functions (
dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
) to set this up so that when you click on the created button, the date in the field gets automatically set to the correct value you want.
- This is indeed only linked to the frontend. In the backend, the cart is not deleted if you create the order from a cart.
You should be able to do it with another massaction with the trigger "after an order is created" and an action "run PHP code" like so:
$app = JFactory::getApplication();
$cart_id = hikashop_getCID('cart_id');
if($app->isClient('administrator') && !empty($cart_id)) {
$cartClass = hikashop_get('class.cart');
$cartClass->delete($cart_id);
// $app->redirect(); you might want to redirect to the order edit page directly here
}