Payment method: P.O. ONLY if a wholesale user? Possible?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
William M
Commander (CMDR)
Commander (CMDR)
Posts: 150
Joined: Sat Feb 14, 2009 9:40 am
Contact:

Payment method: P.O. ONLY if a wholesale user? Possible?

Post by William M » Thu Jun 11, 2009 6:52 am

Is it possible to show the PO method only if a shopper has been set up as a wholesale client, and has signed in?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Payment method: P.O. ONLY if a wholesale user? Possible?

Post by mazhar » Thu Jun 11, 2009 7:12 am

Edit your Checkout/PaymentForms/PurchaseOrder.ascx file and put following line of code in very start of Page_Load method

Code: Select all

this.Visible = (!Token.Instance.User.IsAnonymous && Token.Instance.User.IsInGroup(wholesaleGroupId));

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Payment method: P.O. ONLY if a wholesale user? Possible?

Post by kastnerd » Thu Jun 11, 2009 8:26 am

Cant you do this from the admin? Click on payment method, click selected groups and click the group you want?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Payment method: P.O. ONLY if a wholesale user? Possible?

Post by mazhar » Thu Jun 11, 2009 8:47 am

:oops: I haven't event think about that. Thanks kastnerd definitely if some one have created group for wholesale he should control it via making PO available only for specific wholesale group.

William M
Commander (CMDR)
Commander (CMDR)
Posts: 150
Joined: Sat Feb 14, 2009 9:40 am
Contact:

Re: Payment method: P.O. ONLY if a wholesale user? Possible?

Post by William M » Thu Jun 11, 2009 10:28 am

Thanks Mazhar for the fast response and fix, I'll save that if needed.

kastnerd, looks like that did it... the simple way.

Post Reply