← All changes
|
app/Services/Integrations/FluentCart/Http/Controller/FluentCartController.php
+4
-3
2.2.5
→
2.5.0
View file →
| @@ -8,8 +8,9 @@ | ||
| 8 | 8 | use FluentCart\App\Models\Product as CartProduct; |
| 9 | 9 | use FluentCart\App\Models\ProductDetail as CartProductDetail; |
| 10 | 10 | use FluentCart\App\Models\ProductVariation as CartProductVariant; |
| 11 | 11 | use FluentCart\App\Services\Permission\PermissionManager as CartPermission; |
| 12 | +use FluentBooking\App\Services\CurrenciesHelper; | |
| 12 | 13 | use FluentBooking\App\Services\Integrations\FluentCart\CartHelper; |
| 13 | 14 | use FluentBooking\Framework\Support\Arr; |
| 14 | 15 | |
| 15 | 16 | class FluentCartController extends Controller |
| @@ -43,10 +44,10 @@ | ||
| 43 | 44 | |
| 44 | 45 | $detailData = [ |
| 45 | 46 | 'post_id' => $createdPostId, |
| 46 | 47 | 'fulfillment_type' => 'digital', |
| 47 | - 'min_price' => $price * 100, | |
| 48 | - 'max_price' => $price * 100, | |
| 48 | + 'min_price' => CurrenciesHelper::toCents($price), | |
| 49 | + 'max_price' => CurrenciesHelper::toCents($price), | |
| 49 | 50 | ]; |
| 50 | 51 | |
| 51 | 52 | $productDetail = CartProductDetail::create($detailData); |
| 52 | 53 | |
| @@ -58,9 +59,9 @@ | ||
| 58 | 59 | 'payment_type' => 'onetime', |
| 59 | 60 | 'total_stock' => 1, |
| 60 | 61 | 'available' => 1, |
| 61 | 62 | 'fulfillment_type' => 'digital', |
| 62 | - 'item_price' => $price * 100, | |
| 63 | + 'item_price' => CurrenciesHelper::toCents($price), | |
| 63 | 64 | 'other_info' => [ |
| 64 | 65 | 'description' => '', |
| 65 | 66 | 'payment_type' => 'onetime', |
| 66 | 67 | 'times' => '', |