Jump to content

Notify when available not working


Recommended Posts

  • 2 months later...

This is due to missing escape sequences. Open the file [presta_base]/modules/mailalerts/product.tpl and change

function  addNotification() {
   $.ajax({
       type: 'POST',
       url: '{$base_dir}modules/mailalerts/mailalerts-ajax_add.php',
       data: 'id_product={/literal}{$id_product}{literal}&id;_product_attribute='+$('#idCombination').val()+'&customer;_email='+$('#oos_customer_email').val()+'',
       success: function (msg) {
           if (msg == '1') {
               $('#mailalert_link').hide();
               $('#oos_customer_email').hide();
               $('#oosHook').html("{l s='Request notification registered' mod='mailalerts'}");
           }
       }
   });
   return false;
}{/literal}



enclosing {$base_dir} and {l s='Request notification registered' mod='mailalerts'} between {/literal}...{literal}

to:

function  addNotification() {
   $.ajax({
       type: 'POST',
       url: '{/literal}{$base_dir}{literal}modules/mailalerts/mailalerts-ajax_add.php',
       data: 'id_product={/literal}{$id_product}{literal}&id;_product_attribute='+$('#idCombination').val()+'&customer;_email='+$('#oos_customer_email').val()+'',
       success: function (msg) {
           if (msg == '1') {
               $('#mailalert_link').hide();
               $('#oos_customer_email').hide();
               $('#oosHook').html("{/literal}{l s='Request notification registered' mod='mailalerts'}{literal}");
           }
       }
   });
   return false;
}{/literal}



enclosing

{$base_dir}



and

{l s='Request notification registered' mod='mailalerts'}



between

{/literal}...{literal}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...