Jump to content

Mail Alter for product available suddenly giving error


hurray

Recommended Posts

Hi,

Version 1.5.6.2

This morning I was going through my website and found an error.

On mail alter module, I have checked Product Availability (Gives the customer the option of receiving a notification when an out-of-stock product is available again).

But suddenly this is giving me an error which is being displayed on the product page. Following is the error:

-------------

Notice: Undefined index: quan in /home/savdanac/public_html/cache/smarty/compile/87/9e/e7/879ee725fa3cfb1d580be3d886242a16ff32cf72.file.product.tpl.php on line 101

Notice: Trying to get property of non-object in /home/savdanac/public_html/cache/smarty/compile/87/9e/e7/879ee725fa3cfb1d580be3d886242a16ff32cf72.file.product.tpl.php on line 101

--------------------

What is going on here?

 

 

Link to comment
Share on other sites

Nobody can help you because we cannot look at your files.

The first you should take is to open this cache file and look what is happening at line 101. Then you can open your product.tpl file and find the same code there (the cache is just a processed version of the original). Looking at that code you should have at least some idea of what is going wrong.

I don't know your template and its product.tpl file. But it could be that that "quan" index is some typo of you

Link to comment
Share on other sites

Hi Musicmaster,

Thank you for your help.

I checked the cache file and on line 101 I found this code:

<?php if (($_smarty_tpl->tpl_vars['quan']->value==0)){?>

Now I don't know which product.tpl file I should check as there seems to be many of them.

 

 

Link to comment
Share on other sites

I have absolutely no idea what I am looking at.

The cache file has 114 line and product.tpl has more than 1200 lines. What is strange is everything was working just fine just a couple of days ago.

Now on mail-alert module,  I have to uncheck notify me when product becomes available again option, if I don't want this error to show on my webpage.

On cache file,  from line 101 to the end the code looks like this:

<?php if (($_smarty_tpl->tpl_vars['quan']->value==0)){?>
<!-- MODULE MailAlerts -->
<?php if (isset($_smarty_tpl->tpl_vars['email']->value)&&$_smarty_tpl->tpl_vars['email']->value){?>


    <input type="text" id="oos_customer_email" name="customer_email"  value="<?php echo smartyTranslate(array('s'=>'[email protected]','mod'=>'mailalerts'),$_smarty_tpl);?>
" class="mailalerts_oos_email" onclick="clearText();" /><br />

<?php }?>
<a href="#" onclick="return addNotification();" id="mailalert_link"><?php echo smartyTranslate(array('s'=>'Notify me when available','mod'=>'mailalerts'),$_smarty_tpl);?>
</a>
<span id="oos_customer_email_result" style="display:none;"></span>
<!-- END : MODULE MailAlerts -->
<?php }?><?php }} ?>

 

 

 

Link to comment
Share on other sites

2 minutes ago, hurray said:

There is no $quan  anywhere in product.tpl file.

So you mean I should delete the file 879ee725fa3cfb1d580be3d886242a16ff32cf72.file.product.tpl.php  ?

Then you might search for quan without a dollar.

Yes, delete it. You can look further if the problem comes back.

Link to comment
Share on other sites

There is neither "quan" nor "$quan" on product.tpl file.

And I deleted the file from the cache and it did not do anything. The error is still there. Please check the attached file. To not get the error I have to uncheck the option on mail alert module.

 

ScreenHunter 56.png

Link to comment
Share on other sites

My shop is savdana.com

Clearning cache many time did not fix it.

I have uninstalled and reinstalled Mail Alert module and it still gives an error.

Now I checked the back-office and saw a second error. When I ship customer's item I send them an email from back-office. Now it is giving this error:

Notice: Undefined index: is_new_for_me in /home/savdanac/public_html/cache/smarty/compile/2e/7b/90/2e7b901eb49a7624bf47670689185100bdeac734.file.view.tpl.php on line 1271
>
Notice: Undefined index: is_new_for_me in /home/savdanac/public_html/cache/smarty/compile/2e/7b/90/2e7b901eb49a7624bf47670689185100bdeac734.file.view.tpl.php on line 1272

 

Could it be related to the server, an email server problem, may be? It's been happening for a week now.

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

I am really puzzled why you take so long to solve this.

When I find such a problem I take some code fragment from the cache and search for it in my website with Astrogrep. Some code may be processed so it may take a few tries. And you have to search the whole site as the text may be elsewhere like with the modules or overrides. This seldom takes me more than half an hour.

Link to comment
Share on other sites

4 minutes ago, hurray said:

I am not a tech savy so do not know where to start with this.

Searching text is not exactly rocket science.

But this is something template specific for which someone needs to look at the code. You would need to be very lucky that your problem is seen by someone one the forum who has the same template and experienced the same problem.

So you can either ask the provider of the template (or the mail alert module) or hire someone who you then give access to your system so that he can have a look himself.

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