Skip to content

Commit 530a3a4

Browse files
committed
Update
- Fixed: missing product when category is deleted
1 parent 334edaf commit 530a3a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/Crud/ProductCrud.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class ProductCrud extends CrudService
4444
*/
4545
public $relations = [
4646
[ 'nexopos_users as user', 'nexopos_products.author', '=', 'user.id' ],
47-
[ 'nexopos_products_categories as category', 'nexopos_products.category_id', '=', 'category.id' ],
4847
'leftJoin' => [
48+
[ 'nexopos_products_categories as category', 'nexopos_products.category_id', '=', 'category.id' ],
4949
[ 'nexopos_products as parent', 'nexopos_products.parent_id', '=', 'parent.id' ],
5050
[ 'nexopos_taxes_groups as taxes_groups', 'nexopos_products.tax_group_id', '=', 'taxes_groups.id' ],
5151
],
@@ -658,6 +658,7 @@ public function setActions( $entry, $namespace )
658658
$entry->type = $entry->type === 'materialized' ? __( 'Materialized' ) : __( 'Dematerialized' );
659659
$entry->stock_management = $entry->stock_management === 'enabled' ? __( 'Enabled' ) : __( 'Disabled' );
660660
$entry->status = $entry->status === 'available' ? __( 'Available' ) : __( 'Hidden' );
661+
$entry->category_name = $entry->category_name ?: __( 'Unassigned' );
661662
// you can make changes here
662663
$entry->{'$actions'} = [
663664
[

config/nexopos.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
return [
3-
'version' => '4.6.18',
3+
'version' => '4.6.19',
44
'languages' => [
55
'en' => 'English',
66
'fr' => 'Français',

0 commit comments

Comments
 (0)