Hello All:
I have two groups set up for my shop, "Retail" and "Member". I am trying to set up a box that shows a "join" teaser to those not logged in, and to "Retail" shoppers. I want the content to be different for logged in "Members".
Following is the code I have written for the box, and I just can't get it to work. Any help on this syntax problem would be greatly appreciated.
It's the "if...&&..." statement that is giving me problems. I can make it work with one condition (logged in), but not both.<?php
$boxHeading = 'Membership';
$boxContent_attributes = ' align="center"';
$boxLink = '';
$boink=(tep_db_query("select customers_group_name from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'"));
if (tep_session_is_registered('customer_id')) && ($boink='Member') {
$boxContent = 'The prices you see when logged in reflect a 25% savings over regular retail prices.';
} else {
$boxContent = '<a href="http://www.otherdomain.com"><img src="http://www.mydomain.com/images/join.gif" border="0" alt="Buy a Membership" title="membership" width="150" height=""><br>Learn More!</a>';
}
require(DIR_WS_TEMPLATES . TEMPLATENAME_BOX);
$boxLink = '';
$boxContent_attributes = '';
?>
I thought the $boink name would avoid conflictions with other reserved names.
Thanks in advance
Spice





LinkBack URL
About LinkBacks






Bookmarks