mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-07 10:35:17 +00:00
Fix xml du panier
This commit is contained in:
parent
ecf0c71a14
commit
ef52dd792c
@ -199,9 +199,12 @@ class Basket(models.Model):
|
|||||||
("PBX_TYPECARTE", "CB"),
|
("PBX_TYPECARTE", "CB"),
|
||||||
("PBX_TIME", datetime.now().replace(microsecond=0).isoformat("T")),
|
("PBX_TIME", datetime.now().replace(microsecond=0).isoformat("T")),
|
||||||
]
|
]
|
||||||
cart = {"shoppingcart": {"total": min(self.items.count(), 99)}}
|
cart = {
|
||||||
cart = dict2xml(cart, newlines=False)
|
"shoppingcart": {"total": {"totalQuantity": min(self.items.count(), 99)}}
|
||||||
cart = '<?xml version="1.0" encoding="UTF-8" ?>' + cart
|
}
|
||||||
|
cart = '<?xml version="1.0" encoding="UTF-8" ?>' + dict2xml(
|
||||||
|
cart, newlines=False
|
||||||
|
)
|
||||||
data += [
|
data += [
|
||||||
("PBX_SHOPPINGCART", html.escape(cart)),
|
("PBX_SHOPPINGCART", html.escape(cart)),
|
||||||
("PBX_BILLING", html.escape(customer.billing_infos.to_3dsv2_xml())),
|
("PBX_BILLING", html.escape(customer.billing_infos.to_3dsv2_xml())),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user