Jump to content

Please assist with provide discount before certain date only


Jeniveve

Recommended Posts

I asked this once b4 and the answer seemed to work but now the discount is being caclulated again...I wanted the discount to stop after April 15...The below code doesn't work, can someone help???

}
       if(date("j") < 14) {
            $before = $cost*.05;
            $before = round($before,2);
            $cost = $cost-$before;
        }

 

Thank you in advance for ANY help that can be provided.  :happy-03:

Jennifer

I just plugged this into a script and it calculates full cost. Today date("j") is '28', so I don't see why you should have any issue with that script today. Based on the code you provided the discount would start again on May 1. 

 

What do you get if you echo date("j") from your server? Could the date on the server be incorrect??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.