This is a start on blocking the option_value_id for the various pages/email etc.
There will be a lot of places that you need to code for this and each set of code will use a different variable to test for ...
Let's say you want to block options_values_id 45 and 46 ...
Example, tpl_shopping_cart_default:
Code:
<?php
echo $product['attributeHiddenField'];
if (isset($product['attributes']) && is_array($product['attributes'])) {
echo '<div class="cartAttribsList">';
echo '<ul>';
reset($product['attributes']);
foreach ($product['attributes'] as $option => $value) {
?>
<?php // echo '<pre>'; echo var_dump($value); echo '</pre>'; ?>
<?php
if ($value['options_values_id'] == 45 || $value['options_values_id'] == 46) {
// skip
} else {
?>
<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>
<?php } ?>
<?php
}
echo '</ul>';
echo '</div>';
}
?>
Example, tpl_checkout_confirmation_default.php
Code:
<?php // now loop thru all products to display quantity and price ?>
<?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { ?>
<tr class="<?php echo $order->products[$i]['rowClass']; ?>">
<td class="cartQuantity"><?php echo $order->products[$i]['qty']; ?> x</td>
<td class="cartProductDisplay"><?php echo $order->products[$i]['name']; ?>
<?php echo $stock_check[$i]; ?>
<?php // if there are attributes, loop thru them and display one per line
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0 ) {
echo '<ul class="cartAttribsList">';
for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
?>
<?php // echo '<pre>'; echo var_dump($order->products[$i]['attributes']); echo '</pre>'; ?>
<?php
if ($order->products[$i]['attributes'][$j]['value_id'] == 45 || $order->products[$i]['attributes'][$j]['value_id'] == 46) {
// skip
} else {
?>
<li><?php echo $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])); ?></li>
<?php } ?>
<?php
} // end loop
echo '</ul>';
} // endif attribute-info
?>
Now you have emails, My History page(s), etc.
I would suggest leave them in there for the Admin so there is no question on what was ordered or not ordered by the customer ...
Bookmarks