mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-18 04:39:14 +00:00
Clear variants registry before reloading products - fixes fees not updating when changing order cycle
This commit is contained in:
@@ -10,8 +10,14 @@ Darkswarm.factory 'Products', ($resource, Enterprises, Dereferencer, Taxons, Pro
|
||||
|
||||
update: =>
|
||||
@loading = true
|
||||
@products = $resource("/shop/products").query (products)=>
|
||||
@extend() && @dereference()
|
||||
@products = []
|
||||
$resource("/shop/products").query (products)=>
|
||||
Variants.clear()
|
||||
|
||||
@products = products
|
||||
|
||||
@extend()
|
||||
@dereference()
|
||||
@registerVariants()
|
||||
@registerVariantsWithCart()
|
||||
@loading = false
|
||||
|
||||
Reference in New Issue
Block a user