Ken Shea Posted July 21, 2023 Posted July 21, 2023 The button is there however it does nothing when clicked on desk top or tapped on phone. Is there a setting I've over looked? Thanks Ken Quote
jimdanforth Posted July 21, 2023 Posted July 21, 2023 I just made a post last night about this. that button will open a pop up for entering an email. Quote
Ken Shea Posted July 21, 2023 Author Posted July 21, 2023 Yes, that is what it should do, here it does absolutely nothing, your post indicates a least a response to click/tap but not a helpful one. Quote
jimdanforth Posted July 26, 2023 Posted July 26, 2023 Did you have any luck? I'm reaching a point that it would be very helpful to have a direct link available but if it's failing for you it may have a bigger problem. Quote
astecme Posted August 31, 2023 Posted August 31, 2023 I was about to post about the "Notify Button" does nothing till I saw this, guess it has not been sorted yet?@pandrei can you shed any light on this? Quote
CHD-UK Posted August 31, 2023 Posted August 31, 2023 Hi @astecme, @pandrei I've had a look into this and as far as I can tell it is a JavaScript timing problem which occurs with the "Furniture", "Print Shop" & "B2B" themes. For me at least, The "Notify me when in stock" button works on the Watch theme! Until this is resolved, as a work around you can add the following code to xxx/lib/frontend/themes/basic/boxes/product/buttons.tpl Goto line 50 and insert: <script type="text/javascript"> tl('{Info::themeFile('/js/main.js')}' , function(){ $('#btn-notify').on('click', function() { alertMessage(` <div class="notify-form"> {Html::beginForm(Yii::$app->urlManager->createUrl('catalog/product-notify'), 'get')|strip} <div class="middle-form"> <div class="heading-3">{$smarty.const.BACK_IN_STOCK}</div> <div class="col-full"><label>{$smarty.const.TEXT_NAME}<input type="text" id="notify-name"></label></div> <div class="col-full"><label>{$smarty.const.ENTRY_EMAIL_ADDRESS}<input type="text" id="notify-email"></label></div> <div class="center-buttons"><button type="submit" class="btn">{$smarty.const.NOTIFY_ME}</button></div> </div> {Html::endForm()} </div>`); $('.notify-form').closest('.alert-message').removeClass('alert-message'); $('.notify-form form').on('submit', function(){ ajax_notify_product(); return false; }); }); }); </script> Should look like this Save and refresh your browser. You need to make sure you are displaying a product that has no stock (or just raise the "out of stock level limit" in the product "main details" tab) Let me know how you get on pandrei 1 Quote
astecme Posted August 31, 2023 Posted August 31, 2023 8 hours ago, CHD-UK said: Hi @astecme, @pandrei I've had a look into this and as far as I can tell it is a JavaScript timing problem which occurs with the "Furniture", "Print Shop" & "B2B" themes. For me at least, The "Notify me when in stock" button works on the Watch theme! Until this is resolved, as a work around you can add the following code to xxx/lib/frontend/themes/basic/boxes/product/buttons.tpl Goto line 50 and insert: <script type="text/javascript"> tl('{Info::themeFile('/js/main.js')}' , function(){ $('#btn-notify').on('click', function() { alertMessage(` <div class="notify-form"> {Html::beginForm(Yii::$app->urlManager->createUrl('catalog/product-notify'), 'get')|strip} <div class="middle-form"> <div class="heading-3">{$smarty.const.BACK_IN_STOCK}</div> <div class="col-full"><label>{$smarty.const.TEXT_NAME}<input type="text" id="notify-name"></label></div> <div class="col-full"><label>{$smarty.const.ENTRY_EMAIL_ADDRESS}<input type="text" id="notify-email"></label></div> <div class="center-buttons"><button type="submit" class="btn">{$smarty.const.NOTIFY_ME}</button></div> </div> {Html::endForm()} </div>`); $('.notify-form').closest('.alert-message').removeClass('alert-message'); $('.notify-form form').on('submit', function(){ ajax_notify_product(); return false; }); }); }); </script> Should look like this Save and refresh your browser. You need to make sure you are displaying a product that has no stock (or just raise the "out of stock level limit" in the product "main details" tab) Let me know how you get on Thank you, works perfectly CHD-UK 1 Quote
pandrei Posted September 1, 2023 Posted September 1, 2023 21 hours ago, CHD-UK said: Until this is resolved, as a work around you can add the following code to Thanks! It is a good solution until the next version is released. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.