Setup of product variants

This commit is contained in:
2015-04-08 09:37:39 +02:00
parent 2503e09f65
commit a7a953dadb
13 changed files with 116 additions and 7 deletions
+3
View File
@@ -1,6 +1,9 @@
class ProductSerializer < Qwaiter::Serializer
root 'product'
attributes :name, :price, :description, :image, :code, :position, :visible, :active, :product_category_id
has_many :product_variants
def image
if object.image.present?
{small: object.image.url(:small)}
@@ -0,0 +1,4 @@
class ProductVariantSerializer < Qwaiter::Serializer
root 'product_variant'
attributes :name
end