From a2fe59cc7ea8a90c2211be73c0aeb77b4d1aae39 Mon Sep 17 00:00:00 2001 From: Himanshu Date: Tue, 26 Jun 2018 17:29:26 +0530 Subject: [PATCH] remove duplicate gift cards --- app/controllers/spree/gift_cards_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/spree/gift_cards_controller.rb b/app/controllers/spree/gift_cards_controller.rb index eb65f430..863fca45 100644 --- a/app/controllers/spree/gift_cards_controller.rb +++ b/app/controllers/spree/gift_cards_controller.rb @@ -61,7 +61,7 @@ def load_gift_card def find_gift_card_variants gift_card_product_ids = Product.not_deleted.where(is_gift_card: true).pluck(:id) - @gift_card_variants = Variant.joins(:prices).where(["amount > 0 AND product_id IN (?)", gift_card_product_ids]).order("amount") + @gift_card_variants = Variant.joins(:prices).where(["amount > 0 AND product_id IN (?) AND currency = (?)", gift_card_product_ids, Spree::Config.currency]).order("amount") end def gift_card_params