Browse Source

Better alias generation on product duplication

Vova Tkach 5 years ago
parent
commit
e6552c5cc6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/module_shop_act_duplicate.go

+ 1 - 1
modules/module_shop_act_duplicate.go

@@ -53,7 +53,7 @@ func (this *Modules) RegisterAction_ShopDuplicate() *Action {
 					currency,
 					price,
 					CONCAT(name, ' (Copy)'),
-					CONCAT(alias, '-', '`+utils.Int64ToStr(time.Now().Unix())+`'),
+					CONCAT(REGEXP_REPLACE(alias, '-c[0-9]+$', ''), '-c', '`+utils.Int64ToStr(time.Now().Unix())+`'),
 					vendor,
 					quantity,
 					category,