Jump to content

[SOLVED] This one is driving me insane- Problem with OR, maybe?


scott.stephan

Recommended Posts

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!

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.