Share » Forums » Setup & design » Shop and discount

Shop and discount

Shop and discount

Thursday 09 November 2006 9:22:10 am - 4 replies

Modified on Thursday 09 November 2006 9:22:57 am by laurent le cadet

Author Message

laurent le cadet

Thursday 09 November 2006 9:52:57 am

I'm thinking about adding this line to checkout.php :

eZUserDiscountRule::removeUser( $customerID );

...but don't know where...

Good idea (except kernel's dirty hack ?)

Clay Pereira

Thursday 09 November 2006 2:04:54 pm

You could modify the coupon extension that Björn Dieding submitted for this.

laurent le cadet

Friday 10 November 2006 1:34:48 am

Thanks for repplying but this is not a recent install (3.5.2) so I could'nt use this extension.

I think in my case it should be better to use the discount groups and removde users but don't know how.

:(

Laurent

laurent le cadet

Friday 10 November 2006 7:22:02 am

ok,

Quick and dirty, but it can be a basic for next steps foward :

checkout.php

include_once( "kernel/classes/ezuserdiscountrule.php" );

.............


$customer = $order->attribute( 'user_id' );
eZUserDiscountRule::removeUser( $customer );
include_once( 'kernel/classes/ezcontentcachemanager.php' );
eZContentCacheManager::clearAllContentCache();

back from paypal the user is removed from the discount group and the content cache is cleared to avoid confusion for the customer (strike prices, etc...) if he wants to goone buying while is still login.

Kernel's hack is not the best solution :( but it seems to works well like that :)))

Hope this help.

Regards.

Laurent

Ps : if someone has a hint to include that a cleaner way, that's will be welcome.

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

36 542 Users on board!

Forums menu