Ok, here it is, step by step installation, bug fix and testing!
Install instructions for Dual Pricing - Wholesale Pricing v1.9t
This version works on ZenCart 1.3.9.h as of Jan 15th 2011
**I'm not responsible for anything you do to your ZenCart, please backup your files and your database... in two locations.
**
Step 1 - download and extract
'dual_pricing_wholesale_pricing_1-7c.zip
located here:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_61&products_id=166
DO NOT use the install.sql.
Instead use the following SQL patch:
ALTER TABLE products ADD products_price_w VARCHAR( 150 ) DEFAULT '0' AFTER products_price;
ALTER TABLE products_attributes ADD options_values_price_w VARCHAR( 150 ) DEFAULT '0' AFTER options_values_price;
ALTER TABLE products_discount_quantity ADD discount_price_w VARCHAR( 150 ) DEFAULT '0' AFTER discount_price;
ALTER TABLE customers ADD customers_wholesale VARCHAR( 4 ) DEFAULT '0' NOT NULL AFTER customers_wholesale;
Step 2 - rename the 'control' folder to the name of your 'admin' folder.
Step 3 (Optional) - rename 'template_default' with the name of the template you are currently using.
Note: this will prevent overwriting the original Zen Cart core template file.
Step 4 - merge the new 'admin' folder and the 'includes' folder with your ZenCart install.
Step 5 (Optional) - download and unzip the attributes controller found here:
http://www.zen-cart.com/forum/showpost.php?p=982236&postcount=683
**attributes_controller.zip **
from: supersnow
Step 6 (Optional) - merge 'attributes_controller.php' to admin/attributes_controller.php in your ZenCart install.
Step 7 - You must first replace all instances of 'customer_whole' and 'customer_wholesale' with 'customers_whole' and 'customers_wholesale'
Step 8 - Replace all 'customers_whole" with 'customers_wholesale'
Step 9 - Remove the duplicate instances of 'customers_wholesale':
**delete line 100 in admin/customers.php** - $customers_wholesale = zen_db_prepare_input($_POST['customers_wholesale']);
**delete line 258 in admin/customers.php** - 'customers_wholesale' => $customers_wholesale
**remove duplicate 'c.customers_wholesale' in line 350 of admin.customers.php
**
**These files will be modified: **
includes/functions/functions_prices.php
includes/modules/products_quantity_discounts.php
includes/modules/pages/login/header_php.php
includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_product_info_display.php
admin/customers/php
includes/classes/shopping_cart.php
Step 10 - Add the following code to view Wholesale Price Level in the admin right listBox:
look in file - admin/customers.php for: $contents[] = array('text' => '<br />' . CUSTOMERS_REFERRAL . ' ' . $cInfo->customers_referral);
and add this line below it: $contents[] = array('text' => '<br />' . ENTRY_WHOLESALE_PRICING_LEVEL . ' ' . $cInfo->customers_wholesale);
Step 11 - Correct the variable in admin/customers.php:
search for: '$customers_query_raw'
you will find: 'customers_wholesale' at the end of the statement.
replace it with: 'c.customers_wholesale'
Step 12 - Ensure that you have uploaded all of the files in the package!
Step 13 - Log in to admin, go to customers/customers and notice the column 'Request Wholesale' defaults to 0.
**Step 14 **- Click on your test account name, notice the right listBox reads 'Wholesale pricing level 0'.
Step 15 - Edit your account and change the 'Wholesale pricing level' to 1, click update.
Step 16 - You will return to the admin page and see the value has changed in the 'Request Wholesale' column.
Step 17 - Click on Catalog, Select a Product, Add in a Wholesale Price (right below the 'Products Price (Gross)')
Step 18 - Log into your live ZenCart test account - like a customer would, you will see 'Whole Sale Price:' below the retail price of the product you added a wholesale price to in Step 17.
Step 19 - Thank me.
NOTES: Know that the login page (includes/modules/pages/login/header_php.php) holds the first 'switch' to find the 'customers_wholesale' price level. If the cart timed out or the switch didn't get turned on via the login page, the cart won't see the wholesale pricing level.
I thank you. Twitch.