Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3659 มุมมอง

I am trying to programmatically add a description / note to each line item a user adds to the cart. The description is influenced by the users options on previously selected on a form so I cannot have this be a static setting on the backend.

request.website.sale_get_order(force_create=1)._cart_update(
            product_id=int(product.id),
            add_qty=float(post.get('add_qty')),
            attributes={'description': 'this is a note that shows up in the cart on the line item'},
            line_id=int(item_num)
        )
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 19
3729
0
ม.ค. 24
1056
0
เม.ย. 23
1580
1
ธ.ค. 23
1500
3
พ.ค. 24
23793