Skip to content

Commit

Permalink
Resolved Conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-webkul committed May 14, 2024
2 parents ccc62d5 + 3113df0 commit 49139c6
Show file tree
Hide file tree
Showing 89 changed files with 1,200 additions and 1,222 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Develop and deploy your next headless commerce storefronts with Next JS and Bagi

Revolutionize Your Online Store with Bagisto's Open Source eCommerce Mobile

![enter image description here](https://raw.githubusercontent.com/bagisto/temp-media/master/git-hub-banner.png)
![enter image description here](https://raw.githubusercontent.com/bagisto/temp-media/master/open-source-ecommerce-mobile.png)

Mobile eCommerce powered by Flutter & Laravel: https://github.com/bagisto/opensource-ecommerce-mobile-app

Expand Down
106 changes: 77 additions & 29 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- [Updating Dependencies](#updating-dependencies)
- [The `Webkul\Checkout\Cart` class](#the-cart-class)
- [The `Webkul\Product\Type\Configurable` class](#the-configurable-type-class)
- [Shop API Response Updates](#the-shop-api-response-updates)

## Medium Impact Changes
Expand All @@ -15,13 +16,15 @@
- [The System Configuration Updates](#the-system-config-update)
- [The `Webkul\Checkout\Models\Cart` model](#the-cart-model)
- [The Checkout Tables Schema Updates](#the-checkout-tables-schema-updates)
- [The `Webkul\DataGrid\DataGrid` class](#the-datagrid-class)
- [The `Webkul\Product\Repositories\ElasticSearchRepository` Repository](#the-elastic-search-repository)
- [The `Webkul\Product\Repositories\ProductRepository` Repository](#the-product-repository)
- [The Sales Tables Schema Updates](#the-sales-tables-schema-updates)
- [The `Webkul\Sales\Repositories\OrderItemRepository` Repository](#the-order-item-repository)
- [The `Webkul\Tax\Helpers\Tax` Class Moved](#moved-tax-helper-class)
- [Shop Event Updates](#shop-event-updates)
- [Shop Customized Datagrid Parameters Updated](#shop-customized-datagrid-parameters-updated)
- [Shop Class HTML Attribute updated](#shop-class-attribute-updated)

## Low Impact Changes

Expand All @@ -32,7 +35,7 @@
- [Moved `coupon.blade.php`](#moved-coupon-blade)
- [Renamed Shop API Route Names](#renamed-shop-api-routes-names)
- [Renamed Shop Controller Method Names](#renamed-shop-controller-method-names)
- [Renamed Admin View render event Names](#renamed-admin-view-render-event-names)
- [Renamed Admin View Render Event Names](#renamed-admin-view-render-event-names)

## Upgrading To v2.2.0 From v2.1.0

Expand All @@ -55,26 +58,6 @@ Laravel's HTTP client now requires curl 7.34.0 or greater.

There is no dependency needed to be updated at for this upgrade.

### Admin

#### Admin Customized Datagrid Header Parameters Updated

### Updating Dependencies

**Impact Probability: High**

#### PHP 8.2.0 Required

Laravel now requires PHP 8.1.0 or greater.

#### curl 7.34.0 Required

Laravel's HTTP client now requires curl 7.34.0 or greater.

#### Composer Dependencies

There is no dependency needed to be updated at for this upgrade.

<div class="content-list" markdown="1">
</div>

Expand Down Expand Up @@ -134,20 +117,26 @@ There is no dependency needed to be updated at for this upgrade.

In this example, the `repository` option has been replaced with `options`, which is defined as a closure returning an array of options. Adjust the closure to populate the select field options as needed.

3. The Inventory Stock Options configuration has been relocated to the Order Settings configuration, and the respective path for retrieving configuration values has been updated accordingly

```diff
- core()->getConfigData('catalog.inventory.stock_options.back_orders')
+ core()->getConfigData('sales.order_settings.stock_options.back_orders')
```

<a name="renamed-admin-api-routes-names"></a>
#### Renamed Admin API Route Names

**Impact Probability: Low**

1. In the `packages/Webkul/Admin/src/Routes/sales-routes.php` route file, route names and controller methods have been renamed to provide clearer and more meaningful representations.


```diff
- Route::post('update-qty/{order_id}', 'updateQty')->name('admin.sales.refunds.update_qty');
+ Route::post('update-totals/{order_id}', 'updateTotals')->name('admin.sales.refunds.update_totals');

<a name="renamed-admin-view-render-event-names"></a>
#### Admin View render event Names updated
#### Renamed Admin View Render Event Names

**Impact Probability: Low**

Expand Down Expand Up @@ -327,7 +316,6 @@ In this example, the `repository` option has been replaced with `options`, which
+ }
```


<a name="removed-cart-traits"></a>
#### Removed Cart Traits

Expand All @@ -343,15 +331,13 @@ All methods from the following traits have been relocated to the `Webkul\Checkou

</div>


<a name="the-cart-class"></a>
#### The `Webkul\Checkout\Cart` class

**Impact Probability: High**

1. The `initCart` method now accepts an optional `Webkul\Customer\Models\Customer` model instance and initializes the cart based on this parameter.


```diff
- public function initCart()
+ public function initCart(?CustomerContract $customer = null): void
Expand Down Expand Up @@ -427,6 +413,52 @@ All methods from the following traits have been relocated to the `Webkul\Checkou
```



<a name="datagrid"></a>
### DataGrid

<a name="the-datagrid-class"></a>
#### The `Webkul\DataGrid\DataGrid` Class

**Impact Probability: Medium**

1. We have made some of the methods in this class private. Here are the methods, please have a look.

```diff
- public function validatedRequest(): array
+ private function validatedRequest(): array

- public function processRequestedFilters(array $requestedFilters)
+ private function processRequestedFilters(array $requestedFilters)

- public function processRequestedSorting($requestedSort)
+ private function processRequestedSorting($requestedSort)

- public function processRequestedPagination($requestedPagination): LengthAwarePaginator
+ private function processRequestedPagination($requestedPagination): LengthAwarePaginator

- public function processRequest(): void
+ private function processRequest(): void

- public function sanitizeRow($row): \stdClass
+ private function sanitizeRow($row): \stdClass

- public function formatData(): array
+ private function formatData(): array

- public function prepare(): void
+ private function prepare(): void
```

2. We have deprecated the 'toJson' method. Instead of 'toJson', please use the 'process' method.

```diff
- app(AttributeDataGrid::class)->toJson();
+ datagrid(AttributeDataGrid::class)->process();
```



<a name="notification"></a>
### Notification

Expand All @@ -442,6 +474,8 @@ All methods from the following traits have been relocated to the `Webkul\Checkou
+ public function getAll(array $params = [])
```



<a name="product"></a>
### Product

Expand All @@ -464,7 +498,6 @@ All methods from the following traits have been relocated to the `Webkul\Checkou
+ public function getFilters(array $params): array
```


<a name="the-product-repository"></a>
#### The `Webkul\Product\Repositories\ProductRepository` Repository

Expand Down Expand Up @@ -508,6 +541,23 @@ If you've implemented your own product type or overridden existing type classes,

2: Please update your `prepareForCart` and `validateCartItem` methods to include the `*_incl_tax` columns for managing inclusive tax calculation for your product type. You can refer to the `Webkul\Product\Type\AbstractType` class and adjust your class accordingly.

<a name="the-configurable-type-class"></a>
#### The `Webkul\Product\Type\Configurable` Class

**Impact Probability: High**

1. We've removed the following methods from the `Webkul\Product\Type\Configurable` class as we no longer support default configurable variants.

```diff
- public function getDefaultVariant()

- public function getDefaultVariantId()

- public function setDefaultVariantId()

- public function updateDefaultVariantId()
```


<a name="Sales"></a>
### Sales
Expand Down Expand Up @@ -698,7 +748,6 @@ If you've implemented your own product type or overridden existing type classes,

1. The routes names have been renamed for consistency in the `packages/Webkul/Shop/src/Routes/api.php` route file.


```diff
- Route::get('', 'index')->name('api.shop.customers.account.addresses.index');
+ Route::get('', 'index')->name('shop.api.customers.account.addresses.index');
Expand Down Expand Up @@ -869,7 +918,6 @@ If you've implemented your own product type or overridden existing type classes,

2: The new class for handling shipping tax inclusion now includes two additional methods: `isInclusiveTaxShippingPrices` and `getShippingOriginAddress`.


```diff
+ public function isInclusiveTaxShippingPrices(): bool

Expand Down
39 changes: 18 additions & 21 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 13 additions & 19 deletions packages/Webkul/Admin/src/Config/system.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,25 +331,6 @@
'name' => 'admin::app.configuration.index.catalog.title',
'info' => 'admin::app.configuration.index.catalog.info',
'sort' => 2,
], [
'key' => 'catalog.inventory',
'name' => 'admin::app.configuration.index.catalog.inventory.title',
'info' => 'admin::app.configuration.index.catalog.inventory.info',
'icon' => 'settings/store.svg',
'sort' => 1,
], [
'key' => 'catalog.inventory.stock_options',
'name' => 'admin::app.configuration.index.catalog.inventory.stock-options.title',
'info' => 'admin::app.configuration.index.catalog.inventory.stock-options.title-info',
'sort' => 1,
'fields' => [
[
'name' => 'back_orders',
'title' => 'admin::app.configuration.index.catalog.inventory.stock-options.allow-back-orders',
'type' => 'boolean',
'channel_based' => true,
],
],
], [
'key' => 'catalog.products',
'name' => 'admin::app.configuration.index.catalog.products.title',
Expand Down Expand Up @@ -1531,6 +1512,19 @@
'locale_based' => true,
],
],
], [
'key' => 'sales.order_settings.stock_options',
'name' => 'admin::app.configuration.index.sales.order-settings.stock-options.title',
'info' => 'admin::app.configuration.index.sales.order-settings.stock-options.title-info',
'sort' => 2,
'fields' => [
[
'name' => 'back_orders',
'title' => 'admin::app.configuration.index.sales.order-settings.stock-options.allow-back-orders',
'type' => 'boolean',
'channel_based' => true,
],
],
], [
'key' => 'sales.invoice_settings',
'name' => 'admin::app.configuration.index.sales.invoice-settings.title',
Expand Down

0 comments on commit 49139c6

Please sign in to comment.