Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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

Posted

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.

  • 1 month later...
Posted

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?

Posted

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

image.thumb.png.1abef059209c73724626fce78c7ba666.png

 

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

 

 

 

Posted
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

image.thumb.png.1abef059209c73724626fce78c7ba666.png

 

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

Posted
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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...