Skip to content

Fix save product master with variants#14355

Merged
danielkerr merged 1 commit intoopencart:masterfrom
vitorsreis:master
Jan 13, 2025
Merged

Fix save product master with variants#14355
danielkerr merged 1 commit intoopencart:masterfrom
vitorsreis:master

Conversation

@vitorsreis
Copy link
Copy Markdown
Contributor

Trying to use json_decodeon the indexes 'override' and 'variant', but in function getProducts, the json-string is already decoded into an array.

Triggering the errors:

Error: json_decode(): Argument #1 ($json) must be of type string, array given
File: .\admin\model\catalog\product.php
Line: 771

Backtrace: 0
File: .\admin\model\catalog\product.php
Line: 771
Function: json_decode

Backtrace: 1
File: .\system\engine\loader.php
Line: 343
Class: Opencart\Admin\Model\Catalog\Product
Function: editVariants

Backtrace: 2
File: .\system\engine\proxy.php
Line: 87
Class: Opencart\System\Engine\Loader
Function: Opencart\System\Engine\{closure}

Backtrace: 3
File: .\admin\controller\catalog\product.php
Line: 1261
Class: Opencart\System\Engine\Proxy
Function: __call

Backtrace: 4
File: .\system\engine\action.php
Line: 96
Class: Opencart\Admin\Controller\Catalog\Product
Function: save

Backtrace: 5
File: .\system\framework.php
Line: 259
Class: Opencart\System\Engine\Action
Function: execute

Backtrace: 6
File: .\admin\index.php
Line: 20
Function: require_once

@danielkerr danielkerr merged commit acf9050 into opencart:master Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants