Sha256: cba199c7cdedcaa906a0dc8062011af9084dc6509732f349ce82de259ae90faa
Contents?: true
Size: 378 Bytes
Versions: 10
Compression:
Stored size: 378 Bytes
Contents
module Spree ProductsHelper.module_eval do def getCountryPrice(p) c = session[:zoned] && session[:zoned][:current_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
Version data entries
10 entries across 10 versions & 1 rubygems