Jump to content

Leo2

Members
  • Content count

    42
  • Joined

  • Last visited


Reputation Activity

  1. Like
    Leo2 reacted to sakwoya in Specials valid from   
    I've installed V1.0.4 of this and it works fine for me - however note the following:
     
    1) If you do not set an expiry date for the Special then it will not display in the store front as the new code in catalog/specials.php will exclude any specials where the expiry date = 0
    2) In the admin you may have to apply a Register Globals fix to the file specials.php as this apeared to prevent us from editing the dates for existing specials
    3) If you change the status of a special from 'on' to 'off' and then back to 'on' this will wipe the expiry date from your special (and it will not display in the storefront for the reason stated in (1)). To stop this happening you will have to edit the file catalog/admin/includes/functions/general.php at around line 739 find
     

    //// // Sets the status of a product on special function tep_set_specials_status($specials_id, $status) { if ($status == '1') { return tep_db_query("update " . TABLE_SPECIALS . " set status = '1', expires_date = NULL, date_status_change = NULL where specials_id = '" . (int)$specials_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_SPECIALS . " set status = '0', date_status_change = now() where specials_id = '" . (int)$specials_id . "'"); } else { return -1; } }
    change to:

    //// // Sets the status of a product on special function tep_set_specials_status($specials_id, $status) { // if ($status == '1') { // return tep_db_query("update " . TABLE_SPECIALS . " set status = '1', expires_date = NULL, date_status_change = NULL where specials_id = '" . (int)$specials_id . "'"); if ($status == '1') { return tep_db_query("update " . TABLE_SPECIALS . " set status = '1', date_status_change = now() where specials_id = '" . (int)$specials_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_SPECIALS . " set status = '0', date_status_change = now() where specials_id = '" . (int)$specials_id . "'"); } else { return -1; } }
    Graeme
×