
Originally Posted by
slowawake
Hi all,
I am thinking maybe some combination of Dual Pricing with Product Qty Units, although i'm all for another solution if there is one.
Skye
Looks like your on the right path. The code you have question about and can't get working does work.
PHP Code:
<?
if ($_SESSION['customer_id']) {
$customers_id = $_SESSION['customer_id'];
$customer_check = $db->Execute("select * from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'");
if ($customer_check->fields['customers_whole'] != "0") {
// YOUR CODE
}
}
?>
I've done several customizations of this module wrapping that code around different elements. You will need to wrap it around portions of Product Qty Units so that it is only activated when a whole sale customer is logged in. As far as the troubles your having with that code try turning on strict error reporting to see what the actual problem is with the site. To do this create the file YOUR_DOMAIN/includes/local/configure.php
and place in the file the following code
PHP Code:
<?php
define('STRICT_ERROR_REPORTING', true);
?>
Reload the page your having troubles with and sort through all the errors. The fatal error is the one breaking your site (Inherently the last error). Check to see if you can fix that. Remember to delete or note out the define() line once you're done so that the errors aren't always showing.
Bookmarks