YePix Posted October 30, 2017 Share Posted October 30, 2017 can someone help me to create a script with which I can open a popup on this link. <?php if (DISPLAY_CART == 'false') { echo tep_draw_button(IMAGE_BUTTON_PROD_ATTRIBUTES, 'lightbulb', tep_href_link(FILENAME_ATTRIBUTE_POPUP, 'products_id=' . $all_products['products_id']) . '"target="_blanc"' ); }else{ } ?> I would like the window to have the size 300 to 650. Can not handle it. how do I ask if a product has attributes so that I can show the button with echo? Thanks Link to comment Share on other sites More sharing options...
Mikepo Posted October 31, 2017 Share Posted October 31, 2017 Hi this opens a new window, put it in template_bottom.php file <script> $(document).ready(function(){ $('a[href*="your_file.php"]').click(function(){ window.open(this.href, height=pixels, width=pixels); return false; }); }); </script> Hope that helps! osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!) Link to comment Share on other sites More sharing options...
YePix Posted October 31, 2017 Author Share Posted October 31, 2017 Thank you. But how do I integrate it so that the link works too? In this popup the product attributes are selected Unfortunately I have no idea about the javascript Link to comment Share on other sites More sharing options...
Mikepo Posted October 31, 2017 Share Posted October 31, 2017 @Yepi changing the href to the complete string you have derived using tep_href_link will open a new window, but how to pass that from php to the java script I'm not sure. The script was posted for a starter for 10. unfortunately, this is where my knowledge ends. Regards Mike osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!) Link to comment Share on other sites More sharing options...
YePix Posted October 31, 2017 Author Share Posted October 31, 2017 I thank you. The beginning is already done Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.