Page 55 of 188 FirstFirst ... 545535455565765105155 ... LastLast
Results 541 to 550 of 1878
  1. #541
    Join Date
    Nov 2006
    Location
    Indiana
    Posts
    192
    Plugin Contributions
    0

    Default Re: EO 4.1 + Reward Points

    Quote Originally Posted by lhungil View Post
    Did you run the edit orders installer (step 3 - Install)?
    Yes.

    Quote Originally Posted by lhungil View Post
    What messages (if any) did you see at the top of the screen (during step 3 - Install)?
    I can't remember the message exactly, but it was successful. No errors.

    Quote Originally Posted by lhungil View Post
    What is the URL in the browser's address bar after you click "edit" (replace your admin folder name with admin)?
    /admin/edit_orders.php?page=1&oID=8696&action=edit

    Quote Originally Posted by lhungil View Post
    What are the contents of any Zen Cart "debug" logs generated when clicking "edit" (use code tags)?
    [19-Jun-2014 12:20:17] PHP Warning: include_once(/path_I_know/includes/modules/shipping/ups.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /path_I_know/includes/classes/shipping.php on line 67
    [19-Jun-2014 12:20:17] PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening '/path_I_know/includes/modules/shipping/ups.php' for inclusion (include_path='.:/usr/lib64/php:/usr/lib/php') in /path_I_know/includes/classes/shipping.php on line 67
    [19-Jun-2014 12:20:17] PHP Fatal error: Class 'ups' not found in /path_I_know/includes/classes/shipping.php on line 68

    OK - that was revealing - but what does it mean? I forgot the new version of ZC can do that. I'm re-building my site. Was a 1.3.8a database upgraded to a 1.5.1.

  2. #542
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: EO 4.1 + Reward Points

    Quote Originally Posted by Three Sisters View Post
    ... "Failed opening '/path_I_know/includes/modules/shipping/ups.php'" ...
    Basically, that error message is PHP stating it was unable to load the specified file.

    If "path_I_know" is your "catalog" (/) directory:
    The usual cause is the "old" store had a "ups" shipping module installed and enabled. I'd guess the "new" store does not have the "ups" shipping module installed. I'd also guess before exporting / upgrading the database the shipping modules were not removed using the Zen Cart admin. When this sequence of events occurs, the Zen Cart database still thinks the modules exists and are enabled. This triggers the shipping class to load the corresponding files (which are not present) and thus the above error message.

    Potential Fixes: Install the "ups" module (files, then remove and install from the Zen Cart admin interface to clean up the database). Or manually remove the entry for "ups.php" from the list of installed modules in the Zen Cart database. "SELECT * FROM `configuration` WHERE `configuration_key`='MODULE_SHIPPING_INSTALLED'".

    If "path_I_know" is your "admin" (/admin) directory:
    Most likely one of the paths in "/admin/includes/configure.php" is not right or when merging files during the installation of "Edit Orders" a merge was bungled (possibly in "/includes/classes/shopping.php").
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  3. #543
    Join Date
    Nov 2006
    Location
    Indiana
    Posts
    192
    Plugin Contributions
    0

    Default Re: EO 4.1 + Reward Points

    Simple fix! Thanks a million for explaining. It was the catalog directory. Sorry - didn't mean to be ambiguous. Thought if I didn't write "admin" it was assumed. But then, I guess it's never safe to assume. :)

    So everything works now (Super Orders and Edit Orders). Is it too late to add the TY Package Tracker?

  4. #544
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: EO 4.1 + Reward Points

    Quote Originally Posted by Three Sisters View Post
    Simple fix! Thanks a million for explaining. It was the catalog directory. Sorry - didn't mean to be ambiguous. Thought if I didn't write "admin" it was assumed. But then, I guess it's never safe to assume. :)

    So everything works now (Super Orders and Edit Orders). Is it too late to add the TY Package Tracker?
    No.. follow the readme instructions pay particular attention the the integration with other modules..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #545
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,413
    Plugin Contributions
    94

    Default Re: EO 4.1 + Reward Points

    Never mind, I'm not sure what I saw.
    Last edited by lat9; 11 Jul 2014 at 07:09 PM.

  6. #546
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,413
    Plugin Contributions
    94

    Default Re: Edit Orders v4.0 Support Thread

    Back again (sigh). Running Edit Orders 1.4.4 (all forum-specified updates applied) on Zen Cart v1.5.1 for a store that uses a bunch of dropdown attributes to include onetime-charges for various product features.

    If I edit an order and change one of these attributes (clicking the "Update" button), the proper onetime charge is recorded in the orders_products_attributes table, but the orders_products table's onetime_charges field does not get updated. The following code fragment is in the edit_orders_functions.php module's eo_get_new_product function; I'm thinking that this is where I need to make the change, given the fact that the DROPDOWN type attribute is being handled by the do-nothing default clause. Any guidance would be appreciated!
    Code:
    	// Handle attributes
    	if(is_array($product_options) && count($product_options > 0))
    	{
    		$retval['attributes'] = array();
    
    		include_once(DIR_WS_CLASSES . 'attributes.php');
    		$attributes = new attributes();
    
    		foreach($product_options as $option_id => $details) {
    			$attr = array();
    			switch($details['type']) {
    				case PRODUCTS_OPTIONS_TYPE_TEXT:
    				case PRODUCTS_OPTIONS_TYPE_FILE:
    					$attr['option_id'] = $option_id;
    					$attr['value'] = $details['value'];
    					if($attr['value'] == '') continue 2;
    
    					// There should only be one text per name.....
    					$get_attr_id = $attributes->get_attributes_by_option($product_id, $option_id);
    					if(count($get_attr_id) == 1) $details['value'] = $get_attr_id[0]['products_attributes_id'];
    					unset($get_attr_id);
    					break;
    				case PRODUCTS_OPTIONS_TYPE_CHECKBOX:
    					if(!array_key_exists('value', $details)) continue 2;
    					$tmp_id = array_shift($details['value']);
    					foreach($details['value'] as $attribute_id) {
    						// We only get here if more than one checkbox per
    						// option was selected.
    						$tmp = $attributes->get_attribute_by_id($attribute_id, 'order');
    						$retval['attributes'][] = $tmp;
    
    						// Handle pricing
    						$prices = eo_get_product_attribute_prices(
    							$attribute_id, $tmp['value'], $product_qty
    						);
    						unset($tmp);
    						if(!$query->EOF) {
    							$retval['onetime_charges'] += $prices['onetime_charges'];
    							$retval['final_price'] += $prices['price'];
    						}
    					}
    					$details['value'] = $tmp_id;
    					$attr = $attributes->get_attribute_by_id($details['value'], 'order');
    					unset($attribute_id); unset($attribute_value); unset($tmp_id);
    					break;
    				default:
    					$attr = $attributes->get_attribute_by_id($details['value'], 'order');
    			}
    			$retval['attributes'][] = $attr;
    
    			if(!$query->EOF) {
    				// Handle pricing
    				$prices = eo_get_product_attribute_prices(
    					$details['value'], $attr['value'], $product_qty
    				);
    				$retval['onetime_charges'] += $prices['onetime_charges'];
    				$retval['final_price'] += $prices['price'];
    			}
    		}
    		unset($query, $attr, $prices, $option_id, $details);
    	}

  7. #547
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Edit Orders v4.0 Support Thread

    @lat9 Send you an email.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  8. #548
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,413
    Plugin Contributions
    94

    Default Re: Edit Orders v4.0 Support Thread

    Thanks, lhungil. I found another "funny" with the dropdown (and possibly other flavors) of attributes; the ordering of the attribute values in the dropdown were all over the place, i.e. not in their defined sort-order. I made the following change to the /YOUR_ADMIN/includes/classes/attributes.php module to correct:
    Code:
    	/**
    	 * Returns a multidimensional array containing the product attribute options
    	 * id / name / value rows for the specified product sorted by option id.
    	 *
    	 * @param int|string $zf_product_id the specified product id.
    	 * @param bool $readonly include readonly attributes not required to add a
    	 *        product to the cart, defaults to false.
    	 * @return array
    	 */
    	function get_attributes_options($zf_product_id, $readonly = false) {
    		global $db;
    		$query = 'SELECT attr.products_attributes_id, attr.products_id, attr.options_id, opt.products_options_name, val.products_options_values_name, opt.products_options_type, products_options_size, opt.products_options_rows ' .
    			'FROM ' . TABLE_PRODUCTS_ATTRIBUTES . ' AS attr ' .
    			'LEFT JOIN ' . TABLE_PRODUCTS_OPTIONS .
    				' AS opt ON attr.options_id = opt.products_options_id ' .
    			'LEFT JOIN ' . TABLE_PRODUCTS_OPTIONS_VALUES .
    				' AS val ON attr.options_values_id = val.products_options_values_id ' .
    			'WHERE attr.products_id = \'' . (int)$zf_product_id . '\' ' .
    				'AND val.language_id = \'' . (int)$_SESSION['languages_id'] . '\' ' .
    				'AND val.language_id = opt.language_id ';
    
    		// Don't include READONLY attributes if product can be added to cart without them
    		if(PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' && $readonly === false) {
    			$query .= 'AND opt.products_options_type != \'' . PRODUCTS_OPTIONS_TYPE_READONLY . '\' ';
    		}
    
    //-bof-20140712-lat9-Fix up attributes' sort order.
    //		$query .= 'ORDER BY `opt`.`products_options_sort_order`, `attr`.`options_id`';
    		$query .= 'ORDER BY `attr`.`options_id`, `attr`.`products_options_sort_order`';
    //-eof-20140712-lat9
    
    		if($this->cache_time == 0) $queryResult = $db->Execute($query);
    		else $queryResult = $db->Execute($query, false, true, $this->cache_time);
    
    		$retval = array();
    		while (!$queryResult->EOF) {
    			$retval[$queryResult->fields['products_attributes_id']] = array(
    				'id' => $queryResult->fields['options_id'],
    				'name' => $queryResult->fields['products_options_name'],
    				'value' => $queryResult->fields['products_options_values_name'],
    				'type' => $queryResult->fields['products_options_type'],
    				'length' => $queryResult->fields['products_options_length'],
    				'size' => $queryResult->fields['products_options_size'],
    				'rows' => $queryResult->fields['products_options_rows']
    			);
    			$queryResult->MoveNext();
    		}
    		return $retval;
    	}
    Last edited by lat9; 12 Jul 2014 at 01:50 PM. Reason: fix spelling error

  9. #549
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,413
    Plugin Contributions
    94

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    Thanks, lhungil. I found another "funny" with the dropdown (and possibly other flavors) of attributes; the ordering of the attribute values in the dropdown were all over the place, i.e. not in their defined sort-order. I made the following change to the /YOUR_ADMIN/includes/classes/attributes.php module to correct:
    Code:
    	/**
    	 * Returns a multidimensional array containing the product attribute options
    	 * id / name / value rows for the specified product sorted by option id.
    	 *
    	 * @param int|string $zf_product_id the specified product id.
    	 * @param bool $readonly include readonly attributes not required to add a
    	 *        product to the cart, defaults to false.
    	 * @return array
    	 */
    	function get_attributes_options($zf_product_id, $readonly = false) {
    		global $db;
    		$query = 'SELECT attr.products_attributes_id, attr.products_id, attr.options_id, opt.products_options_name, val.products_options_values_name, opt.products_options_type, products_options_size, opt.products_options_rows ' .
    			'FROM ' . TABLE_PRODUCTS_ATTRIBUTES . ' AS attr ' .
    			'LEFT JOIN ' . TABLE_PRODUCTS_OPTIONS .
    				' AS opt ON attr.options_id = opt.products_options_id ' .
    			'LEFT JOIN ' . TABLE_PRODUCTS_OPTIONS_VALUES .
    				' AS val ON attr.options_values_id = val.products_options_values_id ' .
    			'WHERE attr.products_id = \'' . (int)$zf_product_id . '\' ' .
    				'AND val.language_id = \'' . (int)$_SESSION['languages_id'] . '\' ' .
    				'AND val.language_id = opt.language_id ';
    
    		// Don't include READONLY attributes if product can be added to cart without them
    		if(PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' && $readonly === false) {
    			$query .= 'AND opt.products_options_type != \'' . PRODUCTS_OPTIONS_TYPE_READONLY . '\' ';
    		}
    
    //-bof-20140712-lat9-Fix up attributes' sort order.
    //		$query .= 'ORDER BY `opt`.`products_options_sort_order`, `attr`.`options_id`';
    		$query .= 'ORDER BY `attr`.`options_id`, `attr`.`products_options_sort_order`';
    //-eof-20140712-lat9
    
    		if($this->cache_time == 0) $queryResult = $db->Execute($query);
    		else $queryResult = $db->Execute($query, false, true, $this->cache_time);
    
    		$retval = array();
    		while (!$queryResult->EOF) {
    			$retval[$queryResult->fields['products_attributes_id']] = array(
    				'id' => $queryResult->fields['options_id'],
    				'name' => $queryResult->fields['products_options_name'],
    				'value' => $queryResult->fields['products_options_values_name'],
    				'type' => $queryResult->fields['products_options_type'],
    				'length' => $queryResult->fields['products_options_length'],
    				'size' => $queryResult->fields['products_options_size'],
    				'rows' => $queryResult->fields['products_options_rows']
    			);
    			$queryResult->MoveNext();
    		}
    		return $retval;
    	}
    Hmm, that was closer but not totally correct. This works all the way:
    Code:
    	/**
    	 * Returns a multidimensional array containing the product attribute options
    	 * id / name / value rows for the specified product sorted by option id.
    	 *
    	 * @param int|string $zf_product_id the specified product id.
    	 * @param bool $readonly include readonly attributes not required to add a
    	 *        product to the cart, defaults to false.
    	 * @return array
    	 */
    	function get_attributes_options($zf_product_id, $readonly = false) {
    		global $db;
    		$query = 'SELECT attr.products_attributes_id, attr.products_id, attr.options_id, opt.products_options_name, val.products_options_values_name, opt.products_options_type, products_options_size, opt.products_options_rows ' .
    			'FROM ' . TABLE_PRODUCTS_ATTRIBUTES . ' AS attr ' .
    			'LEFT JOIN ' . TABLE_PRODUCTS_OPTIONS .
    				' AS opt ON attr.options_id = opt.products_options_id ' .
    			'LEFT JOIN ' . TABLE_PRODUCTS_OPTIONS_VALUES .
    				' AS val ON attr.options_values_id = val.products_options_values_id ' .
    			'WHERE attr.products_id = \'' . (int)$zf_product_id . '\' ' .
    				'AND val.language_id = \'' . (int)$_SESSION['languages_id'] . '\' ' .
    				'AND val.language_id = opt.language_id ';
    
    		// Don't include READONLY attributes if product can be added to cart without them
    		if(PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' && $readonly === false) {
    			$query .= 'AND opt.products_options_type != \'' . PRODUCTS_OPTIONS_TYPE_READONLY . '\' ';
    		}
    
    //-bof-20140712-lat9-Fix up attributes' sort order.
    //		$query .= 'ORDER BY `opt`.`products_options_sort_order`, `attr`.`options_id`';
    		$query .= 'ORDER BY `opt`.`products_options_sort_order`, `attr`.`products_options_sort_order`';
    //-eof-20140712-lat9
    
    		if($this->cache_time == 0) $queryResult = $db->Execute($query);
    		else $queryResult = $db->Execute($query, false, true, $this->cache_time);
    
    		$retval = array();
    		while (!$queryResult->EOF) {
    			$retval[$queryResult->fields['products_attributes_id']] = array(
    				'id' => $queryResult->fields['options_id'],
    				'name' => $queryResult->fields['products_options_name'],
    				'value' => $queryResult->fields['products_options_values_name'],
    				'type' => $queryResult->fields['products_options_type'],
    				'length' => $queryResult->fields['products_options_length'],
    				'size' => $queryResult->fields['products_options_size'],
    				'rows' => $queryResult->fields['products_options_rows']
    			);
    			$queryResult->MoveNext();
    		}
    		return $retval;
    	}

  10. #550
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    ... I found another "funny" with the dropdown (and possibly other flavors) of attributes; the ordering of the attribute values in the dropdown were all over the place, i.e. not in their defined sort-order. ...
    Not a surprise, the "attributes.php" file does not sort the attributes. Mostly because the file came from one of my other modules which does not care about the sort order (does it's own sorting dynamically based upon the attributes, attribute type, and some other external criteria). So the code omitted the database sort to improve performance.

    I can see how some store owners would prefer to see the attributes in the same order (when adding a product) as they appear to customers, so will add modifications in the next release to allow both sorted and unsorted options in the "attributes.php" file.

    Thank you for mentioning the behavior and posting an interim fix!
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 

Similar Threads

  1. v150 Super Orders v4.0 Support Thread for ZC v1.5.x
    By DivaVocals in forum Addon Admin Tools
    Replies: 804
    Last Post: 18 Apr 2025, 12:04 AM
  2. v150 Orders Status History -- Updated By [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 34
    Last Post: 29 Jul 2019, 07:05 PM
  3. 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
  4. 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
  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