Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Group Pricing Question

    This is the whole function process:
    Code:
      function process() {
        global $order, $currencies, $db;
        $order_total = $this->get_order_total();
        $od_amount = $this->calculate_deductions($order_total['total']);
        $this->deduction = $od_amount['total'];
        if ($od_amount['total'] > 0) {
          reset($order->info['tax_groups']);
          $tax = 0;
          while (list($key, $value) = each($order->info['tax_groups'])) {
            if ($od_amount['tax_groups'][$key]) {
              $order->info['tax_groups'][$key] -= $od_amount['tax_groups'][$key];
              $tax += $od_amount['tax_groups'][$key];
            }
          }
          if ($od_amount['type'] == 'S') $order->info['shipping_cost'] = 0;
          $order->info['total'] = $order->info['total'] - $od_amount['total'];
          if (DISPLAY_PRICE_WITH_TAX == 'true') {
            $od_amount['total'] += $tax;
          }
          if ($this->calculate_tax == "Standard") $order->info['total'] -= $tax;
          if ($order->info['total'] < 0) $order->info['total'] = 0;
          $order->info['tax'] = $order->info['tax'] - $tax;
    
        $group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
        $group_discount = $db->Execute("select group_name, group_percentage from " . TABLE_GROUP_PRICING . "
                                          where group_id = '" . (int)$group_query->fields['customers_group_pricing'] . "'");
          $this->output[] = array('title' => $this->title . ':'  . ' ' . $group_discount->fields['group_name'],
          'text' => '-' . $currencies->format($od_amount['total'], true, $order->info['currency'], $order->info['currency_value']),
          'value' => $od_amount['total']);
    
        }
      }
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  2. #2
    Join Date
    Feb 2009
    Posts
    22
    Plugin Contributions
    0

    Default Re: Group Pricing Question

    Hi,

    I was searching for something else to do with group pricing but I came across this and I used it.

    It works great!

    Thank you so much A!

    Just goes to show old posts can still do some good.

    Thanks again.

    Now, i'm gonna look for that change 'group discount' text post - I"m on the prawl. (watch out!)
    http://www.princesscarebeauty.com
    sales AT princesscarebeauty DOT com

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Group Pricing Question

    You are most welcome ... thanks for the update that this helped you out ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. online group pricing vs group pricing per item working with sale maker
    By giftsandwhatnot in forum Addon Payment Modules
    Replies: 1
    Last Post: 24 Oct 2011, 09:22 AM
  2. Question about Group Pricing Mod
    By Statix in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 20 Apr 2009, 01:43 PM
  3. Noob Question About Group Pricing
    By ValhallaSoapGal in forum General Questions
    Replies: 2
    Last Post: 28 Nov 2008, 09:23 AM
  4. Group Pricing Question
    By julia44 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 3 Aug 2007, 04:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg