Sha256: 9333eedabebce0c2cadb89537ca5e22c36193e7dec95db271bb9c5076916417b

Contents?: true

Size: 374 Bytes

Versions: 10

Compression:

Stored size: 374 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
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_zoned-0.5.28 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.27 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.26 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.25 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.24 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.23 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.22 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.21 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.20 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.19 app/helpers/spree/admin/products_helper_decorator.rb