scott.stephan Posted July 17, 2009 Share Posted July 17, 2009 I cannot figure out what's going on here. Basically- If the SAU ("Saleable Unit") is equal to CS (Case) or PK2 (Pack of 2), the Category should be W (Wholesale) Else, if the SAU is EA ("Each"), Category should be "C" (Consumer). But EVERYTIME, even if the SAU is = "EA" it defaults to "W". What's going on here?! //Get category type- Wholesale Orders will ALWAYS be in CS/PK2, Consumer will ALWAYS be in EA. $sau=$row[sau_ID]; $category=""; echo "SAU is $sau <br/>"; //I THINK THE ORS ARE THE ISSUE if($sau == 'CS' || 'PK2'){ $category="W"; } else if($sau == 'EA'){ $category="C"; } Here's the output: CURR SKU IS 17020001 with [b]SAU EA[/b] MULTIPLIER IS: 1 SKU BEFORE STR REPLACE Seriously Strawberry Jam SKU AFTER STR REPLACE Seriously Strawberry Jam PRE EXPLODE NOTES ARE: B LINE: 17020001,Seriously Strawberry Jam,1,1 FULL LINE: 100367,07/17/2009,W,5, , ,SWU11, ,100164,FAKE NAME,45 FAKE Street ,New FAKESVILLE,NY,66666,USA,FAKE NAME,FAKE,45 FAKEStreet ,FAKECity,NY,66666,USA,FAKENAME, ,17020001,Seriously Strawberry Jam,1,1 I cannot figure out what's happening. Help! Quote Link to comment https://forums.phpfreaks.com/topic/166330-solved-this-one-is-driving-me-insane-problem-with-or-maybe/ Share on other sites More sharing options...
rhodesa Posted July 17, 2009 Share Posted July 17, 2009 if($sau == 'CS' || $sau == 'PK2'){ or if(in_array($sau,array('CS','PK2'))){ Quote Link to comment https://forums.phpfreaks.com/topic/166330-solved-this-one-is-driving-me-insane-problem-with-or-maybe/#findComment-877095 Share on other sites More sharing options...
scott.stephan Posted July 17, 2009 Author Share Posted July 17, 2009 Ugh. Why did that never occur to me? Thanks so much. Solution: Don't be a goof Quote Link to comment https://forums.phpfreaks.com/topic/166330-solved-this-one-is-driving-me-insane-problem-with-or-maybe/#findComment-877100 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.