Commit db2d7671 by ivan Lan

Finish Merchant Series Controller

parent e6c21f24
json.current_page @resources.current_page json.current_page @resources.current_page
json.total_pages @resources.total_pages json.total_pages @resources.total_pages
json.set! @resources.klass.model_name.collection do json.set! @resources.klass.model_name.collection do
json.array! @resources, partial: 'shotengai/share/product_simple', as: :products json.array! @resources, partial: 'shotengai/share/series_simple', as: :series
end end
json.extract! series, :id, :original_price, :price, json.extract! series, :id, :title, :original_price, :price,
:stock, :spec, :meta :stock, :spec, :cover_image, :banners, :meta, :detail, :shotengai_product_id
\ No newline at end of file \ No newline at end of file
json.extract! series, :id, :original_price, :price, json.extract! series, :id, :title, :original_price, :price,
:stock, :spec, :meta :stock, :spec, :cover_image, :meta, :shotengai_product_id
\ No newline at end of file \ No newline at end of file
json.extract! snapshot, :id, :original_price, :price, :count, json.extract! snapshot, :id, :original_price, :price, :count,
:total_price, :total_original_price, :revised_amount
:spec, :cover_image, :meta :spec, :cover_image, :meta
\ No newline at end of file
...@@ -6,7 +6,7 @@ module Shotengai ...@@ -6,7 +6,7 @@ module Shotengai
self.template_dir = 'shotengai/merchant/series/' self.template_dir = 'shotengai/merchant/series/'
default_query do |klass, params| default_query do |klass, params|
klass.where(shotengai_product_id: params) klass.where(shotengai_product_id: params[:product_id])
end end
private private
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment