Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    6
    Plugin Contributions
    0

    red flag Group pricing field in invoice

    First thanks for Zen Cart and the great support forum!!!
    I have also installed and using mod Group Pricing (per Item) with no problems.

    I would now like the field customers_group_pricing from TABLE_CUSTOMERS to be visible inside admin orders or just the admin printable invoice.

    The reason is that the admin should know if the order of the particular customer belongs to a discounted Group pricing group.

    It seems the affected files are admin/invoice.php
    and maybe admin/includes/classes/order.php
    admin/orders.php

    The field customers_group_pricing of table CUSTOMERS is what I need to be printed on the invoice (since it is the id of the group. For example Group A has id 2, no discount group customers have id 0).

    My problem is that table ORDERS holds the information orders_id and customers_id but it doesn't hold the field customers_group_pricing. So I do not know how to reference the customers_group_pricing from table CUSTOMERS inside admin/invoice.php

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

    Default Re: Group pricing field in invoice

    You could do a search of the customers_id in the orders table and look up their customers_group_pricing to see what id is used ...

    On the orders.php you can get the customers_id from the:
    $orders->fields['customers_id']

    On the invoice.php you need to add to the SELECT statement the customers_id so that it is available to do this look up ...
    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
    Feb 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Group pricing field in invoice

    Thanks a lot, it now works fine.

    I only edited file admin/invoice.php where
    added there inside the select statement
    of $order_check, the field customers_id .

    Then below this statement added the code

    Code:
    $xinfocode = "SELECT customers_group_pricing
                      from " . TABLE_CUSTOMERS . "
                      where customers_id ='" . $order_check->fields['customers_id'] . "'";
              $xinfo = $db->Execute($xinfocode);
    Then further below where the print outs are, added

    Code:
    <tr>
    <td class="main" style="color:#FF0000"><?php echo "Discount Group: "; ?>
    <?php if($xinfo->fields['customers_group_pricing']== 2) echo "Wholesale (Group A)";
    if($xinfo->fields['customers_group_pricing']== 1) echo "1";
    if($xinfo->fields['customers_group_pricing']== 0) echo "Retail";?></td>
    </tr>

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

    Default Re: Group pricing field in invoice

    Thanks for the update that you have this working and for posting your solution ...
    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. Group pricing - how to assign customer to a group?
    By vito in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 6
    Last Post: 12 May 2010, 06:37 PM
  3. Special Club Pricing w/out Manual add Group Pricing
    By bumba000 in forum General Questions
    Replies: 1
    Last Post: 9 Nov 2008, 02:44 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