Zen Cart Logo
Forums / Bug Reports / [Fixed v1.5.1] Incorrect database constant used in tpl_account_default.php

[Fixed v1.5.1] Incorrect database constant used in tpl_account_default.php

Locked

Views: 1,246

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
31 Jul 2012, 12:21 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

[Fixed v1.5.1] Incorrect database constant used in tpl_account_default.php

The file tpl_account_default.php is currently using the constant SHOW_NEWSLETTER_UNSUBSCRIBE_LINK to determine whether or not to display the newsletter unsubscribe link in the customer's account settings. That constant is described as Show "Newsletter Unsubscribe" link in the "Information" side-box?. The correct constant to use in the customer's account settings is ACCOUNT_NEWSLETTER_STATUS, which defines whether or not to display the newsletter sign-up for the customer's account.

The current code, starting at line 65, reads:

<?php
  if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK !='false' or CUSTOMERS_PRODUCTS_NOTIFICATION_STATUS !='0') {
?>
<h2><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></h2>
<ul id="myAccountNotify" class="list">
<?php
  if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK=='true') {
?>

and should be changed to

<?php
  if (ACCOUNT_NEWSLETTER_STATUS != '0' or CUSTOMERS_PRODUCTS_NOTIFICATION_STATUS !='0') {
?>
<h2><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></h2>
<ul id="myAccountNotify" class="list">
<?php
  if (ACCOUNT_NEWSLETTER_STATUS != '0') {
?>
19 Sep 2012, 2:35 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: [Fixed v1.5.1] Incorrect database constant used in tpl_account_default.php

Fixed in v1.5.1