Skip to content

Commit c0d01a3

Browse files
author
Roman Ganin
committed
Merge remote-tracking branch 'origin/MAGETWO-35244' into develop
2 parents 3748b61 + b9a7a56 commit c0d01a3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dev/tools/performance-toolkit/fixtures/orders.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ public function execute()
7979
'sales_order_status_history',
8080
'Magento\Sales\Model\Resource\Order\Status\History'
8181
);
82-
82+
$eavEntityStoreTableName = $this->getTableName(
83+
'eav_entity_store',
84+
'\Magento\Eav\Model\Resource\Entity\Store'
85+
);
8386
/** @var \Magento\Store\Model\StoreManager $storeManager */
8487
$storeManager = $this->application->getObjectManager()->create('Magento\Store\Model\StoreManager');
8588
/** @var $category \Magento\Catalog\Model\Category */
@@ -176,7 +179,7 @@ public function execute()
176179
while ($entityId <= $ordersCount) {
177180
$queries = "";
178181

179-
$orderNumber = 100000000 + $entityId;
182+
$orderNumber = 100000000 * $productStoreId($entityId) + $entityId;
180183
$email = 'order_' . $entityId . '@example.com';
181184
$firstName = 'First Name';
182185
$lastName = 'Last Name';
@@ -192,6 +195,8 @@ public function execute()
192195
$simpleProductIdLen[0] = strlen($simpleProductId[0]($entityId));
193196
$simpleProductIdLen[1] = strlen($simpleProductId[1]($entityId));
194197

198+
$queries .= "INSERT INTO `{$eavEntityStoreTableName}` (`entity_store_id`, `entity_type_id`, `store_id`, `increment_prefix`, `increment_last_id`) VALUES ({$productStoreId($entityId)}, 5, {$productStoreId($entityId)}, '{$productStoreId($entityId)}', '{$orderNumber}') ON DUPLICATE KEY UPDATE `increment_last_id`='{$orderNumber}';";
199+
195200
$quoteId = $entityId;
196201
$queries .= "INSERT INTO `{$quoteTableName}` (`entity_id`, `store_id`, `created_at`, `updated_at`, `converted_at`, `is_active`, `is_virtual`, `is_multi_shipping`, `items_count`, `items_qty`, `orig_order_id`, `store_to_base_rate`, `store_to_quote_rate`, `base_currency_code`, `store_currency_code`, `quote_currency_code`, `grand_total`, `base_grand_total`, `checkout_method`, `customer_id`, `customer_tax_class_id`, `customer_group_id`, `customer_email`, `customer_prefix`, `customer_firstname`, `customer_middlename`, `customer_lastname`, `customer_suffix`, `customer_dob`, `customer_note`, `customer_note_notify`, `customer_is_guest`, `remote_ip`, `applied_rule_ids`, `reserved_order_id`, `password_hash`, `coupon_code`, `global_currency_code`, `base_to_global_rate`, `base_to_quote_rate`, `customer_taxvat`, `customer_gender`, `subtotal`, `base_subtotal`, `subtotal_with_discount`, `base_subtotal_with_discount`, `is_changed`, `trigger_recollect`, `ext_shipping_info`, `is_persistent`, `gift_message_id`) VALUES ({$quoteId}, {$productStoreId($entityId)}, '{$time}', '1970-01-01 03:00:00', NULL, 0, 0, 0, 2, 2.0000, 0, 0.0000, 0.0000, 'USD', 'USD', 'USD', 25.3000, 25.3000, 'guest', NULL, 3, 0, '{$email}', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, '127.0.0.1', '1', NULL, NULL, NULL, 'USD', 1.0000, 1.0000, NULL, NULL, 17.0000, 17.0000, 15.3000, 15.3000, 1, 0, NULL, 0, NULL);";
197202

0 commit comments

Comments
 (0)