With regard to the different products selected by different stores in php, the order after unified payment.

in a mall website, there are different merchants. When the buyer goes to buy something, he buys one item from store 1 and adds it to the shopping cart, and then chooses an item from 2 stores to join the shopping cart, 3 stores and 4 stores. And so on, when the purchase is finished, go to pay. Here, whether Alipay, Wechat, and other payers, in the face of unified payment for so many goods, they will give a unified order number, that is, {1 store: 123456 shop 2 store: 78910 line 3 store: 741852.} this is the only order number for each item without payment, and it will be converted into one again. For example, {1 shop: 123456Magne2 shop: 78910jiao 3 shop: 741852.} = "987654123", through this to complete the payment. When the payment is completed, it will be the only order number {1 shop: 123456Jue 2 shop: 78910jue 3 shop: 741852}. In the face of a unified order number, it must be based on the same order number at the time of refund, and the comparative payment merchant only recognizes this
order number. At this time, how to make a refund according to {1 store: 123456 Mague 2 shop: 78910 Magi 3 shop: 741852.} this order number to refund, rather than according to the same order number to refund?

Php
Apr.07,2021

this is a problem at the data design level. You can do this
1. The order table is divided into the parent order table and the child order table. The parent order table stores what you call a unified order number, while the child order table stores the orders of store 1, store 2 and store 3. You should show the merchant the order number of the sub-order table
2. When the user chooses to return and exchange goods, you should pass in the order number of the sub-order table and continue the various logical operations of return and exchange

.

you can take a look at my e-commerce related design article https://blog.fastrun.cn/shop_.
for reference only

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ccc3-2c34c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ccc3-2c34c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?