mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-20 04:59:16 +00:00
Switching to using new prices on shop page
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
collection @products
|
||||
attributes :id, :name, :price, :permalink, :count_on_hand, :on_demand, :group_buy
|
||||
attributes :id, :name, :permalink, :count_on_hand, :on_demand, :group_buy
|
||||
node do |product|
|
||||
{notes: strip_tags(product.notes),
|
||||
description: strip_tags(product.description)}
|
||||
{
|
||||
notes: strip_tags(product.notes),
|
||||
description: strip_tags(product.description),
|
||||
price: product.master.price_with_fees(current_distributor, current_order_cycle)
|
||||
}
|
||||
end
|
||||
|
||||
child :supplier => :supplier do
|
||||
@@ -20,7 +23,12 @@ child :master => :master do
|
||||
end
|
||||
|
||||
child :variants => :variants do |variant|
|
||||
attributes :id, :is_master, :price, :count_on_hand, :options_text, :count_on_hand, :on_demand, :group_buy
|
||||
attributes :id, :is_master, :count_on_hand, :options_text, :count_on_hand, :on_demand, :group_buy
|
||||
node do |variant|
|
||||
{
|
||||
price: variant.price_with_fees(current_distributor, current_order_cycle)
|
||||
}
|
||||
end
|
||||
child :images => :images do
|
||||
attributes :id, :alt
|
||||
node do |img|
|
||||
|
||||
Reference in New Issue
Block a user