2017-07-27 19 views

答えて

0

は、それがビューに私の自己 を解決しました/.../順/ item.phtmlはコードの下に追加

<div class="modal fade" id="myinfo-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> 
    <div class="modal-dialog"> 
     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 
     <div class="my-container">your text here 
    </div> 
</div> 
</div> 
    <script> 
require(['jQueryNoConflict'], function(jQuery){ 
    jQuery(document).ready(function() {      
       jQuery(document).on('show.bs.modal','#myinfo-modal', function (e) { 
    jQuery.ajax({ 
        url: '<your url here>', 
        type: 'POST', 
        data: {id: 3}, 
        success: function(response){ 
         jQuery('.my-container').html(response.success); 

        }, 
        error: function(){ 
         jQuery('.my-container').html("<your error msg here>"); 

        } 
        }); 
       }); 
}); }); 
ご注文/アイテム/レンダラで

は/コードの下に、このことができます

<a href="#" data-toggle="modal" data-target="#my-modal" data-id="2">View Modal Popup</a> 

希望を追加default.phtml!

関連する問題