uc discounts integration for 6.x

duntuk - December 18, 2008 - 03:27
Project:Ubercart Ajax Attribute Calculations
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

the module works great...

however, it doesn't update the (displayed) discounted price (and amount saved ['amount']) with uc discounts (http://drupal.org/project/uc_discounts)

here's my code which works fine by itself:

<div id="cart-price">

<?php
$normalAmount
= $node->sell_price;

if (
$node->discounts != NULL) {
foreach (
$node->discounts as $discountListing) {

$discountedAmount = $discountListing['amount'];
$discountedDescription = $discountListing['description'];
$discountedTotal = ($normalAmount - $discountedAmount);
?>

<h4 class="price-regular"><s>Regular Price: <span><?php print uc_currency_format($normalAmount); ?></span></s></h4>
<p class="discount-description"><?php print $discountedDescription; ?></p>
<h4 class="price-saved">You save: <span><?php print uc_currency_format($discountedAmount); ?></span></h4>
<h4 class="price-final">Discounted Price: <span><?php print $node->content['display_price']['#value'] ?></span></h4>

<?php } } else { ?>
<h4 class="sell_price price-final">Price: <span><?php print $node->content['display_price']['#value']; ?></span></h4>
<?php } ?>

</div><!-- /#cart-price -->

<div id="cart-add">
<?php print $node->content['add_to_cart']["#value"]; ?>
</div><!-- /#cart-add -->

#1

cYu - December 18, 2008 - 15:20
Status:active» duplicate
 
 

Drupal is a registered trademark of Dries Buytaert.