Zen Cart Logo
Forums / Addon Admin Tools / Super Orders v4.0 Support Thread for ZC v1.5.x

Super Orders v4.0 Support Thread for ZC v1.5.x

Sticky

Views: 172,103

Results 561 to 580 of 816
23 Dec 2015, 5:13 AM
#561
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Super Orders v4.0 Support Thread for ZC v1.5.x

swguy:

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

   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

    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;
        }
      }
    }
23 Dec 2015, 5:15 AM
#562
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

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

This is a minor thing.

admin\includes\functions\extra_functions\super_orders_functions.php

put list in alphabetic order and rem or remove duplicates

  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; 
  }
27 Dec 2015, 5:27 AM
#563
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

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

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

$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

$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

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.

<!-- 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

29 Dec 2015, 4:26 AM
#564
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

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

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
$display_tax = (TAX_ID_NUMBER == '' ? true : false);

Changed to

// 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.

  1. Original Line 178 -179
    if ($show_customer == 'true') {
?>{

Changed to

//   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

        <?php if ($display_tax) { ?>

Changed to

		  <?php if ($show_taxes == 'true') { ?>
  1. Original Lines 312-322
      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

			  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') { 
29 Dec 2015, 4:44 AM
#565
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

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

            $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'); 
                }    
            }  
29 Dec 2015, 1:17 PM
#566
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

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

dw08gm:

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

        $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

$store_address = str_replace ("\n", ', ', STORE_NAME_ADDRESS);

30 Dec 2015, 8:00 AM
#567
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

This has always been a Tax ID number because it it was meant to store the Tax ID number for the business (which is not a tax exemption number in the US). My understanding is that historically Super Orders is a mod that was created for a US based company and donated to the Zen Cart community by the original author Blindside..

That said, I've been following your code postings, and I'm not clear on what the REAL long term benefit would be to making all of these changes to future release of this mod. (FYI, enhancements/modifications/suggestions to this mod are being contributed by contributors by submitting pull requests in the Github repo allows a proper code review testing cycle to take place)

dw08gm:

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

$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
> 
> ```
$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

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.
> 
> ```
<!-- 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

30 Dec 2015, 8:04 AM
#568
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

FYI the FPDF version bundled in with SO is WAAAAAAYYYYY out of date, and as of today, I have not been able to work out how to update it to the newest version. The original contributors of that PDF printing functionality have LONG ago came and went.... never to return.. :laugh:

dw08gm:

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

        $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'); 
            }    
        }  
30 Dec 2015, 8:22 AM
#569
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

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

DivaVocals:

FYI the FPDF version bundled in with SO is WAAAAAAYYYYY out of date, and as of today, I have not been able to work out how to update it to the newest version. The original contributors of that PDF printing functionality have LONG ago came and went.... never to return.. :laugh:
I have an updated version of fpdf. Will look it up and post it to github in the next couple of days.

30 Dec 2015, 2:08 PM
#570
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

Design75:

I have an updated version of fpdf. Will look it up and post it to github in the next couple of days. You rock!!! It's not for lack of trying to update the FPDF library mind you.. It's more than just updating the FDPF library files.. One actually has to UNDERSTAND how to use FPDF..:laugh: And since this part of SO was introduced, it's been a STRUGGLE just to get the FEW updates that have been made to this part of this SO code contribution..:laugh: (not to mention fending off the few folks who shortly after this functionality was introduced who mercilessly attacked the fact that the PDF packing lists contained pricing data while providing no real solution to the so-called "issue")

30 Dec 2015, 7:24 PM
#571
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

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

I have posted the code on github

30 Dec 2015, 8:49 PM
#572
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

Design75:

I have posted the code on github

Awesome..

off from the reguar gig this week.. My plan is to get caught up on all my outstanding module submissions (especially IH4 ans SO).. I will also be submitting SOME of the modules that other awesome Zenners (lat9 and mc123456789) updated/fixed or created for me on behalf of my clients..

31 Dec 2015, 4:45 AM
#573
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

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

lat9:

How about

$store_address = str_replace ("\n", ', ', STORE_NAME_ADDRESS);


Many thanks Lat9.

This changes the store address in invoice header to a single line text.

admin\includes\functions\extra_functions\lcsd_merged_packing_slips.php
	```
$store_address = str_replace ("\n", ', ', STORE_NAME_ADDRESS); // address as single line text
	$this->Text(118, 115, $store_address); // address as single line text - adjust x=118 to centralise
//	$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'); 
//	  }    
//	}  

All the best for the New Year.

31 Dec 2015, 4:49 AM
#574
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

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

DivaVocals:

FYI the FPDF version bundled in with SO is WAAAAAAYYYYY out of date, and as of today, I have not been able to work out how to update it to the newest version. The original contributors of that PDF printing functionality have LONG ago came and went.... never to return.. :laugh:

Thanks for the update.

I have been in two minds whether to use it, but thought I should at least give it a try.

All the best for the New Year.

8 Jan 2016, 6:26 AM
#575
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

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

To reclaim some screen space, I moved page heading HEADING_TITLE_ORDERS_LISTING together with buttons FILENAME_SUPER_BATCH_STATUS and FILENAME_SUPER_BATCH_FORMS to vicinity of search boxes.

admin\orders.php

  1. Replace beginning around line 404
<?php if ($action == '') { ?>
<!-- search -->
<div id="searchOrders">
<?php echo zen_draw_form('search', FILENAME_ORDERS, '', 'get', '', true); ?>
<?php
// show reset search
  if ((isset($_GET['search']) && zen_not_null($_GET['search'])) or $_GET['cID'] !='') {
    echo '<a href="' . zen_href_link(FILENAME_ORDERS, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a><br />';
  }
?>
<?php
  echo HEADING_TITLE_SEARCH_DETAIL . ' ' . zen_draw_input_field('search') . zen_hide_session_id();
  if (isset($_GET['search']) && zen_not_null($_GET['search'])) {
    $keywords = zen_db_input(zen_db_prepare_input($_GET['search']));
    echo '<br/ >' . TEXT_INFO_SEARCH_DETAIL_FILTER . $keywords;
  }
?>
</form>
</div>

<div id="searchOrdersProducts">
<?php echo zen_draw_form('search_orders_products', FILENAME_ORDERS, '', 'get', '', true); ?>
<?php
// show reset search orders products
  if ((isset($_GET['search_orders_products']) && zen_not_null($_GET['search_orders_products'])) or $_GET['cID'] !='') {
    echo '<a href="' . zen_href_link(FILENAME_ORDERS, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a><br />';
  }
?>
<?php
  echo HEADING_TITLE_SEARCH_DETAIL_ORDERS_PRODUCTS . ' ' . zen_draw_input_field('search_orders_products') . zen_hide_session_id();
  if (isset($_GET['search_orders_products']) && zen_not_null($_GET['search_orders_products'])) {
    $keywords_orders_products = zen_db_input(zen_db_prepare_input($_GET['search_orders_products']));
    echo '<br/ >' . TEXT_INFO_SEARCH_DETAIL_FILTER_ORDERS_PRODUCTS . zen_db_prepare_input($keywords_orders_products);
  }
?>
</form>
</div>

<div id="searchStatus">
<?php echo zen_draw_form('status', FILENAME_ORDERS, '', 'get', '', true); ?>
<?php
// show reset search status
  if ((isset($_GET['status']) && zen_not_null($_GET['status'])) or $_GET['cID'] !='') {
    echo '<a href="' . zen_href_link(FILENAME_ORDERS, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a><br />';
  }
?>
<?php
    echo HEADING_TITLE_STATUS . ' ' . zen_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), $_GET['status'], 'onChange="this.form.submit();"');
    echo zen_hide_session_id();
?>
</form>
</div>

<div id="searchOrderID">
<?php echo zen_draw_form('ordersID', FILENAME_ORDERS, '', 'get', '', true); ?>
<?php echo HEADING_TITLE_SEARCH . ' ' . zen_draw_input_field('oID', '', 'size="12"') . zen_draw_hidden_field('action', 'edit') . zen_hide_session_id(); ?>
</form>
</div>
<!-- search -->

with

<?php if ($action == '') { ?>
 <div>
  <?php
	echo '<div class="pageHeading" style="float:left; margin:0 1em 0.5em 0.5em;">' . HEADING_TITLE_ORDERS_LISTING . '</div>' .
	'<div style="float:left; margin:0 1em 0.5em 0.5em;"><INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BOX_CUSTOMERS_SUPER_BATCH_STATUS . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_STATUS, '') . '\'"></div>' .
	'<div style="float:left; margin:0 1em 0.5em 0.5em;"><INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BOX_CUSTOMERS_SUPER_BATCH_FORMS . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_FORMS, '') . '\'"></div>';
  ?>
 </div>
<!-- bof search -->
  <div style="float:right; min-width:420px; background:#ffc;">
    <div id="searchOrders">
	  <?php echo zen_draw_form('search', FILENAME_ORDERS, '', 'get', '', true); ?>
	  <?php
		echo HEADING_TITLE_SEARCH_DETAIL . ' ' . zen_draw_input_field('search') . zen_hide_session_id();
		if (isset($_GET['search']) && zen_not_null($_GET['search'])) {
		  $keywords = zen_db_input(zen_db_prepare_input($_GET['search']));
		  echo '<br/ >' . TEXT_INFO_SEARCH_DETAIL_FILTER . $keywords;
		}
	  ?>
	  <?php
// show reset search
		if ((isset($_GET['search']) && zen_not_null($_GET['search'])) or $_GET['cID'] !='') {
		  echo '  <a href="' . zen_href_link(FILENAME_ORDERS, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>';
		}
	  ?>
	  </form>
	</div>

	<div id="searchOrdersProducts">
	  <?php echo zen_draw_form('search_orders_products', FILENAME_ORDERS, '', 'get', '', true); ?>
	  <?php
		echo HEADING_TITLE_SEARCH_DETAIL_ORDERS_PRODUCTS . ' ' . zen_draw_input_field('search_orders_products') . zen_hide_session_id();
		if (isset($_GET['search_orders_products']) && zen_not_null($_GET['search_orders_products'])) {
		  $keywords_orders_products = zen_db_input(zen_db_prepare_input($_GET['search_orders_products']));
		  echo '<br/ >' . TEXT_INFO_SEARCH_DETAIL_FILTER_ORDERS_PRODUCTS . zen_db_prepare_input($keywords_orders_products);
		}
	  ?>
	  <?php
// show reset search orders products
		if ((isset($_GET['search_orders_products']) && zen_not_null($_GET['search_orders_products'])) or $_GET['cID'] !='') {
		  echo '  <a href="' . zen_href_link(FILENAME_ORDERS, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>';
		}
	  ?>
	  </form>
	</div>
	<br />

	<div id="searchOrderID">
	  <?php echo zen_draw_form('ordersID', FILENAME_ORDERS, '', 'get', '', true); ?>
	  <?php echo HEADING_TITLE_SEARCH . ' ' . zen_draw_input_field('oID', '', 'size="14"') . zen_draw_hidden_field('action', 'edit') . zen_hide_session_id(); ?>
	  </form>
	</div>
	<br />

	<div id="searchStatus">
	  <?php echo zen_draw_form('status', FILENAME_ORDERS, '', 'get', '', true); ?>
	  <?php
// show reset search status
		if ((isset($_GET['status']) && zen_not_null($_GET['status'])) or $_GET['cID'] !='') {
		  echo '<a href="' . zen_href_link(FILENAME_ORDERS, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>  ';
		}
	  ?>
	  <?php
		echo HEADING_TITLE_STATUS . ' ' . zen_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), $_GET['status'], 'onChange="this.form.submit();"');
		echo zen_hide_session_id();
	  ?>
	  </form>
	</div>
  </div>
<!-- eof search -->
  1. Rem this code beginning around line 1289
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading">
	    <?php 
              echo HEADING_TITLE_ORDERS_LISTING . '  ' .
              '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BOX_CUSTOMERS_SUPER_BATCH_STATUS . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_STATUS, '') . '\'">' .
              '  ' .
              '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BOX_CUSTOMERS_SUPER_BATCH_FORMS . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_FORMS, '') . '\'">';
            ?>
	    </td>
            <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
            <td align="right">
	    <table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="smallText" align="right">
		</td>
	      </tr>
              <tr>
                <td class="smallText" align="right">
                </td>
	      </tr>
            </table>
	    </td>
          </tr>
        </table>
	</td>
      </tr>

with

<!-- Page Heading moved to above search boxes
      <tr>
       <td width="100%">
	    <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading">
			<?php
              echo HEADING_TITLE_ORDERS_LISTING . '  ' .
              '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BOX_CUSTOMERS_SUPER_BATCH_STATUS . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_STATUS, '') . '\'">' .
              '  ' .
              '<INPUT class="normal_button button" TYPE="BUTTON" VALUE="' . BOX_CUSTOMERS_SUPER_BATCH_FORMS . '" ONCLICK="window.location.href=\'' . zen_href_link(FILENAME_SUPER_BATCH_FORMS, '') . '\'">';
			?>
            </td>
            <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
            <td align="right">
			 <table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="smallText" align="right">
		        </td>
              </tr>
              <tr>
                <td class="smallText" align="right">
                </td>
	          </tr>
             </table>
	        </td>
          </tr>
        </table>
	   </td>
      </tr>
-->
18 Feb 2016, 6:44 AM
#576
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

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

Zen Cart 1.5.1
PHP Version: 5.3.29 (Zend: 2.3.0)
Database: MySQL 5.5.44
HTTP Server: Apache/2
Super Orders 4.0.9 (I think)
Edit Orders 4.1.4

I have a problem since the host upgraded PHP to 5.3 where when entering payment data, changing order status, adding notes, or editing order information then clicking "update" results in a blank screen. If I click the browsers back button the edited data appears correctly. I am sure both Super Orders and Edit Orders were updated over time but uncertain as I cannot find a file version number to compare.

We have Japanese translations that appear to match the original English (checked with WinMerge). I don't know if the problem is related to Super Orders or not, trying to track it down.

18 Feb 2016, 9:51 AM
#577
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

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

Sorry but I don't think this is a Super Orders issue, I found the following;

Zen Cart v1.5.1 is compatible with PHP 5.2.14 thru PHP 5.3.x. Requires some patches to work with PHP 5.4

I either need to patch or upgrade Zen Cart

18 Feb 2016, 8:37 PM
#578
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

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

When you get a "blank screen" (aka whitescreen), you've got a myDEBUG*.log file waiting in your /logs folder to let you know what the issue is. Since it's happening on the admin-side, that log information will most likely contain your secret admin folder's name, so it you post the log information, be sure to xxx-out that folder-name!

7 Mar 2016, 10:34 AM
#579
secware avatar

secware

New Zenner

Join Date:
May 2014
Location:
West Midlands
Posts:
9
Plugin Contributions:
0

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

Hi,

Is anyone able to help please......

We are currently maintained by JSWeb, and have difficulty regarding getting a bug fixed.

When an order is split the vat is not calculated correctly, and we have been advised this could take an open ended amount of time (which we would be billed for hourly) to fix.

This is apparently caused by the "Super Orders" module, so what are others using that do not have this issue relating to it please?

8 Mar 2016, 1:03 AM
#580
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

Secware:

Hi,

Is anyone able to help please......

We are currently maintained by JSWeb, and have difficulty regarding getting a bug fixed.

When an order is split the vat is not calculated correctly, and we have been advised this could take an open ended amount of time (which we would be billed for hourly) to fix.

This is apparently caused by the "Super Orders" module, so what are others using that do not have this issue relating to it please?
I would say it's less of being "caused" by Super Orders as much as it is an issue of Super Orders just not supporting what you need. Would appear you may be in need of custom dev support, and I would suggest that you hit up the section of the forum that allows you to put in such special requests..