Skip to content

Commit

Permalink
remove duplicate gift cards
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshumishra31 committed Jun 26, 2018
1 parent 456226f commit a2fe59c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/spree/gift_cards_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2fe59c

Please sign in to comment.