Skip to content

Commit 0d8486f

Browse files
committed
MC-5373: Product couldn't be pulled to CMS Page when it was assigned to a specific website
Append store_id dynamically based on selected scope in store id preview converter
1 parent 2aa5355 commit 0d8486f

File tree

2 files changed

+7
-3
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web

2 files changed

+7
-3
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/converter/attribute/preview/store-id.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/converter/attribute/preview/store-id.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* See COPYING.txt for license details.
44
*/
55

6+
import $ from "jquery";
67
import {DataObject} from "../../../data-store";
78
import ConverterInterface from "../../converter-interface";
89

@@ -33,6 +34,8 @@ export default class StoreId implements ConverterInterface {
3334
return "";
3435
}
3536

36-
return (data[name] as string).replace(/\}\}$/, " store_id=\"0\"}}");
37+
const storeId = $('[data-role="store-view-id"]').val() || "0";
38+
39+
return (data[name] as string).replace(/}}$/, ` store_id="${storeId}"}}`);
3740
}
3841
}

0 commit comments

Comments
 (0)