Jump to content
kymation

[Development] Products Specifications

Recommended Posts

Could someone help me with following problem:

 

I am trying to build shop using osCommerce + products specifications.

I am able complete installation process for both components. I am able to create specifications and use them when posting new products, however I am not able to create filters.

If I click on yellow folder icon in specification view (where blue folder icon situated) I can not see my specifications, products categories/products after that action (specification view point me, that there are X specifications, but they are not listed). If I do not try to access area where I can create filter - everything works fine (except I do not have filters).

 

I using Russian language as primary language of shop, I tried installation on vanilla English distribution - all work fine.

 

Had someone encountered with such problem? And any ideas how I can overcome it?

 

Thanks in advance

Alex

Share this post


Link to post
Share on other sites

View Specifications in Group for any group, then select a Specification. What is the Filter Class set to? If it's None, you have no Filter set on that Specification.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Could someone help me with following problem:

 

I am trying to build shop using osCommerce + products specifications.

I am able complete installation process for both components. I am able to create specifications and use them when posting new products, however I am not able to create filters.

If I click on yellow folder icon in specification view (where blue folder icon situated) I can not see my specifications, products categories/products after that action (specification view point me, that there are X specifications, but they are not listed). If I do not try to access area where I can create filter - everything works fine (except I do not have filters).

 

I using Russian language as primary language of shop, I tried installation on vanilla English distribution - all work fine.

 

Had someone encountered with such problem? And any ideas how I can overcome it?

 

Thanks in advance

Alex

 

My problem is the same as adonis_ua :( but I use the Hungarian translation of osc!

Please help me because It's a fantastic contribution and I would like to use it my shop :huh:

Share this post


Link to post
Share on other sites

Hi Jim,

 

Superb addition to osCommerce and have worked through installing it slowly but surely.

 

I started with the admin and everything seems to have gone ok except when I click on product specifications under the catalog section the page loads with "groups" on it and shows a search groups box but nothing else.

 

Am I missing something here, from the screenshots it would appear I have done something wrong. Can you help?

 

Thanks for the wonderful contribution and I really hope I can get it installed OK.

 

Regards

 

 

James

Share this post


Link to post
Share on other sites

Have you made the database changes? Nothing works without that.

 

If you have, the script is halting on an error. I need to know what the error is. Check your server's error log, or turn on ALL errors in application_top.php.

 

Regards

JIm


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Have you made the database changes? Nothing works without that.

 

If you have, the script is halting on an error. I need to know what the error is. Check your server's error log, or turn on ALL errors in application_top.php.

 

Regards

JIm

 

Hi Jim,

 

I made the database changes fine.

 

Here is a snippet from my server log: PHP Fatal error: Call to undefined function tep_hide_session_id() in /admin/products_specifications.php on line 1527

 

[06-Jul-2010 11:39:26] PHP Warning: require_once(includes/classes/boxes.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /admin/categories.php on line 21

[06-Jul-2010 11:39:26] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/classes/boxes.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /admin/categories.php on line 21

[06-Jul-2010 12:00:19] PHP Fatal error: Call to undefined function tep_hide_session_id() in /admin/products_specifications.php on line 1527

[06-Jul-2010 13:26:26]

 

 

I take it this is something in the categories file that I have not done??

Share this post


Link to post
Share on other sites

tep_hide_session_id() has been part of stock osCommerce since 2.2RC1. If you're installing on an older version, you're going to have more problems than this. I suggest that you upgrade your store to 2.2RC2a first.

 

Edit: includes/classes/boxes.php is a new file in the admin that is added by this Addon. Yes, you need to copy that file over as well.

 

Regards

Jim

Edited by kymation

See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

tep_hide_session_id() has been part of stock osCommerce since 2.2RC1. If you're installing on an older version, you're going to have more problems than this. I suggest that you upgrade your store to 2.2RC2a first.

 

Regards

Jim

 

Hi Jim,

 

Sorry I thought I had upgraded all to the latest release.

 

Thanks

 

James

Share this post


Link to post
Share on other sites

My problem is the same as adonis_ua :( but I use the Hungarian translation of osc!

Please help me because It's a fantastic contribution and I would like to use it my shop :huh:

 

I think i found the solution:

 

In the admin/products_specifications.php on line 1887 have a fault

 

1887 echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu ('fid', tep_get_specification_filters ($specs_path, $languages_id = 1), $filter_id, 'onClick="this.form.submit();"');

 

If I set it my language id everything works fine :rolleyes:

 

 

And I find a similar problem int the includes/classes/specifications.php on line 107

107 $raw_query_addon_array = tep_get_filter_sql ($filter_class, $specifications_id, $specification, $products_column_name, '4');

 

Now I have an other serious problem!

My language is Hungarian and I use some specifications with "é" and "á" etc. characters and when I try to filter it the script replace my special character

How can I use this contribution with special characters?

 

Please help :o

Share this post


Link to post
Share on other sites

Arbitrarily setting the $languages_id is a bad idea and should not be necessary. You have a problem somewhere in your code that is interfering with the proper setting, or not setting it at all. You should find the actual problem and fix it.

 

I'm working on a fix for special characters in filters. It means rewriting a large chunk of code, so it may be a while before I get that done.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Arbitrarily setting the $languages_id is a bad idea and should not be necessary. You have a problem somewhere in your code that is interfering with the proper setting, or not setting it at all. You should find the actual problem and fix it.

 

I'm working on a fix for special characters in filters. It means rewriting a large chunk of code, so it may be a while before I get that done.

 

Regards

Jim

 

I don't understand you because When I see your code, you set the language id => 1 when you draw a pull down menu. It's in your code not in mine.. You set it to '1' and the variable hold this parameter while I don't restart the browser.

I don't want to set it but for this reason I must because my language id is 4 and when you set the parameter to 1 I don't see everything in the catalogs.

Share this post


Link to post
Share on other sites

I don't understand you because When I see your code, you set the language id => 1 when you draw a pull down menu. It's in your code not in mine.. You set it to '1' and the variable hold this parameter while I don't restart the browser.

I don't want to set it but for this reason I must because my language id is 4 and when you set the parameter to 1 I don't see everything in the catalogs.

 

Moc, are you saying that on certain occasions you dont see anything anymore on the catalogs until you close your browser and logout completely?

That happens to me too, i tought it was a problem with my mods on the mod ...

 

Please confirm or deny.

Thanks in advance

Share this post


Link to post
Share on other sites

Moc, are you saying that on certain occasions you dont see anything anymore on the catalogs until you close your browser and logout completely?

That happens to me too, i tought it was a problem with my mods on the mod ...

 

Please confirm or deny.

Thanks in advance

 

Yes thats was my problem too!

 

Than I do this modification everything works fine!

Edited by moc

Share this post


Link to post
Share on other sites

Yes thats was my problem too!

 

Than I do this modification everything works fine!

I'm sorry, im a bit lost on the topic, would you kindly link me to the modification that you did, so that the catalog would stop disappearing?

Share this post


Link to post
Share on other sites

I'm sorry, im a bit lost on the topic, would you kindly link me to the modification that you did, so that the catalog would stop disappearing?

 

If you use this contribution you find in the original admin/products_specifications.php on line 1887:

 

1887 echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu ('fid', tep_get_specification_filters ($specs_path, $languages_id = 1), $filter_id, 'onClick="this.form.submit();"');

 

Set the $language_id = 'number of your language id(for example 4)' and thats all

Edited by moc

Share this post


Link to post
Share on other sites

If you use this contribution you find in the original admin/products_specifications.php on line 1887:

 

1887 echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu ('fid', tep_get_specification_filters ($specs_path, $languages_id = 1), $filter_id, 'onClick="this.form.submit();"');

 

Set the $language_id = 'your language id' and thats all

 

Thanks moc, very very helpful!

 

Cheers,

David

Share this post


Link to post
Share on other sites

Not at all...

 

So Jim about the special character I think add to array in your code:

For example:

1. with the original spec

$original = array(Fehér,Fém,Üveg,etc..,);

 

2. replaced string

$replace = array(Feher,Fem,Uveg,etc..,);

 

And when your script create the action link replace the Strings and when your script GET the variable replace the string with the original. I know it's not the best way but at this time this is the fastest. I try to find this two function but I don't find exactly where you create the action and where you GET the variables...

 

What do you think?

Share this post


Link to post
Share on other sites

I don't understand you because When I see your code, you set the language id => 1 when you draw a pull down menu. It's in your code not in mine.<snip>

Where in my code? If you tell me where to find it I'll remove it. I can't fix errors when you keep the location secret.

 

Your fix is still wrong. You are just masking a serious error that will cause many other problems in your cart. Again, you need to fix the real error, not cover it over.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Where in my code? If you tell me where to find it I'll remove it. I can't fix errors when you keep the location secret.

 

Your fix is still wrong. You are just masking a serious error that will cause many other problems in your cart. Again, you need to fix the real error, not cover it over.

 

Regards

Jim

 

There is the 3rd time when I write where can I find the mistake!

I download the contribution from here: http://addons.oscommerce.com/info/7014

 

In the zip is in the admin/products_specifications.php on line 1887

 

I don't mod your file I just copy in my store like you told in your user manual!

After this comes the problem: I don't saw anything in my catalog when I click the filters yellow folder icon in the admin section!

After this I tried to find the solution and I found it on your code:

admin/products_specifications.php on line 1887

 

<?php
   echo tep_draw_form ('goto', FILENAME_PRODUCTS_SPECIFICATIONS, '', 'get');
   echo tep_draw_hidden_field ('sgpath', $specs_group_path);
   echo tep_draw_hidden_field ('spath', $specs_path);
   echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu ('fid', tep_get_specification_filters ($specs_path, $languages_id = 1), $filter_id, 'onClick="this.form.submit();"');
   echo tep_hide_session_id() . '</form>';
?>

 

This is your code If i know right?!

Edited by moc

Share this post


Link to post
Share on other sites

Thanks for the bug report. I've fixed that in my master copy. It will be corrected in the next release.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thanks for the bug report. I've fixed that in my master copy. It will be corrected in the next release.

 

Regards

Jim

 

Thank you Jim!

 

I find an other little bug:

 

In catalog/includes/calsses/specifications.php on line 107:

$raw_query_addon_array = tep_get_filter_sql ($filter_class, $specifications_id, $specification, $products_column_name, '1');

 

The End of code you use 1 to language id. I don't remember what was my problem with this but i must to set it to my language id!

 

 

And the what do you think about the 'array replace suggestion'? It is possible?

Share this post


Link to post
Share on other sites

Thanks for that bug report as well. If you substitute $languages_id there, you also need to declare it as a global in the scope of that method, or add it to the method declaration.

 

I don't think that your substitution will work, as it would need to know which characters to substitute at both ends. That is, there would need to be a 1:1 substitution at both ends. I believe that you will find the relevant code in catalog/includes/classes/specifications.php and catalog/includes/nctions/products_specifications.php if you want to try.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

We're trying to integrate the products_specifications into our store and noticed very bad performance on our test system with around 5000 queries when selecting a manufacturer.

We have about 170 manufacturers and almost 300 categories and it appears that the queries to get subcategories are executed for each manufacturer and category separately. We're looking at caching some data into a categories array with arrays of subcategories.

 

Is there anyone who has seen this too ?


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

Yes, I have seen poor performance in some cases. Performance issues are still on the fix-it list.This can be quite complex, as the changes depend on the number of products, number of categories, category structure, number of specifications, etc. This may never get fixed for the general case.

 

Caching is one possibility. I have done this successfully in other areas. Caching your categories might work for you here.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Dont know if i asked this already, but is there a 'how-to' for adding a field to the global search ?

 

I'd like one field (product serial code, which is a text field) to be searchable and give results from the global site search.

Any way to do this ?

 

Nevermind, found a solution.

I will just use a predetermined field for that value into the products table and hack the search to include that field.

If somebody wants to know how, just tell me and i'll post the code here wehn i actuallly do it.

Edited by sypher01

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×