mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Merge branch 'master' into bom
This commit is contained in:
@@ -2,6 +2,7 @@ angular.module("Checkout").controller "CheckoutCtrl", ($scope, $rootScope) ->
|
||||
$scope.require_ship_address = false
|
||||
$scope.shipping_method = -1
|
||||
$scope.payment_method = -1
|
||||
$scope.same_as_billing = true
|
||||
|
||||
$scope.shippingMethodChanged = ->
|
||||
$scope.require_ship_address = $("#order_shipping_method_id_" + $scope.shipping_method).attr("data-require-ship-address")
|
||||
|
||||
@@ -2,3 +2,10 @@ angular.module("Shop").controller "ProductsCtrl", ($scope, $rootScope, Product,
|
||||
$scope.data = Product.data
|
||||
$scope.order_cycle = OrderCycle.order_cycle
|
||||
Product.update()
|
||||
|
||||
$scope.productPrice = (product) ->
|
||||
if product.variants.length > 0
|
||||
prices = (v.price for v in product.variants)
|
||||
Math.min.apply(null, prices)
|
||||
else
|
||||
product.price
|
||||
|
||||
Reference in New Issue
Block a user