Refactor value handling in multiple classes to improve data processing and maintainability
This commit is contained in:
@@ -26,7 +26,17 @@ class ShopProduct
|
||||
{
|
||||
global $lang_id;
|
||||
|
||||
$values = json_decode( \S::get( 'values' ), true );
|
||||
$values_tmp = json_decode( \S::get( 'values' ), true );
|
||||
|
||||
$values = [];
|
||||
|
||||
foreach ( $values_tmp as $item )
|
||||
{
|
||||
$name = $item['name'];
|
||||
$value = $item['value'];
|
||||
$keys = \S::parse_name( $name );
|
||||
\S::set_array_value( $values, $keys, $value );
|
||||
}
|
||||
|
||||
foreach( $values as $key => $val )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user