Kaynağa Gözat

增加商品属性定义

abiao 5 yıl önce
ebeveyn
işleme
ff2f3533d5
1 değiştirilmiş dosya ile 0 ekleme ve 8 silme
  1. 0 8
      app/models/product.rb

+ 0 - 8
app/models/product.rb

@@ -24,14 +24,6 @@ class Product < ActiveRecord::Base
     IMG_STORE_PATH = "product"
 
     def v_share_img=file
-        @Size = ProductAttrConfig.where("product_id=? and size_type='size'",self.id).first
-        if !@Size.blank?
-            @productAttrs = ProductAttr.where("attr_key_id=?",@Size.id).order("recommend desc")
-            @productAttrs.each do |attr|
-                a=[attr.name,attr.id]
-                SIZE_ENUM.push(a)
-            end
-        end
         unless file.blank?
         file_name = "#{UUID.new.generate[0...8].downcase}.jpg"
         file_path = "#{IMG_STORE_PATH}/product/share/#{file_name}"