de almacoop: recordar la página de confirmación al volverla a cargar
This commit is contained in:
parent
fffc5e0267
commit
2ebc2db286
1 changed files with 11 additions and 9 deletions
|
@ -11,16 +11,18 @@ export default class extends CartBaseController {
|
||||||
|
|
||||||
if (!this.template) return
|
if (!this.template) return
|
||||||
|
|
||||||
|
if (this.storage.cart) {
|
||||||
|
|
||||||
const order = this.cart.data.attributes
|
const order = this.cart.data.attributes
|
||||||
const products = this.products
|
const products = this.products
|
||||||
const site = await this.site()
|
const site = await this.site()
|
||||||
const shipping_address = JSON.parse(this.storage.getItem('shipping_address'))
|
const shipping_address = JSON.parse(this.storage.getItem('shipping_address'))
|
||||||
|
|
||||||
const data = {
|
const data = { order, products, site, shipping_address }
|
||||||
order,
|
|
||||||
products,
|
this.storage.setItem('confirmation', JSON.stringify(data))
|
||||||
site,
|
} else {
|
||||||
shipping_address
|
data = JSON.parse(this.storage.getItem('confirmation'))
|
||||||
}
|
}
|
||||||
|
|
||||||
this.render(data)
|
this.render(data)
|
||||||
|
|
Loading…
Reference in a new issue