From 1d292c406f6a618cc870991b0d0dace71db215c5 Mon Sep 17 00:00:00 2001 From: Turtuvshin Date: Fri, 16 Feb 2024 14:13:04 +0800 Subject: [PATCH 1/6] fixed category list --- server/src/Http/Resources/Category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/Http/Resources/Category.php b/server/src/Http/Resources/Category.php index e78648f..f112534 100644 --- a/server/src/Http/Resources/Category.php +++ b/server/src/Http/Resources/Category.php @@ -30,7 +30,7 @@ function ($parentCategory) { ), 'tags' => $this->tags ?? [], 'translations' => $this->translations ?? [], - 'products' => $this->when($request->has('with_products') || $request->inArray('with', 'products'), Product::collection($this->products)), + 'products' => $this->when($request->has('with_products') || $request->inArray('with', 'products'), $this->products ? Product::collection($this->products) : []), 'subcategories' => $this->when( $request->has('with_subcategories') || $request->inArray('with', 'subcategories'), array_map( From be4a8bcb55212517ef120c20c825ea4717bf13cd Mon Sep 17 00:00:00 2001 From: Turtuvshin Date: Mon, 19 Feb 2024 16:30:47 +0800 Subject: [PATCH 2/6] fixed gateway list --- addon/templates/settings/gateways.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/templates/settings/gateways.hbs b/addon/templates/settings/gateways.hbs index 5f6d158..7244e2b 100644 --- a/addon/templates/settings/gateways.hbs +++ b/addon/templates/settings/gateways.hbs @@ -15,7 +15,7 @@ - {{#each this.gateways as |gateway|}} + {{#each this.model as |gateway|}} From e68a3b823815a0e7081b06c63d38ea1aaafa57a2 Mon Sep 17 00:00:00 2001 From: Turtuvshin Date: Tue, 20 Feb 2024 14:40:19 +0800 Subject: [PATCH 3/6] fixed generate cash on delivery method --- server/src/Http/Controllers/v1/StoreController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/Http/Controllers/v1/StoreController.php b/server/src/Http/Controllers/v1/StoreController.php index 74a137b..cf20ede 100644 --- a/server/src/Http/Controllers/v1/StoreController.php +++ b/server/src/Http/Controllers/v1/StoreController.php @@ -109,7 +109,7 @@ public function gateways(Request $request) // if cod is enabled add cash as a gateway if ($about->hasOption('cod_enabled')) { - $gateways->push(Gateway::cash($sandbox)); + $gateways->push(Gateway::cash(['sandbox'=>$sandbox])); } return GatewayResource::collection($gateways); From 41d8335d3bf40517f7a6f2f256bdcbdc90fd80f7 Mon Sep 17 00:00:00 2001 From: Turtuvshin Date: Tue, 20 Feb 2024 17:11:22 +0800 Subject: [PATCH 4/6] fixed some translation keys --- addon/controllers/networks/index/network/index.js | 2 +- addon/controllers/products/index/category/new.js | 4 ++-- addon/templates/networks/index/network/index.hbs | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addon/controllers/networks/index/network/index.js b/addon/controllers/networks/index/network/index.js index 5d648e9..0bfb88c 100644 --- a/addon/controllers/networks/index/network/index.js +++ b/addon/controllers/networks/index/network/index.js @@ -89,7 +89,7 @@ export default class NetworksIndexNetworkIndexController extends Controller { this.model .save() .then(() => { - this.notifications.success(this.intl.t('storefront.controllers.networks.index.change-network-saved')); + this.notifications.success(this.intl.t('storefront.networks.index.network.index.change-network-saved')); }) .catch((error) => { this.notifications.serverError(error); diff --git a/addon/controllers/products/index/category/new.js b/addon/controllers/products/index/category/new.js index d630c75..d1ec626 100644 --- a/addon/controllers/products/index/category/new.js +++ b/addon/controllers/products/index/category/new.js @@ -140,10 +140,10 @@ export default class ProductsIndexCategoryNewController extends BaseController { @action makePrimaryFile(file) { if (file.isNotImage) { - return this.notifications.warning(this.intl.t('storefront.products.index.category.new.warning-only-select-an-image-file-to-be-primary')); + return this.notifications.warning(this.intl.t('storefront.products.index.new.warning-only-select-an-image-file-to-be-primary')); } - this.notifications.success(this.intl.t('storefront.products.index.category.new.made-the-primary-success-image', { fileName: file.original_filename })); + this.notifications.success(this.intl.t('storefront.products.index.new.made-the-primary-success-image', { fileName: file.original_filename })); this.product.primary_image_uuid = file.id; this.product.primary_image_url = file.url; this.product.primary_image = file; diff --git a/addon/templates/networks/index/network/index.hbs b/addon/templates/networks/index/network/index.hbs index 1cb8fe2..23c5274 100644 --- a/addon/templates/networks/index/network/index.hbs +++ b/addon/templates/networks/index/network/index.hbs @@ -183,7 +183,10 @@ }} {{#if @model.options.require_pod}} - +