DISPLAYING A BLOCK OF TEXT THAT TELLS THE BUYER WHICH SIZES ARE AVAILABLE FOR WHICH ITEMS - Aug 3rd, 2010


By using a “!” in the PHP code to indicate a “not” condition (red for visibility only) or blank field, we can
create the following matrix to print the 7 possible conditions for the 3 size choices :



<?php if ($record['8_oz_price'] && !$record['16_oz_price'] && !$record['64_oz_price']): ?>Available in the 8 ounce size
only.<?php endif ?>

<?php if (!$record['8_oz_price'] && $record['16_oz_price'] && !$record['64_oz_price']): ?>Available in the 16 ounce
(Pint) size only.<?php endif ?>

<?php if (!$record['8_oz_price'] && !$record['16_oz_price'] && $record['64_oz_price']): ?>Available in the 64 ounce
(Gallon) size only.<?php endif ?>

<?php if ($record['8_oz_price'] && $record['16_oz_price'] && !$record['64_oz_price']): ?>Available in the 8 ounce and 16
ounce (Pint) size only.<?php endif ?>

<?php if ($record['8_oz_price'] && !$record['16_oz_price'] && $record['64_oz_price']): ?>Available in the 8 ounce and 64
ounce (Gallon) size.<?php endif ?>

<?php if (!$record['8_oz_price'] && $record['16_oz_price'] && $record['64_oz_price']): ?>Available in the 16 ounce
(Pint) and 64 ounce (Gallon) size.<?php endif ?>

<?php if ($record['8_oz_price'] && $record['16_oz_price'] && $record['64_oz_price']): ?>Available in the 8 ounce, 16
ounce (Pint) and 64 ounce (Gallon) size.<?php endif ?>




The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service