I would like to show a message when user select any specific custom option in Magento 1.9.
I have two checkbox options: 'disposal' and 'installation'.
Current Issue
At the moment I can only show the message based on the headline title of the custom option, which is 'Delivery Options' (please see current code below).
Desired Result
If the custom option states 'disposal' I would like the message 'please disconnect device' to appear underneath. If the custom option states 'installation' I would like the message 'please connect device' to appear underneath.
select.phtml code requiring edit/update
<?php if ($_option->getTitle() == 'Delivery Options')
echo '<p>Please disconnect device for disposal.
<br>Please connect device for installation.</p>' ?>
select.phtml code in full
<?php /* @var $this Mage_Catalog_Block_Product_View_Options_Type_Select */ ?>
<?php $_option = $this->getOption() ?>
<dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label></dt>
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
<div class="input-box">
<?php echo $this->getValuesHtml() ?>
<?php if ($_option->getTitle() == 'Delivery Options')
echo '<p>Please ensure device is disconnected and empty prior to disposal collection.<br>Please ensure you have the correct fittings in place for installation (i.e. plumbing, power points etc.)</p>' ?>
<?php echo $_option->getLabel() ?>
<?php if ($_option->getIsRequire()): ?>
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?>
<span id="options-<?php echo $_option->getId() ?>-container"></span>
<?php endif; ?>
<?php endif;?>
</div>
</dd>
Can anyone please suggest an update to my select.phtml file below, to get this working as desired? I presume it will be a jquery on click event.