Refactor value handling in multiple classes for improved data processing

This commit is contained in:
2024-10-30 09:38:37 +01:00
parent 9e05750801
commit ee240f7dbd
25 changed files with 364 additions and 25 deletions

View File

@@ -18,6 +18,8 @@ class ShopOrder
{
global $mdb;
file_put_contents( 'tpay.txt', print_r( $_POST, true ) . print_r( $_GET, true ), FILE_APPEND );
if ( \S::get( 'tr_status' ) == 'TRUE' and \S::get( 'tr_crc' ) )
{
$order = new \shop\Order( 0, \S::get( 'tr_crc' ) );

View File

@@ -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 )
{