Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Sep 2009
    Posts
    40
    Plugin Contributions
    0

    Default Super Orders mod for Dual Pricing mod to show Reseller on Packing Slip

    I am using Super Orders and Dual Pricing mods together. I use Dual Pricing for our Resellers which reflects their wholesale pricing. However, when I print a packing slip, I need the Resellers billing info to print on the packing slip, not my store info.

    Fairly simple mod, however, I am having trouble with one part of the logic. Basically, if zen_customers.customers_whole is greater than 0, then the customer is a Reseller. (defined as $c_whole)

    Below is my logic in super_packingslip.php. However, I return a 1 for every customer for zen_customers.customers_whole regardless if they are a Reseller or not.

    Can anybody help me out? Thanks in advance!

    (BTW, (int)$oID is defined earlier in the code.)

    PHP Code:
    <?php
          $order_check 
    $db->Execute("SELECT cc_cvv, customers_id, customers_name, customers_company, customers_street_address,
                                        customers_suburb, customers_city, customers_postcode,
                                        customers_state, customers_country, customers_telephone,
                                        customers_email_address, customers_address_format_id, delivery_name,
                                        delivery_company, delivery_street_address, delivery_suburb,
                                        delivery_city, delivery_postcode, delivery_state, delivery_country,
                                        delivery_address_format_id, billing_name, billing_company,
                                        billing_street_address, billing_suburb, billing_city, billing_postcode,
                                        billing_state, billing_country, billing_address_format_id,
                                        payment_method, cc_type, cc_owner, cc_number, cc_expires, currency,
                                        currency_value, date_purchased, orders_status, last_modified
                                        FROM " 
    TABLE_ORDERS "
                                        WHERE orders_id = '" 
    . (int)$oID "'");
    ?>
    <!-- mod print reseller info on packing slip if reseller - rh - 122912-->
    <?php
            $c_whole 
    $db->Execute("SELECT c.customers_whole
                                    FROM " 
    TABLE_CUSTOMERS " c
                                    WHERE c.customers_id = '" 
    $order_check->fields['customers_id'] . "'");
                            
        if ((int)
    $c_whole 0) {?>
        
            <td class="pageHeading"><?php echo (int)$order_check->fields['customers_id']?><br />
            <?php echo (int)$c_whole?><br />
            <?php echo $order_check->fields['customers_street_address']?><br />
            <?php echo $order_check->fields['customers_city'?>
            <?php echo $order_check->fields['customers_state'?>
            <?php echo $order_check->fields['customers_postcode']?><br />
            <?php echo $order_check->fields['customers_telephone']?><br />
            <?php echo $order_check->fields['customers_email_address'];?></td>
            <td class="pageHeading" align="right"><?php echo TEXT_PACKING_SLIP?></td>
        <?
    }
        else {
        ?>        
            <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
            <td class="pageHeading" align="right"><a href="<?php echo FILENAME_SUPER_PACKINGSLIP '?' zen_get_all_get_params(); ?>"><?php echo zen_image(DIR_WS_IMAGES HEADER_LOGO_IMAGE)?></a><br /><?php echo TEXT_PACKING_SLIP?></td>
    <?
    }
    ?>
    Last edited by kavlito; 29 Dec 2012 at 05:09 PM.

 

 

Similar Threads

  1. Merging Dual Pricing Mod and Group Pricing Mod
    By dewaltdave in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 13 Dec 2013, 02:24 AM
  2. Making Dual Pricing Mod and Add Customer from Admin Mod Work Together
    By r2llc1605 in forum Customization from the Admin
    Replies: 5
    Last Post: 19 May 2009, 04:37 AM
  3. Dual Pricing mod for zen cart 1.3.7.1 ?
    By vasilios in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Dec 2008, 02:36 PM
  4. dual pricing super orders
    By rocketrod in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 15 Nov 2007, 10:28 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