I tried the code and my site went away, whoops! I hate when that happens
any obvious errors? too many of these { thingys maybe?
PHP Code:
////
// Display Price Retail
// Specials and Tax Included
function zen_get_products_display_price($products_id) {
global $db, $currencies;
$free_tag = "";
$call_tag = "";
//test
$products_quantity = zen_get_products_display_price($products_id);
if $products_quantity <= 0 {
$return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT, BUTTON_SOLD_OUT_ALT);
return $return_button
}
// 0 = normal shopping
// 1 = Login to shop
// 2 = Can browse but no prices
// verify display of prices
switch (true) {
case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
// customer must be logged in to browse
return '';
break;
case (CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == ''):
// customer may browse but no prices
return TEXT_LOGIN_FOR_PRICE_PRICE;
break;
case (CUSTOMERS_APPROVAL == '3' and TEXT_LOGIN_FOR_PRICE_PRICE_SHOWROOM != ''):
// customer may browse but no prices
return TEXT_LOGIN_FOR_PRICE_PRICE_SHOWROOM;
break;
case ((CUSTOMERS_APPROVAL_AUTHORIZATION != '0' and CUSTOMERS_APPROVAL_AUTHORIZATION != '3') and $_SESSION['customer_id'] == ''):
// customer must be logged in to browse
return TEXT_AUTHORIZATION_PENDING_PRICE;
break;
case ((CUSTOMERS_APPROVAL_AUTHORIZATION != '0' and CUSTOMERS_APPROVAL_AUTHORIZATION != '3') and $_SESSION['customers_authorization'] > '0'):
// customer must be logged in to browse
return TEXT_AUTHORIZATION_PENDING_PRICE;
break;
default:
// proceed normally
break;
}
// show case only
Bookmarks