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

Version Path
spree_zoned-0.5.38 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.37 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.36 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.35 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.34 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.33 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.32 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.31 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.30 app/helpers/spree/admin/products_helper_decorator.rb
spree_zoned-0.5.29 app/helpers/spree/admin/products_helper_decorator.rb