Page 8 of 53 FirstFirst ... 67891018 ... LastLast
Results 71 to 80 of 524
  1. #71
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Export Shipping & Order Information

    Quote Originally Posted by misscotton View Post
    Hi - i am hoping you can help me here. I am modifying this add on to include a "Product Cost" column to the report. I have it working except I can't quite figure out how I take the value and place it into the new column I created. It is essentially making the same query to the db as what is used for filling the "Products Atrributes" column only I don't need to format the multiple attribute options, i.e. like below where the field I am pulling out of the db is "options_values_price_w":
    Code:
    $product_attributes_rows="SELECT Count(*) as num_rows
    FROM " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
    WHERE orders_id = " . $order_details->fields['orders_id'] . "
    AND orders_products_id = " . $order_details->fields['orders_products_id'] . "";
    $attributes_query_rows = $db->Execute($product_attributes_rows);
    $num_rows = $attributes_query_rows->fields['num_rows'];
    
    	If ( $num_rows > 0) {
    	$product_attributes_query="SELECT *
    	FROM " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
    	WHERE orders_id = " . $order_details->fields['orders_id'] . "
    	AND orders_products_id = " . $order_details->fields['orders_products_id'] . "";
    	$attributes_query_results = $db->Execute($product_attributes_query);
    	$str_export = $str_export . "\"";
    		for ($i = 0, $n = $num_rows; $i < $n; $i++) {
    		$str_export = $str_export . $attributes_query_results->fields['options_values_price_w'] .
    		$attributes_query_results->MoveNext();
    		}
    	$str_export = $str_export . "\"";
    
    }
    If I replace this code with what is used to fill the "Product Attributes" column it shows the cost value properly. But I would like both columns displayed - "Products Attributes" and "Product Cost". I added the name of the column successfully like below, but don't know what would make the data go into that column:
    Code:
    if ($_POST['product_details'] == 1) { // add to header row
    	if ($_POST['filelayout'] == 2) { // 1 Product Per row RADIO
    			$str_header = $str_header . ",Product Qty,Products Price,Product Name,Product Model,Product Attributes,Product Cost";
    	} else { // File layout is 1 OPR
    	/**************the following exports 1 OPR attribs****************/
    	  $oID = zen_db_prepare_input($order_details->fields['orders_id']);
    	  $oIDME = $order_details->fields['orders_id'];
    	  $order = new order($oID);
    		for ($i = 0, $n = $max_products; $i < $n; $i++) {
    			$str_header = $str_header . ",Product " . $i . " Qty";
    			$str_header = $str_header . ",Product " . $i . " Price";
    			$str_header = $str_header . ",Product " . $i . " Name";
    			$str_header = $str_header . ",Product " . $i . " Model";
    			$str_header = $str_header . ",Product " . $i . " Attributes";
    			$str_header = $str_header . ",Product " . $i . " Cost";
    	    }
    	/*****************************************************************/
    	} // End if to determine which header to use
    } // end Row header if product details selected
    hope that makes sense - I feel like I am really close to figuring it out, but I am kinda crash coursing learning db and php coding to make this work..any help would be appreciated....thanks

    In order to get that to work and keep your current setup correct you'll need to ad a few items.

    1) add a new header row column for that new field and don't forget to only show that IF the user chose that option otherwise it will through off the export.

    2) Add the exported data to two sections in the program. (a) the section that exports data "one order per row" and (b) to the section that exports data "one product per row".

    3) You'll also need to update the query itself to pull that extra field in order to have the "data" to put into the export.

    Make a backup file of your current working copy before you change anything so you have a working version.

    So you're looking at a number of edit areas to get it to work.
    Last edited by econcepts; 16 May 2009 at 02:01 PM. Reason: clarification
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  2. #72
    Join Date
    Jan 2005
    Posts
    186
    Plugin Contributions
    0

    Default Re: Export Shipping & Order Information

    I am getting the same error as everyone else:

    Catchable fatal error: Object of class queryFactoryResult could not be converted to string in /home/growligh/public_html/admin/includes/functions/html_output.php on line 262

    But when I try to use the updated version of html_output.php I get only the green bar portion of the header in the admin side of the site and this error:

    Fatal error: Call to undefined function zen_catalog_href_link() in /home/needgcom/public_html/elocin/includes/header.php on line 219

    If I switch back to the core file from the 1.3.7 download then I can access my admin again but still have no export button for this mod.

    Any suggestions?

    Thanks,
    Marc

  3. #73
    Join Date
    May 2009
    Posts
    1
    Plugin Contributions
    0

    Default Re: Export Shipping & Order Information

    Hi,

    A really interesting contribution.


    Please could you show me how to get as default some of the options "on", 1 line for order, discount, etc,... All of them are desable as default.

    I want the options we are used to "activate" before do the batch will be activated already when we are on this page in order to save time and human faults.

    thanks for your help

  4. #74
    Join Date
    May 2007
    Posts
    181
    Plugin Contributions
    0

    Default Re: Export Shipping & Order Information

    Quote Originally Posted by tat2nu View Post
    I am getting the same error as everyone else:

    Catchable fatal error: Object of class queryFactoryResult could not be converted to string in /home/growligh/public_html/admin/includes/functions/html_output.php on line 262

    But when I try to use the updated version of html_output.php I get only the green bar portion of the header in the admin side of the site and this error:

    Fatal error: Call to undefined function zen_catalog_href_link() in /home/needgcom/public_html/elocin/includes/header.php on line 219

    If I switch back to the core file from the 1.3.7 download then I can access my admin again but still have no export button for this mod.

    Any suggestions?

    Thanks,
    Marc
    In shipping_export.php of the root admin folder, on line 543 change the word "orders" to order". You will see your export button after that...

  5. #75
    Join Date
    Jan 2005
    Posts
    186
    Plugin Contributions
    0

    Default Re: Export Shipping & Order Information

    Wow, thanks a lot. The correction showed up on line # 550 in Notepad though not 543. I was able to find it by looking at the last items that did show up on the screen before the error.

    Thanks again,
    Marc

  6. #76
    Join Date
    May 2007
    Posts
    181
    Plugin Contributions
    0

    Default Re: Export Shipping & Order Information

    Quote Originally Posted by tat2nu View Post
    Wow, thanks a lot. The correction showed up on line # 550 in Notepad though not 543. I was able to find it by looking at the last items that did show up on the screen before the error.

    Thanks again,
    Marc
    Weird, in DW, its 543...are you using version 1.2.3?

  7. #77
    Join Date
    Jan 2005
    Posts
    186
    Plugin Contributions
    0

    Default Re: Export Shipping & Order Information

    Yeah, it is 1.2.3 not sure why it would be different.

  8. #78
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Export Shipping & Order Information

    For some reason the "company" field is left blank in the excel output. In the database almost every single order has a company name. I saw one other post with the same problem, but can't find the solution.

    I changed the "delivery_company" in admin/shipping_export.php to "customers_company" (on lines 151,441,452,459) just to test the result and the field is still left empty.

    Anyone know what's wrong?

    Great Contribution by the way.

    Thanks.

  9. #79
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Export Shipping & Order Information

    Quote Originally Posted by AATECH View Post
    For some reason the "company" field is left blank in the excel output. In the database almost every single order has a company name. I saw one other post with the same problem, but can't find the solution.

    I changed the "delivery_company" in admin/shipping_export.php to "customers_company" (on lines 151,441,452,459) just to test the result and the field is still left empty.

    Anyone know what's wrong?

    Great Contribution by the way.

    Thanks.
    Just Tried a different test. When you replace "delivery_suburb" with "delivery_company" in all 7 lines (34,53,152,232,441,452,461) The company name shows up in the "Delivery Suburb" section of the excel output.

    So there are 4 instances of "delivery_company" and 7 instances of "delivery_suburb". Is there a reason for this?

  10. #80
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Export Shipping & Order Information

    Quote Originally Posted by tat2nu View Post
    I am getting the same error as everyone else:

    Catchable fatal error: Object of class queryFactoryResult could not be converted to string in /home/growligh/public_html/admin/includes/functions/html_output.php on line 262

    But when I try to use the updated version of html_output.php I get only the green bar portion of the header in the admin side of the site and this error:

    Fatal error: Call to undefined function zen_catalog_href_link() in /home/needgcom/public_html/elocin/includes/header.php on line 219

    If I switch back to the core file from the 1.3.7 download then I can access my admin again but still have no export button for this mod.

    Any suggestions?

    Thanks,
    Marc
    The "catchable fatal error" message is a zen cart / php compatability issue. Not actually a contribution issue.

    The answer to the "catchable error" is found here:

    http://www.zencartoptimization.com/2...r-html-output/
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

 

 
Page 8 of 53 FirstFirst ... 67891018 ... LastLast

Similar Threads

  1. Export Shipping+Order Information plugin not exporting some orders
    By woemlavy in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 22 Mar 2013, 02:01 PM
  2. v138a Trouble Installing Export Shipping+Order Information
    By scripto in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 16 Jan 2013, 11:36 PM
  3. Export Shipping/Order Information - dump down to 2 sheets or XML
    By sbbemn in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 4 Oct 2012, 05:37 PM
  4. Export Shipping / Order Information
    By digruk in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 28 Oct 2011, 08:25 PM
  5. Export Shipping Order Information doesn't include downloadable products?
    By rcaroe in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 31 Jul 2010, 05:14 PM

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