Skip to content

Commit 624de59

Browse files
store id issue fixed with multishipping checkout
1 parent 1bae0d8 commit 624de59

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

app/code/Magento/Quote/Model/Quote/Address/Item.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
* @method \Magento\Quote\Model\Quote\Address\Item setSuperProductId(int $value)
4747
* @method int getParentProductId()
4848
* @method \Magento\Quote\Model\Quote\Address\Item setParentProductId(int $value)
49+
* @method int getStoreId()
50+
* @method \Magento\Quote\Model\Quote\Address\Item setStoreId(int $value)
4951
* @method string getSku()
5052
* @method \Magento\Quote\Model\Quote\Address\Item setSku(string $value)
5153
* @method string getImage()
@@ -168,6 +170,8 @@ public function importQuoteItem(\Magento\Quote\Model\Quote\Item $quoteItem)
168170
$quoteItem->getProductId()
169171
)->setProduct(
170172
$quoteItem->getProduct()
173+
)->setStoreId(
174+
$quoteItem->getStoreId()
171175
)->setSku(
172176
$quoteItem->getSku()
173177
)->setName(

app/code/Magento/Quote/etc/db_schema.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@
352352
comment="Super Product Id"/>
353353
<column xsi:type="int" name="parent_product_id" padding="10" unsigned="true" nullable="true" identity="false"
354354
comment="Parent Product Id"/>
355+
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
356+
comment="Store Id"/>
355357
<column xsi:type="varchar" name="sku" nullable="true" length="255" comment="Sku"/>
356358
<column xsi:type="varchar" name="image" nullable="true" length="255" comment="Image"/>
357359
<column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
@@ -394,6 +396,8 @@
394396
<constraint xsi:type="foreign" referenceId="QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID_QUOTE_ITEM_ITEM_ID"
395397
table="quote_address_item" column="quote_item_id" referenceTable="quote_item"
396398
referenceColumn="item_id" onDelete="CASCADE"/>
399+
<constraint xsi:type="foreign" referenceId="QUOTE_ADDRESS_ITEM_STORE_ID_STORE_STORE_ID" table="quote_address_item" column="store_id"
400+
referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
397401
<index referenceId="QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS_ID" indexType="btree">
398402
<column name="quote_address_id"/>
399403
</index>
@@ -403,6 +407,9 @@
403407
<index referenceId="QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID" indexType="btree">
404408
<column name="quote_item_id"/>
405409
</index>
410+
<index referenceId="QUOTE_ADDRESS_ITEM_STORE_ID" indexType="btree">
411+
<column name="store_id"/>
412+
</index>
406413
</table>
407414
<table name="quote_item_option" resource="checkout" engine="innodb" comment="Sales Flat Quote Item Option">
408415
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="true"

app/code/Magento/Quote/etc/db_schema_whitelist.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@
212212
"product_id": true,
213213
"super_product_id": true,
214214
"parent_product_id": true,
215+
"store_id": true,
215216
"sku": true,
216217
"image": true,
217218
"name": true,
@@ -233,13 +234,15 @@
233234
"index": {
234235
"QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS_ID": true,
235236
"QUOTE_ADDRESS_ITEM_PARENT_ITEM_ID": true,
236-
"QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID": true
237+
"QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID": true,
238+
"QUOTE_ADDRESS_ITEM_STORE_ID": true
237239
},
238240
"constraint": {
239241
"PRIMARY": true,
240242
"QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS_ID_QUOTE_ADDRESS_ADDRESS_ID": true,
241243
"QUOTE_ADDR_ITEM_PARENT_ITEM_ID_QUOTE_ADDR_ITEM_ADDR_ITEM_ID": true,
242-
"QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID_QUOTE_ITEM_ITEM_ID": true
244+
"QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID_QUOTE_ITEM_ITEM_ID": true,
245+
"QUOTE_ADDRESS_ITEM_STORE_ID_STORE_STORE_ID": true
243246
}
244247
},
245248
"quote_item_option": {

0 commit comments

Comments
 (0)