Page 57 of 80 FirstFirst ... 747555657585967 ... LastLast
Results 561 to 570 of 798
  1. #561
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)

    Quote Originally Posted by abcisme View Post
    I've just noticed that one-time attribute charges are not displayed on the admin invoice (when you click invoice button from order details page) or on the batch pdf packing slips. Is there any way to add this info? Kind of important, as the total doesn't add up on paper without the one-time charge displayed.

    Thanks.
    I figured out one part of it. In invoice.php, make the following changes:

    Code:
                echo '        <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) .
                              ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . 
    						  '</strong></td>' . "\n" .
               '        <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . 
                              ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
    						  '</strong></td>' . "\n" .
               '      </tr>' . "\n";
    Now to figure out the batch invoice.

  2. #562
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Super Orders v4.0 Support Thread

    Quote Originally Posted by saharmohamedali View Post
    I am not able to duplicate this behavior. Do you get a bar on the top saying something like "'The auto-loader file has not been deleted..."? My first inclination would be permissions for your hosting environment are incorrect or your hosting provider does not fully support PHP "unlink".
    Not sure to which issue the above is related as there is no context, but in review of autoinstallers where this notification is provided, the notification is not necessarily because the auto-install file itself can not be removed, but as a "precaution" because some other issue occurred resulting in the install not being "complete". The times I have come across this have been when one of the template override folders did not exist upon attempting to install. The auto-installer doesn't typically check for the absence of the template override folder and generate the folder in it's absence...

    Meaning, once the directory(ies) were created, the auto-install process would go to completion and the warning would not appear.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #563
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Super Orders v4.0 Support Thread

    Having an issue where if a gift certificate is used to cover the entire cost of the order, I cannot view the order in the admin panel using the details button. I am able to use edit orders and edit the order, but just can't view the details page. I get an internal server error. There's nothing in the error logs. Has anyone ever experienced this?

    This turned out to be my problem: https://www.zen-cart.com/showthread....87#post1215187
    Last edited by abcisme; 27 Nov 2015 at 05:37 PM.

  4. #564
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Super Orders v4.0 Support Thread

    SuperOrders 154 Beta / v4.0.10? (2/2/2015) Problems

    admin\super_data_sheet.php line ?

    Code:
     <td class="printMain"><?php echo zen_datetime_long($order->info['date_purchased']); ?></td>
    did not return anything (ie blank space), whereas

    Code:
    <td class="printMain"><?php echo zen_date_long($order->info['date_purchased']); ?></td>
    returns long date (Monday 08 June, 2015) but not time of order.



    Q1: Whether function zen_datetime_long works, especially with UK time format set in admin/languages/english.php

    admin\includes\functions\extra_functions\super_orders_functions.php - line 303

    Code:
    function zen_datetime_long($raw_date = 'now') {
      if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '') ) return false;
      elseif ($raw_date == 'now') {
        $raw_date = date('Y-m-d H:i:s');
      }
    
      $year = (int)substr($raw_date, 0, 4);
      $month = (int)substr($raw_date, 5, 2);
      $day = (int)substr($raw_date, 8, 2);
      $hour = (int)substr($raw_date, 11, 2);
      $minute = (int)substr($raw_date, 14, 2);
      $second = (int)substr($raw_date, 17, 2);
    
      return strftime('%b %d, %Y %r', mktime($hour, $minute, $second, $month, $day, $year));
    }
    Q2:What is the data sheet to be used for?.

    Q3 How do we get invoices to print as pdfs.

    Q4 If I enter alphanumeric into Admin > Configuration > SuperOrders >Tax Exemption ID Number and then view or refresh an invoice, the entry under Tax in the order details table shows "Tax Exempt" as expected, but a tax amount is still shown against Tax in the row immediately above the Total row when it should show nothing or $0.00.

    Thanks

  5. #565
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Super Orders v4.0 Support Thread

    Quote Originally Posted by swguy View Post
    This is a bug. You're going to have to comment out the zone checking logic in update_status() in includes/modules/payment/purchaseorder.php until someone fixes it.
    If someone could advise whether the following change (copied from moneyorder.php) is correct. It seems to work for me.

    includes\modules\payment\purchaseorder.php

    replace

    Code:
       function update_status() {
          global $order, $db;
    
          if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PURCHASE_ORDER_ZONE > 0) ) {
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PURCHASE_ORDER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
            while (!$check->EOF) {
              if ($check->fields['zone_id'] < 1) {
                $check_flag = true;
                break;
              } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
                $check_flag = true;
                break;
              }
              $check->MoveNext();
            }
    
            if ($check_flag == false) {
              $this->enabled = false;
            }
          }
        }
    with this

    Code:
        function update_status() {
          global $order, $db;
    
          if ($this->enabled && (int)MODULE_PAYMENT_PURCHASE_ORDER_ZONE > 0 && isset($order->billing['country']['id'])) {
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PURCHASE_ORDER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
            while (!$check->EOF) {
              if ($check->fields['zone_id'] < 1) {
                $check_flag = true;
                break;
              } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
                $check_flag = true;
                break;
              }
              $check->MoveNext();
            }
    
            if ($check_flag == false) {
              $this->enabled = false;
            }
          }
        }

  6. #566
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Super Orders v4.0 Support Thread

    This is a minor thing.

    admin\includes\functions\extra_functions\super_orders_functions.php

    put list in alphabetic order and rem or remove duplicates

    Code:
      function is_discount_module($ot_class) { 
        if ($ot_class == "ot_better_together" ||
    //        $ot_class == "ot_better_together" ||
            $ot_class == "ot_big_chooser" ||
            $ot_class == "ot_bigspender_discount" ||
            $ot_class == "ot_bogo_discount" || 
            $ot_class == "ot_case_discounts" || 
            $ot_class == "ot_combination_discounts" ||
            $ot_class == "ot_coupon" || 
            $ot_class == "ot_freegift_chooser" || 
            $ot_class == "ot_frequency_discount" ||
            $ot_class == "ot_group_pricing" ||
            $ot_class == "ot_gv" || 
            $ot_class == "ot_manufacturer_discount" || 
            $ot_class == "ot_military_discount" || 
            $ot_class == "ot_newsletter_discount" ||
            $ot_class == "ot_quantity_discount" ||
    //        $ot_class == "ot_quantity_discount" ||
            $ot_class == 'ot_sc' ||
            $ot_class == "ot_table_discounts" ) 
    	{ 
          return true;
        }
        return false; 
      }

  7. #567
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Super Orders v4.0 Support Thread

    SuperOrders Tax Exemption ID

    Whether the Tax Exemption ID should be placed under Admin>Config>MyStore, rather than under Admin>Config>SuperOrders, so that other mods may also use the setting (eg All_Invoices).

    Better still IMHO would be to place all tax settings under Admin>Location/Taxes, rather than under Admin>Config>MyStore. (Perhaps for zc 1.5.5 or later)

    Also change TAX_ID_NUMBER to TAX_EXEMPTION_ID to better indicate its purpose, as certain countries may allocate separate company (ACN), business (ABN) and taxation ID numbers, in addition to tax exemption numbers.

    SQL
    change
    Code:
    $sql = "INSERT IGNORE INTO ".DB_PREFIX."configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Tax Exemption ID Number', 'TAX_ID_NUMBER', '', 'If your business or organization is tax exempt, then you may have been issued a tax exmption ID number. Enter the number here and the tax columns will not appear on the invoice and the tax exemption ID number will also be displayed at the top of the invoice.', '".$so_configuration_id."', 45, now(), now(), NULL , NULL)";
     $db->Execute($sql);
    to

    Code:
    $sql = "INSERT IGNORE INTO ".DB_PREFIX."configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Tax Exemption ID', 'TAX_EXEMPTION_ID', '', 'If your business or organization is tax exempt, then you may have been issued a tax exemption ID number. Enter your  number here to display the tax exemption ID number and associated blurb on the invoice but not display taxation details on the invoice.', '1', 23, now(), now(), NULL , NULL);
     $db->Execute($sql);
    or as separate standalone sql

    Code:
    INSERT IGNORE INTO ".DB_PREFIX."configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Tax Exemption ID', 'TAX_EXEMPTION_ID', '', 'If your business or organization is tax exempt, then you may have been issued a tax exemption ID number. Enter the number here for the number and associated blurb to display on the invoice but not display taxation details on the invoice.', '1', 23, now(), now(), NULL , NULL);
    Notes:
    This places the setting immediately after SHOW_SPLIT_TAX_CHECKOUT (= 22).
    The associated blurb may need to be placed in language defines, such as TAX_EXEMPTION_ID_TEXT_START and TAX_EXEMPTION_ID_TEXT_END. In Australia, the associated blurb is prescribed by govt.

    Australia requires businesses to issue different invoice types for different business conditions, such as whether the business is tax exempt, the customer is tax exempt, and whether the order was placed or despatched within Australia. My invoices draw upon code from such plugins as SuperOrders_v4.10, Tax_inc_ex_1.5a, Tax Exemption Status_v2.1, All_Invoices_Report_2.1.0 and extra_field_on_customer_sign_up_2-0, for which the following code determines only whether the invoice should be headed "Tax Invoice" or "Invoice". This code must be placed after "$order_check = $db->Execute("SELECT...) and displays immediately below the letterhead and immediately above the BILL/SOLD/SHIP_TO address blocks. This code is by no means complete or final as I may change a few defines or variables, eg TAX_ID_NUMBER to TAX_EXEMPTION_ID used in $display_tax.

    Code:
    <!-- bof tax invoice or plain invoice -->
        <tr>
    <?php 
    // check for store tax exemption, customer tax exemption and Australia billing or delivery
    	$customer_tax_id = (int)$order_check->fields['customers_id'];
    	$customer_tax_check = $db->Execute("SELECT customers_id, customers_abn, customers_tax_exempt 
    										FROM " . TABLE_CUSTOMERS . "
    										WHERE customers_id = '" . (int)$customer_tax_id . "'");
    	
    	if ($display_tax == 'false' && $customer_tax_check->fields['customers_tax_exempt'] == '' && ($order_check->fields['delivery_country'] == 'Australia' || $order_check->fields['billing_country'] == 'Australia')) { 
    		echo '<td id="headerRight">' . HEADER_INVOICE_TAX . '</td>'; // Tax Invoice
    	  } else {
    		echo '<td id="headerRight">' . HEADER_INVOICE . '</td>'; // Invoice
    	  } 
    ?>
        </tr>
    <!-- eof tax invoice or plain invoice -->
    Hope this helps
    Last edited by dw08gm; 27 Dec 2015 at 06:31 AM.

  8. #568
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Super Orders v4.0 Support Thread

    admin\invoice.php

    Further to my previous post, the following summarises my changes (I have changed the original so much that it is now barely recognisable.)

    1. Original Line 36
    Code:
    $display_tax = (TAX_ID_NUMBER == '' ? true : false);
    Changed to
    Code:
    // change display_tax to exempt_tax
    //$display_tax = (TAX_ID_NUMBER == '' ? true : false); // Admin >Config>SuperOrders
    $store_tax_exempt = (STORE_TAX_EXEMPT_ID == '' ? true : false); // Admin >Config>SuperOrders
    Both the variable and entry in database table configuration.


    2. Original Line 178 -179
    Code:
        if ($show_customer == 'true') {
    ?>{
    Changed to
    Code:
    //   if ($show_customer == 'true') {
    ?>
    
    <!-- bof heading tax invoice or plain invoice -->
        <tr>
    <?php 
    // added check for store tax exempt, customers_tax_exempt & Australia billing or delivery
    	$customer_tax_id = (int)$order_check->fields['customers_id'];
    	$customer_tax_check = $db->Execute("SELECT customers_id, customers_abn, customers_tax_exempt 
    										FROM " . TABLE_CUSTOMERS . "
    										WHERE customers_id = '" . (int)$customer_tax_id . "'");
    	
    	if ($store_tax_exempt == 'false' && $customer_tax_check->fields['customers_tax_exempt'] == '' && ($order_check->fields['delivery_country'] == 'Australia' || $order_check->fields['billing_country'] == 'Australia')) { 
    		echo '<td id="headerRight">' . HEADER_INVOICE_TAX . '</td>';
    	  } else {
    		echo '<td id="headerRight">' . HEADER_INVOICE . '</td>';
    	  } 
    ?>
        </tr>
    <!-- eof heading tax invoice or plain invoice -->
    
    <?php 
    // bof show taxes
    if ($store_tax_exempt == 'false' && $customer_tax_check->fields['customers_tax_exempt'] == '' && ($order_check->fields['delivery_country'] == 'Australia' || $order_check->fields['billing_country'] == 'Australia')) { 
      $show_taxes = true;
    } else {
      $show_taxes = false;
    }
    // eof show taxes
    ?>
    The above code contains the invoice/tax invoice check and changes the way taxes are displayed or not displayed based on a variety of business conditions. $store_tax_exempt was $display_tax. $customer_tax_check->fields['customers_tax_exempt'] refers to the Tax Exemption Status_v2.1 mod.

    The following changes replace $display_tax with $show_taxes.

    3.Original Lines 279
    Code:
            <?php if ($display_tax) { ?>
    Changed to
    Code:
    		  <?php if ($show_taxes == 'true') { ?>
    4. Original Lines 312-322
    Code:
          echo '        </td>' . "\n" .
               '        <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
          echo '        <td class="dataTableContent" valign="top">';
          if ($display_tax) {
            echo zen_display_tax_value($order->products[$i]['tax']) . '%';
          }
          else {
            echo ENTRY_NO_TAX;
          }
          echo '</td>' . "\n" ;
        if ($display_tax) {
    Changed to
    Code:
    			  echo 
    			  '</td>' . "\n";
    // 			  '<td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" .
    // 			  '<td class="dataTableContent" valign="top">';
    // 			  if ($display_tax) {
    // 				echo zen_display_tax_value($order->products[$i]['tax']) . '%';
    // 			  } else {
    // 				echo ENTRY_NO_TAX;
    // 			  }
    // 			  echo '</td>' . "\n" 
    			  if ($show_taxes == 'true') {
    Last edited by dw08gm; 29 Dec 2015 at 05:32 AM. Reason: fixed weird things

  9. #569
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)

    Seeking help to convert STORE_NAME_ADDRESS from a block of text into single line of text?

    Lines 44-51 in admin\includes\functions\extra_functions\lcsd_merged_packing_slips.php

    Code:
                $this->SetFont('Arial','B', 12);
                $this->SetXY(18, 166);   
                $storeNameArray = explode("\n",STORE_NAME_ADDRESS);
                foreach($storeNameArray as $storNameLine){
                    if((strpos($storNameLine, STORE_NAME) === false) || (LCSD_SHOW_STORE_NAME == 'True')){                                                                   
                        $this->MultiCell(270, 14, $storNameLine, 0, 'J'); 
                    }    
                }

  10. #570
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Super Orders v4.0 Support Thread (for ZC v1.5.x)

    Quote Originally Posted by dw08gm View Post
    Seeking help to convert STORE_NAME_ADDRESS from a block of text into single line of text?

    Lines 44-51 in admin\includes\functions\extra_functions\lcsd_merged_packing_slips.php

    Code:
                $this->SetFont('Arial','B', 12);
                $this->SetXY(18, 166);   
                $storeNameArray = explode("\n",STORE_NAME_ADDRESS);
                foreach($storeNameArray as $storNameLine){
                    if((strpos($storNameLine, STORE_NAME) === false) || (LCSD_SHOW_STORE_NAME == 'True')){                                                                   
                        $this->MultiCell(270, 14, $storNameLine, 0, 'J'); 
                    }    
                }
    How about
    Code:
    $store_address = str_replace ("\n", ', ', STORE_NAME_ADDRESS);

 

 
Page 57 of 80 FirstFirst ... 747555657585967 ... LastLast

Similar Threads

  1. v150 Edit Orders v4.0 Support Thread
    By DivaVocals in forum Addon Admin Tools
    Replies: 1786
    Last Post: 10 Apr 2024, 03:17 PM
  2. Edit Orders v3.0 for ZC 1.3.9 [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 656
    Last Post: 18 Apr 2016, 06:28 PM
  3. v139h Super Orders v3.0 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1018
    Last Post: 28 Apr 2014, 11:38 PM
  4. OLD Super Orders 2.0 (See v3.0 thread instead)
    By BlindSide in forum All Other Contributions/Addons
    Replies: 2019
    Last Post: 17 Jan 2012, 05:43 AM
  5. RE: Super Orders v3.0 Support Thread
    By Johnnyd in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Jun 2011, 09:28 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR