de almacoop: recordar la página de confirmación al volverla a cargar

This commit is contained in:
f 2021-10-27 15:58:51 -03:00
parent fffc5e0267
commit 2ebc2db286

View file

@ -11,16 +11,18 @@ export default class extends CartBaseController {
if (!this.template) return if (!this.template) return
const order = this.cart.data.attributes if (this.storage.cart) {
const products = this.products
const site = await this.site()
const shipping_address = JSON.parse(this.storage.getItem('shipping_address'))
const data = { const order = this.cart.data.attributes
order, const products = this.products
products, const site = await this.site()
site, const shipping_address = JSON.parse(this.storage.getItem('shipping_address'))
shipping_address
const data = { order, products, site, shipping_address }
this.storage.setItem('confirmation', JSON.stringify(data))
} else {
data = JSON.parse(this.storage.getItem('confirmation'))
} }
this.render(data) this.render(data)