Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

con4mity

Members
  • Content count

    63
  • Joined

  • Last visited

Posts posted by con4mity


  1. Okay, finally fixed it, even though I'm certain I tried this once. I had to go into configuration->Points/Reward and disable the system and then enable it again. For whatever reason it now shows up!

     

    But it still says:

     

    You don't have Qualified Points yet.

    Date Order No. & Status Comments Points Status Points

     

    03/07/2007 #17 Pending Shopping Points Confirmed 101

    03/06/2007 #15 Processing Shopping Points Confirmed 352

    03/04/2007 #13 Shipped Shopping Points Confirmed 122

    03/02/2007 #12 Shipped Shopping Points Confirmed 46

    03/02/2007 #11 Shipped Shopping Points Confirmed 193

    03/01/2007 #10 Shipped Shopping Points Confirmed 46

    02/28/2007 #9 Shipped Shopping Points Confirmed 111

     

    Even though it says they do on the account page:

     

    Shopping Points Balance : 986 points. Valued at : $98.59

     

    Any ideas?


  2. If I'm missing something obvious here could someone please point it out? This doesn't make sense.

     

    Please tell me what is required for the points to qualify? My buyers have points in the system, but on each of their points page where it shows the points it says they do not have any qualified points? Is there something that has to be done to qualify them? I just can't find the problem.

     

    Anyone?


  3. just a quick question. i've searched but couldn't find an answer.

     

    SUB_HEADING_TITLE

    SUB_HEADING_TEXT

     

    appearing at the bottom of my faq's page. under the list of faq's (1-17)

    anyone have an idea what i've probably left out/missed with the install?!?

    appreciate any feedback. thanx.

     

    I have those also, I don't think you left anything out. I think they are there so that you can add an explanation or introduction to the FAQ. I just removed them.


  4. I've been through this topic, all 66 pages and still my problem persists. I've doubled checked and rechecked all the install notes. I'm not missing anything on any of the changes. My Admin Configuration is like this:

     

    Enable Points system true

    Enable Redemptions system true

    Points per 1.Yen purchase 1

    The value of 1 point when Redeemed 0.1

    Points Decimal Places 0

    Auto Credit Pending Points 0

    Auto Expires Points 12

    Points Expires Auto Remainder 30

    Award points for shipping false

    Award points for Tax false

    Award points for Specials true

    Award points for order with redeemed points true

    Award points for Products Reviews 10

    Enable and set points for Referral System 100

    Enable Products Model Restriction

    Enable Products ID Restriction

    Enable Categories ID Restriction

    Enable Products Price Restriction false

    If you wish to limit points before Redemptions, set points limit 0

    If you wish to limit points to be use per order, set points Max 1000

    Restrict Points Redemption For Minimum Purchase Amount

    New signup customers Welcome Points amount 0

    Maximum number of points records to display 20

    Display Points information in Product info page true

    Keep Records of Redeemed Points true

     

    Yet, no matter what I do all the customers are being given there points but the systems says there are not qualified, and nothing shows up in the checkout process, (And yes I did all the steps including those) that allows them to use the point.

     

    Can anyone offer any advise? I have to think it's just something little considering that everything else is working as expected, or appears to.

     

    The only other thing I'm finding that doesn't make sense is if I change Auto Credit Pending Points to blank, so that it doesn't auto credit, I don't get the checkboxes in the order details page that i used to get.

     

    Please, if anyone has an idea for me to try please post it.


  5. Great piece of work streamlining this feature. I updated the install so that the problem with paging back to the proper page was corrected.

     

    Basically, I didn't want to include page= in the url unless page actually equals something so I did it a bit different then what was done above.

     

    I added: (just under the $action=)

      $page = (isset($HTTP_GET_VARS['page']) ? $HTTP_GET_VARS['page'] : '1');

     

    like this:

    $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
    $page = (isset($HTTP_GET_VARS['page']) ? $HTTP_GET_VARS['page'] : '1');

    because if the page isn't set then it's going to be 1 anyway.

     

    And then I changed:

    		echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n";

     

    to this:

    echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'page=' . $page . '&cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n";

     

    I've updated the instructions and uploaded it to the contributions page.


  6. Great piece of work streamlining this feature. I updated the install so that the problem with paging back to the proper page was corrected.

     

    Basically, I didn't want to include page= in the url unless page actually equals something so I did it a bit different then what was done above.

     

    I added: (just under the $action=)

      $page = (isset($HTTP_GET_VARS['page']) ? $HTTP_GET_VARS['page'] : '1');

     

    like this:

    $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
    $page = (isset($HTTP_GET_VARS['page']) ? $HTTP_GET_VARS['page'] : '1');

    because if the page isn't set then it's going to be 1 anyway.

     

    And then I changed:

    		echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n";

     

    to this:

    echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'page=' . $page . '&cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n";

     

    I've updated the instructions and uploaded it to the contributions page.


  7. Great piece of work streamlining this feature. I updated the install so that the problem with paging back to the proper page was corrected.

     

    Basically, I didn't want to include page= in the url unless page actually equals something so I did it a bit different then what was done above.

     

    I added: (just under the $action=)

      $page = (isset($HTTP_GET_VARS['page']) ? $HTTP_GET_VARS['page'] : '1');

     

    like this:

    $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
    $page = (isset($HTTP_GET_VARS['page']) ? $HTTP_GET_VARS['page'] : '1');

    because if the page isn't set then it's going to be 1 anyway.

     

    And then I changed:

    		echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n";

     

    to this:

    echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'page=' . $page . '&cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n";

     

    I've updated the instructions and uploaded it to the contributions page.


  8. Hi all, great contribution. I did the install and everything seems to work with the exception that when a customer with points checksout, they are not offered to option of using their points. Also, if I login as a customer with points, I can see all the points, but at the top it says "You don't have Qualified Points yet." And then under that it lists their points.

     

    Anyone familiar with what I might have missed to cause this?

     

    Thanks,

    con4mity


  9. Hi Corey,

     

    I have installed in 2.1c and still have the same problem where the SEO URL is not appearing in my administrative configuration. Can you pls let me know what changes did you do after your installation.

     

    Thank you

    Trixie

     

    I tested the site! If you go to your homepage and try links are they search enging friendly? I think during this testing the configuration values are populated.

     

    what you're need is something like this most likely to run. Which is part of the installer run the first time you visit your website.

     

    seo.class.php

     

    function SEO_URL_INSTALLER(){
    
    	$this->attributes = array();
    
    	$x = 0;
    	$this->default_config = array();
    	$this->default_config['SEO_ENABLED'] = array('DEFAULT' => 'true',
    												 'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable SEO URLs?', 'SEO_ENABLED', 'true', 'Enable the SEO URLs?  This is a global setting and will turn them off completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    												 );
    	$x++;
    	$this->default_config['SEO_ADD_CPATH_TO_PRODUCT_URLS'] = array('DEFAULT' => 'false',
    	   															   'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Add cPath to product URLs?', 'SEO_ADD_CPATH_TO_PRODUCT_URLS', 'false', 'This setting will append the cPath to the end of product URLs (i.e. - some-product-p-1.html?cPath=xx).', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    																	);
    	$x++;
    	$this->default_config['SEO_ADD_CAT_PARENT'] = array('DEFAULT' => 'true',
    	   													'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Add category parent to begining of URLs?', 'SEO_ADD_CAT_PARENT', 'true', 'This setting will add the category parent name to the beginning of the category URLs (i.e. - parent-category-c-1.html).', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    														);
    	$x++;
    	$this->default_config['SEO_URLS_FILTER_SHORT_WORDS'] = array('DEFAULT' => '3',
    	   															 'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Filter Short Words', 'SEO_URLS_FILTER_SHORT_WORDS', '3', 'This setting will filter words less than or equal to the value from the URL.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, NULL)"
    																);
    	$x++;
    	$this->default_config['USE_SEO_CACHE_GLOBAL'] = array('DEFAULT' => 'true',
    	   													  'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable SEO cache to save queries?', 'USE_SEO_CACHE_GLOBAL', 'true', 'This is a global setting and will turn off caching completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    														  );
    	$x++;
    	$this->default_config['USE_SEO_CACHE_PRODUCTS'] = array('DEFAULT' => 'true',
    															'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable product cache?', 'USE_SEO_CACHE_PRODUCTS', 'true', 'This will turn off caching for the products.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    															);
    	$x++;
    	$this->default_config['USE_SEO_CACHE_CATEGORIES'] = array('DEFAULT' => 'true',
    	   														  'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable categories cache?', 'USE_SEO_CACHE_CATEGORIES', 'true', 'This will turn off caching for the categories.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    															  );
    
    	$x++;
    	$this->default_config['USE_SEO_CACHE_MANUFACTURERS'] = array('DEFAULT' => 'true',
    	   															 'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable manufacturers cache?', 'USE_SEO_CACHE_MANUFACTURERS', 'true', 'This will turn off caching for the manufacturers.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    																 );
    
    	$x++;
    	$this->default_config['USE_SEO_CACHE_ARTICLES'] = array('DEFAULT' => 'true',
    	   														'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable articles cache?', 'USE_SEO_CACHE_ARTICLES', 'true', 'This will turn off caching for the articles.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    															);
    	$x++;
    	$this->default_config['USE_SEO_CACHE_TOPICS'] = array('DEFAULT' => 'true',
    	   													  'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable topics cache?', 'USE_SEO_CACHE_TOPICS', 'true', 'This will turn off caching for the article topics.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    														  );
    	$x++;
    	$this->default_config['USE_SEO_CACHE_INFO_PAGES'] = array('DEFAULT' => 'true',
    	   														  'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable information cache?', 'USE_SEO_CACHE_INFO_PAGES', 'true', 'This will turn off caching for the information pages.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    															  );
    	$x++;
    	$this->default_config['USE_SEO_REDIRECT'] = array('DEFAULT' => 'true',
    	   												  'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable automatic redirects?', 'USE_SEO_REDIRECT', 'true', 'This will activate the automatic redirect code and send 301 headers for old to new URLs.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    													  );
    	$x++;
    	$this->default_config['SEO_REWRITE_TYPE'] = array('DEFAULT' => 'Rewrite',
    	   												  'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Choose URL Rewrite Type', 'SEO_REWRITE_TYPE', 'Rewrite', 'Choose which SEO URL format to use.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''Rewrite''),')"
    													  );
    	$x++;
    	$this->default_config['SEO_CHAR_CONVERT_SET'] = array('DEFAULT' => '',
    	   													  'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enter special character conversions', 'SEO_CHAR_CONVERT_SET', '', 'This setting will convert characters.<br><br>The format <b>MUST</b> be in the form: <b>char=>conv,char2=>conv2</b>', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, NULL)"
    														  );
    	$x++;
    	$this->default_config['SEO_REMOVE_ALL_SPEC_CHARS'] = array('DEFAULT' => 'false',
    	   														   'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Remove all non-alphanumeric characters?', 'SEO_REMOVE_ALL_SPEC_CHARS', 'false', 'This will remove all non-letters and non-numbers.  This should be handy to remove all special characters with 1 setting.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    																);
    	$x++;
    	$this->default_config['SEO_URLS_CACHE_RESET'] = array('DEFAULT' => 'false',
    	   													  'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Reset SEO URLs Cache', 'SEO_URLS_CACHE_RESET', 'false', 'This will reset the cache data for SEO', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), 'tep_reset_cache_data_seo_urls', 'tep_cfg_select_option(array(''reset'', ''false''),')"
    														  );
    
    	$this->init();
    } # end class constructor


  10. con4mity,

     

    Have you made changes to the seo.class.php file to support pages with titles_id?

     

    -Skittles

     

    Yes, and part of the problem was in seo.class.php

     

    But it's still not right somewhere. My seo.class.php changes:

     

    changes in catalog/includes/classes/seo.class.php
    
    about line 288 add:
    
    /* Data Collecters 1.0 */									
    
     );
    	$x++;
    	$this->default_config['USE_SEO_CACHE_MANUFACTURERS'] = array('DEFAULT' => 'true',
    
    
    	 'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable manufacturers cache?', 
    
    'USE_SEO_CACHE_MANUFACTURERS', 'true', 'This will turn off caching for the manufacturers.', GROUP_INSERT_ID, ".$x.", 
    
    NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')"
    
    
    	 );
    /* EOF Data Collecters 1.0 */
    
    about line 568 add:
    
    /* Data Collector */
    'USE_SEO_CACHE_TITLES' => defined('USE_SEO_CACHE_TITLES') ? USE_SEO_CACHE_TITLES : 'false',
    /* Data Collecters 1.0 */
    
    about line 590 add:
    
    'titles_id' => '-z-',
    
    about line 615 add:
    
    if ( $this->attributes['USE_SEO_CACHE_TITLES'] == 'true' ) $this->generate_titles_cache();
    
    about 982 add:
    
    function get_titles_name($zID){
    switch(true){
    	case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && defined('TITLES_NAME_' . $zID)):
    		$this->performance['CACHE_QUERY_SAVINGS']++;
    		$return = constant('TITLES_NAME_' . $zID);
    		$this->cache['TITLES'][$zID] = $return;				
    		break;
    	case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && isset($this->cache['TITLES'][$zID])):
    		$this->performance['CACHE_QUERY_SAVINGS']++;
    		$return = $this->cache['TITLES'][$zID];
    		break;
    	default:
    		$this->performance['NUMBER_QUERIES']++;
    		$sql = "SELECT TITLES_name as zName 
    				FROM ".TABLE_TITLES." 
    				WHERE TITLES_id='".(int)$zID."' 
    				LIMIT 1";
    		$result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
    		$zName = $this->strip( $result['zName'] );
    		$this->cache['TITLES'][$mID] = $zName;
    		$this->performance['QUERIES']['TITLES'][] = $sql;
    		$return = $zName;
    		break;								
    } # end switch		
    return $return;
    } # end function
    
    about 1497 add:
    
    	function generate_titles_cache(){
    	$this->is_cached($this->cache_file . 'titles', $is_cached, $is_expired);	  
    	if ( !$is_cached || $is_expired ) { // it's not cached so create it
    	$sql = "SELECT z.titles_id as id, z.titles_name as name 
    			FROM ".TABLE_TITLES." z 
    			LEFT JOIN ".TABLE_TITLES_INFO." zd 
    			ON z.titles_id=zd.titles_id 
    			AND zd.languages_id='".(int)$this->languages_id."'";
    	$titles_query = $this->DB->Query( $sql );
    	$man_cache = '';
    	while ($titles = $this->DB->FetchArray($titles_query)) {
    		$define = 'define(\'TITLES_NAME_' . $titles['id'] . '\', \'' . $this->strip($titles['name']) . '\');';
    		$man_cache .= $define . "\n";
    		eval("$define");
    	}
    	$this->DB->Free($titles_query);
    	$this->save_cache($this->cache_file . 'titles', $man_cache, 'EVAL', 1 , 1);
    	unset($man_cache);
    	} else {
    		$this->get_cache($this->cache_file . 'titles');		
    	}
    } # end function

     

    now, I'm getting the expected output for the url, but still the product_list isn't correct. (The items that display are not the product expected. ) Closer, maybe titles_id= isn't being passed because of the modified url?


  11. I have a SEO related question. I installed the 2.x version and it works great. Except for one little snafu on my home page: http://www.ecorey.com I have an additional data collector. Per an ordinary site you have one data collector, which by default collects data about manufacturers, I've mirrored that to another set of data called titles, this data is held in titles, and titles_info tables, and has all the same corresponding files as the manufacturers system does, titles.php, title_info.php, and so forth.

     

    I've added:

     

    RewriteRule ^(.*)-z-(.*).html$ index.php?titles_id=$2&%{QUERY_STRING}

     

    to my .htaccess

     

    I'm expecting the url output to be something like this dc-comics-z-15.html, because 15 is the titles_id, but instead it shows up as index.php?titles_id=15 and nothing shows up as expected.

     

    Any ideas?


  12. you need to escape the link, not the anchor text, hey! :

     

    <a href="advanced_search_result.php?keywords='. escape($extra_fields['value']) . '">';
    		   echo $extra_fields['value'];
    		   echo'</a><BR></font> </tr></table></td></tr>';

     

     

    Actually, when I edited that last post I put the value backwards. What I was trying was:

     

    <a class="ml" href="advanced_search_result.php?keywords='. escape($extra_fields['value']) .'">' . $extra_fields['value'] . '</a>

     

    But it doesn't work. The field ends up being empty and it ends execution of the while statement so it doesn't output the remaining extra_fields. As a fix to this I did it the long way for now.

     

    // Added 021107
    while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
    	 	   if (! $extra_fields['status'])  // show only enabled extra field
    	   	   continue;
    		   echo '<tr>
    				 <td width=30></td><td>
    				 <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
    		  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
    							//Added 021207 Check for Output Style 1=Linked 0=Normal
    	if($extra_fields['linked'] == 1) {
    	$extra_fields_value=str_replace(" ", "+", $extra_fields['value']);
    		   	echo '<font size="1" color="#666666"><a class="ml" href="advanced_search_result.php?keywords='. $extra_fields_value .'">' . $extra_fields['value'] . '</a><BR></font> </tr></table></td></tr>';
    	} else {
    	echo '<font size="1" color="#666666">' . $extra_fields['value'] . '<BR></font> </tr></table></td></tr>';
    	}

     

    You'll notice a few new pieces here besides the str_relpace. First I've added an extra tabel to the products_extra_fields table called products_extra_fields_linked. This is just yes/no and I can turn it on in the admin, just like status column. If it's on the system creates the links, if false then it outputs normal lines. I think eveyone should add this simple functionality because it makes finding related products easy and it can be left off when not needed.

     

    But I haven't found a good trigger to define when to limit my search clause, so it's a bit incomplete.


  13. ) is the problem, since taking escape out makes it work again, but it doesn't produce Robert+de+niro, just Robert de Niro. Is the sytnax wrong... or... what?

     

    this works though str_replace(" ", "+", $keywords);

     

     

    Oddly enough, some part of this broke the search in that now I can't search using Quotes. When I search for say Alan Moore, I get all the products with Alan Moore in them. But if I search for "Alan Moore" I don't get anything.


  14. escape($extra_field_value) .

    it turn "robert de Niro" into "Robert+de+Niro" when it builds the url. That's it.

     

    Well, I'm not using it and my searches are seeming to work right, but I'm curious what I'm doing wrong that escape() seems to break my link instead of fixing them. See how I have them below. When I do this nothing is echoed to the screen.

     

    // Added 021107
      while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
    	   if (! $extra_fields['status'])  // show only enabled extra field
    		continue;
    		 echo '<tr>
    				  <td width=30></td><td>
    				 <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
    				  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
    		   echo '<font size="1" color="#666666"><a href="advanced_search_result.php?keywords='. $extra_fields['value'].'">';
    		   echo escape($extra_fields['value']);
    		   echo'</a><BR></font> </tr></table></td></tr>'; 
    			  }

     

    This just produces the first extra field name, not the value and none of the extra field names after the first. Obviously excape($extra_field['value']) is the problem, since taking escape out makes it work again, but it doesn't produce Robert+de+niro, just Robert de Niro. Is the sytnax wrong... or... what?


  15. Okay, this works pretty well. I now generate my extra fields, and the values are links back to advanced_search_results.php poplulated with related products. But as was mentioned because of the extensive seach pattern, any appearance of the keywords shows up.

     

    To deal with this I figured that since I was calling the advancedd_search_results.php directly and bypassing the advanced_search.ph and not hitting the "Search" but I should be able to test for that action. Does anyone know what action to test for? (action=submit) the button is:

    <?php echo tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH); ?>

    It seems like I could work this in as

     

    if $action != 'Submit' {
    where=full where statement
    }else{
    where=extra fields only
    }

     

    But, since that doesn't work, and I'm not yet sure if there is an action variable, or maybe i need to define and set it up in the check_form function, but again since I'm not sure what it is, I cheated at the moment by adding an extra variable in my link, extrafield=yes, now I can do the same thing, I just hate adding this extra variable considering that what I need is likely already there. But maybe if someone can point it out I can get swap it out at that time.

     

    The escape did work, I had an extra .' in there messing things up. My links now work. Here's a sample. sample page

     

    To me, this should be an option in the admin, to either make the field linkable or leave it unlinked. Maybe just an extra table, products_extra_field_linked, when it's set to true it generates the link like I have, if false, just output the regular line. To me I can't see how people aren't wanting this. Make it a add-on to an add-on or something.

     

    Do you think it's worth adding this feature and upload it to the contributions page? Or ... yes I think you should it's very nice, even nicer if you can figure out how to test it the actual search button was pushed or not, or maybe by testing for referrer, and if it's not advanced_search.php, use the modified where claus.

     

    Heck, I bet if you're good with joins you could even get it to just search in that exact extra field and not all of them.

     

    What do you think?


  16. my advanced search is similiar to yours

     

    		  $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%' or pd.products_description like '%" . tep_db_input($keyword) . "%' or p2pef.products_extra_fields_value like '%" . tep_db_input($keyword) . "%'";

     

    and yes there is a problem with it pulling from all, I think i need to figure out how to just query my p2pef.products_extra_fields_value table as the results would be 90% by skipping the other fields for this search.

     

    Any ideas on that?


  17. Actually there are some typos in that. This produces the desire looking link, but doesn produce the results. It's close I think there's a capsulation issue here. It's closer, can you see my problem, I don't quite understand the

     

    . escape($extra_field_value) .

     

    that you used, or how to apply it in my code. How would you do it here:

     

    // Added 021107
    	 while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
    	 	   if (! $extra_fields['status'])  // show only enabled extra field
    	   	   continue;
    		   echo '<tr>
    			 		<td width=30></td><td>
    				  <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
    				  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
    		   echo '<font size="1" color="#666666"><a href="advanced_search_result.php?keywords="'. $extra_fields['value'].' ">';
    		   echo $extra_fields['value'];
    		   echo'</a><BR></font> </tr></table></td></tr>'; 
    			  }

     

     

    something like:

     

    // Added 021107
    	 while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
    	 	   if (! $extra_fields['status'])  // show only enabled extra field
    	   	   continue;
    		   echo '<tr>
    			 		<td width=30></td><td>
    				  <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
    				  <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
    		   echo '<font size="1" color="#666666"><a href="advanced_search_result.php?keywords='. $extra_fields['value'].'">';
    		   echo $extra_fields['value'];
    		   echo'</a><BR></font> </tr></table></td></tr>'; 
    			  }

     

    Which Seems to work real nice! Gonna run with that for a bit!


  18. <div>

    <?php

    echo 'Actor: <a href="http://www.yourdomain.com/advanced_search_result1.php?keywords=' . escape($extra_field_value) . '">'. $extra_field_value . '</a><br>;

    echo 'Director: <a href="http://www.yourdomain.com/advanced_search_result2.php?keywords=' . escape($extra_field_value) . '">'. $extra_field_value . '</a><br>;

    echo 'Genre: <a href="http://www.yourdomain.com/advanced_search_result3.php?keywords=' . escape($extra_field_value) . '">'. $extra_field_value . '</a>;

    ?>

    </div>

     

    That static nature of this bothers me. I want to build the Field Names from the products_extra fields table. I'm using this:

     $extra_fields_query = tep_db_query("
    	 SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
    	 FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
    	 LEFT JOIN  ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf
    	 ON ptf.products_extra_fields_id=pef.products_extra_fields_id
    	 WHERE ptf.products_id=". (int) $products_id ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."')
    	 ORDER BY products_extra_fields_order");
    
     while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
    	if (! $extra_fields['status'])  // show only enabled extra field
    	   continue;
    	echo '<tr>
      <td width=30></td><td>
      <table border="0" width="400" cellspacing="0" cellpadding="2px"><tr>
      <td class="main" align="left" vallign="middle"><b><font size="1" color="#666666">'.$extra_fields['name'].': </b></font>';
    	echo '<font size="1" color="#666666"><a href="http://www.yourdomain.com/advanced_search_result.php?keywords="' .$extra_fields['value'].'">'.' .$extra_fields['value'].'</a><BR></font> </tr>
      </table>
      </td>
      </tr>'; 
     }

     

    That's close I'm going to give it a try shortly.


  19. ixnay on that! I think I over-easy_poppulated! No, somehow using full inserts on my last backup, when I restored it has create new copies of a subcategory into the main root of categories? After removing them from the export file, and manually deleting the categories created in the admin, it seems the products now have their proper extra fields. errr.. easy populate... going to check the compatibility a bit I guess?


  20. These links are really easy to create, here is the secret ;-)

     

    That does work just fine, thanks for the idea. In working on this though it has come to my attention that sometimes my products are loosing the values that I've assigned to their extra fields. I just edited one that had all the extra fields and then went back later and found that they were all gone. I've suspected this to be happening on other products but only just prooved it to myself with a product I knew was filled in. Do you know of why this might happen? I can't seem to recreate the problem simply by opening and closing them. There must be a mechinism underwhich they are unlinked or removed.

     

    I'm not sure the extra field contrib is working for me. (Especially if they disappear.) In fact for my needs I realize what I really need isn't just a field but a complete set of tables per some of the fields. Like the manufacturer tables. Especially for actor, director, and so forth, not only so I can sort related products but so I can hold additional information about each.

     

    Do you know of a mod that adds addition MFG like tables? Or would I just need to recreate the mfg system over and over, adding possibly and extra field to products for an id, and then then an actor_to_products table to track the relationships?

     

    It's getting complicated I think, maybe I should seek a professional. My teeny bit of php experience doesn't give me the skills for this. Thought I'd check though!


  21. why don't you use links for each extra field value that lead to a page of results, instead of creating menus that will contain hundreds of items... and not even redirect the customer to anything (just a drop down menu?)

     

    Actor: Robert de Niro

    Genre: Thriller

    Director: Martin Scorcese

     

    For this, the extra field mod is not the easiest to work with. It would be better to create "real" fixed fields in your products table, and not in a related table, because you will be using - and also extending - the advanced search results link structure that searches in your products table extra fields.

     

    I like that. I actually wouldn't have as many options as it might seem as I actually only put in the popular names that people might actually come looking for, but is your method of creating those links easier? If that linked back to the product listing.php page and then showed just Actor=Robert de Niro that would work.

     

    I've begun to consider the idea of adding extra fields to the product table. I might go that route but would still want to be able to group on those rows. The other thing doing so would accomplish is make my site more compatible with Easy Populate which I could see be very handy.

     

    Btw, the drop down menu would redirect to the product_listing.php page and give a list of products that have the same exact value in the same exact extra field. Actort=Rober de Niro would give me a product_listing.php with all the products in my system that de Niro was an actor in and that I have availabe.

     

    I'm still not sure you're following what I'm talking about. It would basically be a bunch of MFG type lookups that link to product_listing, just as if you select a MFG and were shown all their products. Does that make sense?


  22. Okay, maybe I'm being very clear. I have and extra field added for artist, and one artist, Alan Moore, is credited for 100 different products. People come to my site they want to see everything done by Alan Moore, wouldn't this be a way to accomodate that?

     

    It seems you're unclear about my intention. I don't want to do anything to the product_info page. I'm trying to make a section that will simplify grouping my items.

     

    As I said, I mostly want to take the Mfg box, and create another box or page that creates a drop down for each extra field and populates it with every unique entry in the system. Then when someone choose something in one of them they'll get a list of every product that has that value as an extra field.

     

    The code you supplied makes it seem like I want to let visitors change the extra fields per product, and I'm not sure how that would even be near what I've discussed.

     

    Ideally having these drop downs appear on the search page would be the better, and I do intend for people to select something, that's the whole point. I'm not sure how a drop down is against interface logic, every store that uses the MFG box has one, they can't all be un-logical... er anti-logical? (Or whatever) can they?


  23. I don't think so. Attributes seem more like options the buyers select about a product. I don't have anything like that. It's not as if you go to my product page and can find a book and it has a choice of being done by this author or that author.

     

    The extra field is really good for me, take a peak: http://www.ecorey.com Choose any product under the "Comic Book" category.

     

    All I'm asking is how might I go about creating a page that would cycle through what extra fields I've created, and then put together drop-downs, like the manufacturer drop-down, for each extra field? This would make a great way for extra fields to be more useful. At least it seems that way for me.

     

    How do you use extra fields if not this way? I mean it shows up on the product page so it must be useful to the buyer. I can understand that a search will pull that data but wouldn't you also like to pull your products based on the extra fields? Like (select * products where extra field="this") or something?

     

    Also, one other thing. Sometimes my extra field data seems to just disappear. I look at the product and it's there, I look later and its not there anymore. Anyone else have that issue, or hear of it?

     

    You are going the wrong way with products extra fields for what you are trying to achieve. You need to use the products attributes, which is already integrated function of oscommerce

  24. Let me expand on that. I have added 4 extra fields. One for Author, Publisher, Series, and Artist. I'd like to creat an area that I can go to and get a listing or drop-down of all the unique entries in each field. This way I might be able to select a certain author, and get all the products associated with him? Yet if other search criteria is entered It could filter it down. for example Maybe I search for books added yesterday by this auther?

     

    Is this hard to do?

     

    Has anyone had any success getting the extra fields to show up as drop-down option on the search page? I'd like to find a way to include them. I'd like for the system to query for each extra field and create a drop-down list of all the unique entries.

     

    Anyone have any ideas on that?

     

    Thanks,

    con4mity

×