Clear variants registry before reloading products - fixes fees not updating when changing order cycle

This commit is contained in:
Rohan Mitchell
2015-07-28 12:00:40 +10:00
parent ee65452de3
commit 7caebb11e2
2 changed files with 27 additions and 4 deletions

View File

@@ -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