Great mod, Just need a little help with the marketing text on the product info page. I am trying to understand the following from your FAQ page on your site:
If you have used the apply_special_category_discount() or apply_special_item_discount() exits, you should add text below the call to the get_*() method you use to describe these special cases. As a convenience, each of the get_* methods now takes a product and category id, so you can modify the get_* function you're using in ot_quantity_discount.php to be aware of your exit logic. Alternately, you may make these messages conditional in your template using the logic described in
my conditional messages tip.
What text should I be adding as I am using apply_special_category_discount. I have the following in my product info page using the examples from the conditional message to display the discount using the example 2 method.
Code:
<?php
if ( ($current_category_id != 6) &&
($current_category_id != 5) &&
($current_category_id != 1)&&
($current_category_id != 10) )
{
$value = "ot_quantity_discount.php";
include_once(zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] .
'/modules/order_total/', $value, 'false'));
include_once(DIR_WS_MODULES . "order_total/" . $value);
$discount = new ot_quantity_discount();
if ($discount->check() > 0) {
echo '<div class="content" id="discountPolicy3">';
//echo '<h2>' . STORE_POLICY . '</h2>';
echo '<table border="1" bgcolor="#FFFF66"><tr><td>Quantity</td><td>Discount</td></tr>';
$dislist = $discount->get_discount_parms();
for ($i = 0; $i < sizeof($dislist); $i++) {
echo '<tr><td>' . $dislist[$i]['level'];
if ($i == (sizeof($dislist) - 1)) {
echo " + " ;
} else {
echo " - ";
echo $dislist[$i+1]['level'] - 1;
}
echo "</td><td>" . $dislist[$i]['discount'] . "</td></tr>";
}
echo '</table>';
echo '<br /></div>';
}
}
?>
<?php
if ( ($current_category_id == 10) ||
($current_category_id == 6) )
{
** WHAT CODE DO I PUT HERE TO DISPLAY THE apply_special_category_discount FOR THE CATID OF 10 & 6 ***
}
?>
The first section shows the global quantity discount I set up in the admin under the order totals area. The second conditional section is to display the apply_special_category_discount for the particular cat I set up in the ot_quantity_discount.php. But I am confused in what code I need to put so it displays the discounts for these special categories and not the global discount. Please help and I don't understand your statement that I quoted above.
Bookmarks