[ic] daily special offer rotation

Ron Phipps ron at endpoint.com
Tue Mar 25 12:27:59 EST 2008

Marko Kuzio wrote:
> hello,
> my goal is an daily special offer rotation. i have an external table 
> (offer_rotation) with follow shema:
> sku, display_date, price
> if call the customer the flypage, i look to the table offer_rotation if
> an entry for sku and display date exists (lookup with [query sql]),
> im displaying an special offer image and the new price.
> now, i have the follow problems:
> on the flypage i can displaying the new price, but in the basket and 
> checkout pages are only the real old price from the main product db 
> available. i search a process which can change the price (from 
> offer_rotation) in the card, basket and checkout pages.
> How can in manipulate the prices, with the external db process 
> offer_rotations?
> any idea's ????????
> thx and greats, mak

You can create a tag, let's call it "product-promo-price" which will return the promotion price and then call this tag from your CommonAdjust string.  Here is something we are doing on one of our clients:

CommonAdjust [product-promo-price], ;:price, ==:options

UserTag product-promo-price Order sku quantity
UserTag product-promo-price Routine <<EOR
sub {
    my ($sku, $quantity) = @_;
    my $price = 0;

    $sku = $sku || $item->{code};
    $quantity = $quantity || $item->{quantity} || 1;

    # do some lookup of the price and return it, if there is no promo price return 0

    return $price;

How this works is CommonAdjust will return the first non 0 price.  So it first calls product-promo-price, if it's 0 then it will fallback to the price in the products table.

You can read up more about CommonAdjust here:


Ron Phipps
End Point Corporation
ron at endpoint.com

More information about the interchange-users mailing list