fix : coupon

This commit is contained in:
2025-03-31 17:12:51 +08:00
parent 967e838713
commit 8d2b522345

View File

@@ -260,7 +260,7 @@ trait OrderTrait
protected function computePrice(): void
{
$this->orderRes['good_ids'] = $this->cartSecondData;
// var_dump($this->skuArr);
foreach ($this->cartSecondData as $oneCopies) {
$oneCopiesTotalPrice = '0.00';
@@ -272,7 +272,7 @@ trait OrderTrait
if (empty($oneCopiesGoodInfo[$key])) {
$oneCopiesGoodInfo[$key] = [
'num' => $oneGood,
'good_name' => $this->skuArr[$key]['spu_title'] ?? '' . $this->skuArr[$key]['title'] ?? '',
'good_name' => ($this->skuArr[$key]['spu_title'] ?? '').'-'.($this->skuArr[$key]['title'] ?? ''),
'good_url' => $this->skuArr[$key]['url'] ?? '',
'unit_price' => $this->skuArr[$key]['price'],
'type' => $this->skuArr[$key]['type'],