eZ Community » Forums » Developer » is it possible to make shop discount...
expandshrink

is it possible to make shop discount rule on number of items

is it possible to make shop discount rule on number of items

Tuesday 11 January 2011 4:56:20 pm

I need to apply XX% discount to basket item, if user orders more than X items.

 

I made trigger "shop addtobasket after", there i thought all order items

foreach($basket->productCollection()->itemList() as $item)

{
  if($item->attribute( 'item_count') > $xxx)
  {
    $item->setAttribute( 'discount', $discountValue );

    $item->store();
  }
}


Debug print shows that values are updated.
But when shop/basket page is called , discounts are reset back to 0.

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from