Adding the bootstrap modal dialog box to Opencart 2.x after the "Add to cart" button is pushed -


i'm having problems opencart v2.x. need appear modal after "add cart" button pressed , product added cart.

so have line in parts.tpl changed:

<button type="button" class="cart" onclick="cart.add('<?php echo $part['id']; ?>');" data-toggle="modal" title="<?php echo $lang['to_cart']; ?>" class="btn btn-grn">               <i class="sprite sprite-cart-green"></i> <?php echo $lang['to_cart']; ?> </button> 

and in common.js i've added $('#bs-example-modal-lg').modal('show');line.

so, modal html part is:

<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="mylargemodallabel">   <div class="modal-dialog modal-lg" role="document">     <div class="modal-content">     <h1>this text</h1>     <button type="button" class="btn btn-default">default</button>     <button type="button" class="btn btn-primary">primary</button>     </div>   </div> </div> 

so after pressing "add cart" button product inserted in cart no modal shows up. do wrong ?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -