Skip to content

Commit c15f43e

Browse files
committed
Add is_only_wholesale handling in ProductController store method
This commit updates the store method in the ProductController to include logic for setting the 'is_only_wholesale' attribute when a product is marked as wholesale. This enhancement allows for better differentiation of product types during the creation process, aligning with the recent addition of the 'is_only_wholesale' attribute in the Product model.
1 parent cd28c9f commit c15f43e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/Http/Controllers/Seller/ProductController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public function store(Request $request)
8181

8282
if($request->is_wholesale=="1"){
8383
$product->is_wholesale=true;
84+
if($request->is_only_wholesale=="1"){
85+
$product->is_only_wholesale=true;
86+
}
8487
$product->save();
8588
if ($request->has('wholesale_prices')) {
8689

0 commit comments

Comments
 (0)