PHP Add to Cart Help

I have an ecommerce site in PHP that I did not build that I am editing. There are 3 category pages that I do not want the "add to cart button or qty button to appear on. I am able to get this to happen on 1 page but I do not know how write the code to get it to work on all 3 category pages. The category pages are jewelry, accessories and scarves. I want it read "Please contact customer service to purchase items. Any help would be appreciated. I’ve tried different combinations of things but can not come up with the correct solution.

[php]// Add to cart or login
if (hasAccessByLevel(6, ‘LTE’, $userName) && $cat != “jewelry”){

if (isset($error)) {
echo ("<div class=“error”>

$error


“);
}
echo(”<form name=“addtocart” method=“post” action=“plugins/addtocart.php” id=“addtocart”><input name=“sku” type=“hidden” value="$product[sku]"/>");
if (isset($cat)){
echo("<input name=“category” type=“hidden” value="$cat"/>");
}
if (!empty($eCatalogReturnURL)){
echo("<input name=“eCatalogReturnURL” type=“hidden” value="$eCatalogReturnURL"/>");
}
echo("<td style=“padding-top:6px;”>Qty:
<input name=“qty” type=“text” id=“qty” value="$product[minimum]" maxlength=“4” style=“width:40px; margin-left:5px; margin-bottom:10px;”/>

<input type=“submit” name=“addtocart” value=“Add to Cart” class=“btn”/>");
if (!empty($eCatalogReturnURL)){
echo(“

If add to cart is successful, you will be redirected back to the flip-page catalog.

”);
}
} else {

if ($cat == “jewelry”) {
echo (“Please contact customer service to purchase Boutique items.”);
}

elseif ($displayType == "full") {
		  echo("<h3>You must log in to purchase this item:</h3><a class=\"btn\" href=\"register.php\" style=\"margin-right:7px;\" >Register</a><a class=\"btn\" href=\"login.php\">Log in</a>"); 
	   } elseif ($displayType == "basic") {
		  echo("<h3>You must log in to purchase this item:</h3><a class=\"btn\" href=\"javascript:self.close();\" onclick=\"window.opener.location.href='register.php';\" style=\"margin-right:7px;\" >Register</a><a class=\"btn\" href=\"javascript:self.close();\" onclick=\"window.opener.location.href='login.php';\">Log in</a>"); 
	   }

}

echo ("");[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service