diff --git a/app/Http/Livewire/BillingPortalPurchasev2.php b/app/Http/Livewire/BillingPortalPurchasev2.php index 099e7f8c4f04..f7f4d1ba79dc 100644 --- a/app/Http/Livewire/BillingPortalPurchasev2.php +++ b/app/Http/Livewire/BillingPortalPurchasev2.php @@ -322,6 +322,7 @@ class BillingPortalPurchasev2 extends Component 'total' => $total, 'qty' => $qty, 'is_recurring' => true, + 'product_image' => $p->product_image, ]); } diff --git a/app/Models/Product.php b/app/Models/Product.php index bf8847db8804..34f9fee8014a 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -39,6 +39,8 @@ class Product extends BaseModel 'in_stock_quantity', 'stock_notification_threshold', 'stock_notification', + 'max_quantity', + 'product_image', ]; protected $touches = []; diff --git a/app/Transformers/ProductTransformer.php b/app/Transformers/ProductTransformer.php index 12fa8ddf9aa8..3d0247da0002 100644 --- a/app/Transformers/ProductTransformer.php +++ b/app/Transformers/ProductTransformer.php @@ -93,6 +93,8 @@ class ProductTransformer extends EntityTransformer 'in_stock_quantity' => (int) $product->in_stock_quantity ?: 0, 'stock_notification' => (bool) $product->stock_notification, 'stock_notification_threshold' => (int) $product->stock_notification_threshold, + 'max_quantity' => (int) $product->max_quantity, + 'product_image' => (string) $product->product_image ?: '', ]; } } diff --git a/database/migrations/2023_02_07_114011_add_additional_product_fields.php b/database/migrations/2023_02_07_114011_add_additional_product_fields.php new file mode 100644 index 000000000000..4b0760722b42 --- /dev/null +++ b/database/migrations/2023_02_07_114011_add_additional_product_fields.php @@ -0,0 +1,31 @@ +unsignedInteger("max_quantity")->nullable(); + $table->string("product_image", 191)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}; diff --git a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php index b5398e952937..2adb5cfcf1e4 100644 --- a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php @@ -36,9 +36,9 @@ @if(!empty($subscription->recurring_product_ids)) @foreach($recurring_products as $index => $product)