浏览代码

增加复制商品功能

abiao 5 年之前
父节点
当前提交
947819c271
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lib/product/copy_product.rb

+ 2 - 1
lib/product/copy_product.rb

@@ -53,7 +53,8 @@ module RailsAdmin
               @copy_product.no_delivery_area = @object.no_delivery_area
               @copy_product.video_state = @object.video_state
               @copy_product.video_url = @object.video_url
-              @copy_product.relate_product_id = @object.relate_product_id
+              @copy_product.show_flag = 0
+              @copy_product.relate_product_id = @object.id
               begin
                 @copy_product.save
               rescue Exception => e