Browse Source

Deactivate product on detach

Vova Tkach 5 years ago
parent
commit
9bfd9ffd81
1 changed files with 2 additions and 1 deletions
  1. 2 1
      modules/module_shop_act_detach.go

+ 2 - 1
modules/module_shop_act_detach.go

@@ -21,7 +21,8 @@ func (this *Modules) RegisterAction_ShopDetach() *Action {
 		if err := wrap.DB.Transaction(func(tx *wrapper.Tx) error {
 			if _, err := tx.Exec(`
 				UPDATE shop_products SET
-					parent_id = NULL
+					parent_id = NULL,
+					active = 0
 				WHERE
 					id = ?;
 				`,