Sha256: 2dce7b93b607f463e8c2d472353e3e59fd1da6460310271c03d691de4a0c19e4
Contents?: true
Size: 407 Bytes
Versions: 10
Compression:
Stored size: 407 Bytes
Contents
module Spree module Admin ProductsHelper.module_eval do def getCPrice(p) c = session[:zoned] && session[:zoned][:prd_country] c = c ? c.to_i : 0 return p.price if c == 0 zpl = Spree::Zoned::Product.where "spree_product_id = ? AND spree_country_id = ?", p.id, c zpl == [] ? p.price : (zpl[0].cprice.nil? ? p.price : zpl[0].cprice) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems