Usunięcie nieużywanych plików konfiguracyjnych i CSS z menedżera plików oraz uproszczenie przetwarzania wartości w klasach ShopProduct, Settings, Users, ShopPromotion, ShopCoupon, ShopProductSets i Dictionaries.
This commit is contained in:
@@ -15,17 +15,7 @@ class ShopCoupon
|
||||
public static function coupon_save()
|
||||
{
|
||||
$response = ['status' => 'error', 'msg' => 'Podczas zapisywania kuponu wystąpił błąd. Proszę spróbować ponownie.'];
|
||||
$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 );
|
||||
}
|
||||
$values = json_decode( \S::get( 'values' ), true );
|
||||
|
||||
if ( $values['categories'] != null )
|
||||
$categories = is_array( $values['categories'] ) ? json_encode( $values['categories'] ) : json_encode( [ $values['categories'] ] );
|
||||
|
||||
Reference in New Issue
Block a user