Refactor value handling in multiple classes for improved data processing
This commit is contained in:
@@ -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' ) );
|
||||
|
||||
@@ -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