Issue regarding APP bridge modal

Issue regarding APP bridge modal

Shopify Partner
1 0 0

We have facing an issue with the modal appbridge

In our app, all the actions are working properly but only modal are not working.we have set modal action on the button click event 

here is code,

<a class="add-shopify uppercase" href="#" data-product-id="0000" onclick="return addtoshopify('0000')">Add</a>

<script src="" async></script>
<script src=""></script>
<script src=""></script>
var AppBridge = window['app-bridge'];
var actions = AppBridge.actions;
var createApp = AppBridge.default;

var ShopifyApp = createApp({
apiKey: '<?php echo SHOPIFY_API_KEY; ?>',
shopOrigin: '<?php echo $_SESSION['shop']; ?>',
debug: false,
forceRedirect: false,
allowfullscreen: true
var Button = actions.Button;
var TitleBar = actions.TitleBar;
var Modal = actions.Modal;

function addtoshopify(id){
var Modal = actions.Modal;
var modalOptions = {
title: 'My Modal',
message: 'Hello world!',
var myModal = Modal.create(ShopifyApp, modalOptions);




Replies 0 (0)