Major Big Bug Fix here!

the variable 'customers_whole' was not consistently written throughout the current install package for 1.3.9h!!!

there are two ways to correct this, by doing a find for the words 'customer_whole' and replacing it with 'customers_whole' (plural)

or

follow the list i made below:

includes/functions/functions_prices.php

from line 120
// is there a products_price to add to attributes
if ($_SESSION['customer_whole']) {
if ($_SESSION['customer_whole'] != '0') {
$i = (int)$_SESSION['customer_whole'];
to:
// is there a products_price to add to attributes
if ($_SESSION['customers_whole']) {
if ($_SESSION['customers_whole'] != '0') {
$i = (int)$_SESSION['customers_whole'];


from line 154
if ($_SESSION['customer_whole']) {
if ($_SESSION['customer_whole'] != '0') {
$i = (int)$_SESSION['customer_whole'];
to:
if ($_SESSION['customers_whole']) {
if ($_SESSION['customers_whole'] != '0') {
$i = (int)$_SESSION['customers_whole'];


from line 1302
if ($_SESSION['customer_whole']) {
if ($_SESSION['customer_whole'] != '0') {
$i = (int)$_SESSION['customer_whole'];
to:
if ($_SESSION['customers_whole']) {
if ($_SESSION['customers_whole'] != '0') {
$i = (int)$_SESSION['customers_whole'];


includes/modules/products_quantity_discounts.php

from line 101
// percentage discount
case '1':
if ($products_discount_type_from == '0') {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
// percentage discount
case '1':
if ($products_discount_type_from == '0') {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {


from line 107
if (!$display_specials_price) {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
if (!$display_specials_price) {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {


from line 118
// actual price
case '2':
if ($products_discount_type_from == '0') {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
// actual price
case '2':
if ($products_discount_type_from == '0') {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {


from line 134
// amount offprice
case '3':
if ($products_discount_type_from == '0') {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
// amount offprice
case '3':
if ($products_discount_type_from == '0') {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {


from line 143
if (!$display_specials_price) {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
if (!$display_specials_price) {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {


includes/modules/pages/login/header_php.php

from line 90
$_SESSION['customer_whole'] = $check_customer->fields['customers_whole'];
to:
$_SESSION['customers_whole'] = $check_customer->fields['customers_whole'];



includes/templates/YOUR_TEMPLATE_NAME_HERE/templates/tpl_product_info_display.php

from line 69
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {

to:

if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {

from line 84
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {

to:
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {


there are more bugs i have fixes for i will post shortly, the cart will now see the wholesale customer as well as the prices for a wholesale customer!

Twitch