Received this via PM (please always ask questions in the forum so everyone can benefit):

Originally Posted by
PM_SENDER
Hi,
I'm about to install Dual Pricing on zen cart store to have one group of retail customers and one group of wholesalers with different product prices..
The problem is that I'd like to offer only some shipping options and payments options to wholesalers.
In this thread
https://www.zen-cart.com/showthread....ther-questions
I see that you have an add-on for table shipping module.
I'd like to modify other modules (and payment modules) adding to them some code to run a check at the beginning based on the fact that $_SESSION['customer_whole'] is 0 for customers and 1 for wholesalers in Dual Pricing.
The problem is that I'd not know how to set that check.
Could you please help me with the code?
Thank you very much,
PM_SENDER
The way I would do this would be to modify the includes/modules/payment/ or includes/modules/shipping/ files.
I'll use money order payment method for the example:
Change something like:
PHP Code:
$this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);
if enabling for wholesale customers ONLY:
PHP Code:
$this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True' && $_SESSION['customer_whole'] == 1) ? true : false);
or for retail ONLY:
PHP Code:
$this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True' && $_SESSION['customer_whole'] != 1) ? true : false);
**NOTE how it is != 1 versus == 0**