Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    74
    Plugin Contributions
    0

    Default Group Pricing Question

    I have 4 different groups set up with varying levels of discounts per group.

    When a member from each group goes through the checkout system, it doesnt tell me what group they are from (this can only be divised from the percentage discount)....

    Is is possible to have the specific discount group name appear at step 2 of the checkout process?



    Thanks
    Lisa
    www.thecrookedpath.com.au
    Last edited by wiccan0974; 28 Feb 2012 at 07:35 PM. Reason: image resized

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

    Default Re: Group Pricing Question

    You could customize the file:
    /includes/modules/order_total/ot_group_pricing.php

    and get the group name to display with the code in RED:
    Code:
          $order->info['tax'] = $order->info['tax'] - $tax;
    
    
    // bof: add group pricing name to title
        $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']);
    // eof: add group pricing name to title
    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!

  3. #3
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    74
    Plugin Contributions
    0

    Default Re: Group Pricing Question

    Hi Ajeh - I appreciate your time and effort in helping with this...

    I placed the code as shown below, but i keep getting the "white screen of death" each time i insert the code....is there something I missed?

    Thanks - Lisa
    ====================================

    // bof: add group pricing name to title
    $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']);
    // eof: add group pricing name to title
    }

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

    Default Re: Group Pricing Question

    Change the comma to a period and move the comma to the end of the line:
    Code:
    $this->output[] = array('title' => $this->title . ':', ' ' . $group_discount->fields['group_name'],
    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!

  5. #5
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    74
    Plugin Contributions
    0

    Default Re: Group Pricing Question

    I don't know if it is just too early in the morning to follow simple instructions - Im sorry if I am wasting your time Ajeh, I have tried your suggestion, but I can't make it work??....waahh

    What am I doing wrong?


    // bof: add group pricing name to title
    $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']);
    // eof: add group pricing name to title
    }

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

    Default Re: Group Pricing Question

    Start over and try this code:

    Code:
        $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 . "
    
        $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!

  7. #7
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    74
    Plugin Contributions
    0

    Default Re: Group Pricing Question

    Sorry Ajeh, I wish I could give you some "yippees" and "yays", but no....still not working....I completely see where you are going with the code, but I just can't make it work.....

    That being said, I am happy to keep trying if you are ;)

    Can you check below to make sure I have placed the code correctly?

    Thanks - Lisa
    =======================================

    $order->info['tax'] = $order->info['tax'] - $tax;

    // bof: add group pricing name to title
    $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 . "

    $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']);

    $this->output[] = array('title' => $this->title . ':',
    'text' => '-' . $currencies->format($od_amount['total'], true, $order->info['currency'], $order->info['currency_value']),
    'value' => $od_amount['total']);
    // eof: add group pricing name to title
    }
    }
    function get_order_total() {

  8. #8
    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!

  9. #9
    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

  10. #10
    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