diff --git a/app/addons/master_products/controllers/frontend/checkout.pre.php b/app/addons/master_products/controllers/frontend/checkout.pre.php
index 29d1874eb79..70964b8986a 100644
--- a/app/addons/master_products/controllers/frontend/checkout.pre.php
+++ b/app/addons/master_products/controllers/frontend/checkout.pre.php
@@ -12,8 +12,6 @@
  * "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
  ****************************************************************************/
 
-use Tygh\Tygh;
-
 defined('BOOTSTRAP') or die('Access denied');
 
 /** @var string $mode */
@@ -24,24 +22,19 @@
             && !empty($_REQUEST['product_id'])
             && !empty($_REQUEST['product_data'])
         ) {
-            $product_data = $_REQUEST['product_data'];
             $master_product_id = $_REQUEST['product_id'];
 
             if (
-                !isset($product_data[$dispatch_extra]['product_options'])
-                && !empty($product_data[$master_product_id]['product_options'])
+                !isset($_REQUEST['product_data'][$dispatch_extra]['product_options'])
+                && !empty($_REQUEST['product_data'][$master_product_id]['product_options'])
             ) {
-                $product_data[$dispatch_extra]['product_options'] = $product_data[$master_product_id]['product_options'];
-
-                Tygh::$app['ajax']->assign('product_data', $product_data);
+                $_REQUEST['product_data'][$dispatch_extra]['product_options'] = $_REQUEST['product_data'][$master_product_id]['product_options'];
             }
 
-            if (!empty($product_data['custom_files'])) {
-                foreach ($product_data['custom_files'] as $files_key => $files_value) {
-                    $product_data['custom_files'][$files_key] = str_replace($master_product_id, $dispatch_extra, $files_value);
+            if (!empty($_REQUEST['product_data']['custom_files'])) {
+                foreach ($_REQUEST['product_data']['custom_files'] as $files_key => $files_value) {
+                    $_REQUEST['product_data']['custom_files'][$files_key] = str_replace($master_product_id, $dispatch_extra, $files_value);
                 }
-
-                Tygh::$app['ajax']->assign('product_data', $product_data);
             }
         }
     }
diff --git a/app/controllers/frontend/checkout.php b/app/controllers/frontend/checkout.php
index 48d1f17cd1c..77fdfc07516 100644
--- a/app/controllers/frontend/checkout.php
+++ b/app/controllers/frontend/checkout.php
@@ -20,7 +20,6 @@
 use Tygh\Shippings\Shippings;
 use Tygh\Storage;
 use Tygh\Tygh;
-use Tygh\Enum\ProfileFieldSections;
 
 defined('BOOTSTRAP') or die('Access denied');
 
@@ -58,32 +57,21 @@
             return [CONTROLLER_STATUS_REDIRECT, 'auth.login_form?return_url=' . urlencode($_REQUEST['return_url'])];
         }
 
-        /** @var \Tygh\Ajax $ajax */
-        $ajax = Tygh::$app['ajax'];
-        $product_data = $ajax->getAssignedVar('product_data', []);
-
-        if (
-            empty($product_data)
-            && !empty($_REQUEST['product_data'])
-        ) {
-            $product_data = $_REQUEST['product_data'];
-        }
-
         // Add to cart button was pressed for single product on advanced list
         if (!empty($dispatch_extra)) {
-            if (empty($product_data[$dispatch_extra]['amount'])) {
-                $product_data[$dispatch_extra]['amount'] = 1;
+            if (empty($_REQUEST['product_data'][$dispatch_extra]['amount'])) {
+                $_REQUEST['product_data'][$dispatch_extra]['amount'] = 1;
             }
-            foreach ($product_data as $key => $data) {
+            foreach ($_REQUEST['product_data'] as $key => $data) {
                 if ($key != $dispatch_extra && $key != 'custom_files') {
-                    unset($product_data[$key]);
+                    unset($_REQUEST['product_data'][$key]);
                 }
             }
         }
 
         $prev_cart_products = empty($cart['products']) ? [] : $cart['products'];
 
-        $added_product_ids = fn_add_product_to_cart($product_data, $cart, $auth);
+        $added_product_ids = fn_add_product_to_cart($_REQUEST['product_data'], $cart, $auth);
 
         $previous_state = md5(serialize($cart['products']));
         $cart['change_cart_products'] = true;
@@ -139,7 +127,7 @@
             } elseif (
                 is_array($added_product_ids)
                 && !in_array(
-                    array_keys($added_product_ids, key($product_data)),
+                    array_keys($added_product_ids, key($_REQUEST['product_data'])),
                     $cart['products']
                 )
             ) {
