Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Development] Products Specifications


kymation

Recommended Posts

Line 190 must end with a ","

Line 205 must end with a ";"

 

Regards

Jerome

Bother. I keep doing that. Sorry, and thanks for reporting it.

 

Regards

Jim

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

Link to comment
Share on other sites

With the pull down options is there a way to make it write N/A or leave blank instead of 0 as this doesn't fit all situations or can conflict.

 

Thanks for the good work this is really coming along I hope you can find the answer to the filter sorry I can't lend a hand but I am v novice with PHP.

Link to comment
Share on other sites

Hi Jim,

 

This will be my favorite contribution for sure. It is one of the largest modifications of our store but a must have addition.

I think this latest release is almost ready to become your version 1.0. Most bugs are already mentioned on your bugslist.

  1. For the first time entering productdata, I am not sure what the inputfield in Admin product edit should be. I don’t see any textbox, nor any other possibility to enter a value. After preview and update productdata second time entering productdata, I can see inputfileds, like textboxes, pulldownmenus and checkboxes.
     
  2. I don’t understand “Specification Values”, how is this supposed to be different than “Filters”. “Specification Values” don’t seem to be always available. It is only available when using predefined values for entering productdata. However shouldn’t both have the same functionality? Please, could you explain what to do with them?

Regards,

Jerome

Edited by JvdP
Link to comment
Share on other sites

Still have an earlier reported bug which is not on the buglist:

 

When having a specification defined as filterclass Exact and Radiobuttons, filtering requiered two clicks. One to select the radiobutton to filter the products and a second click random around the page to execute the filtering. Looks like the the filter is executed as soon the focus is no longer on the selected radiobutton.

 

Regards,

Jerome

Link to comment
Share on other sites

Still have an earlier reported bug which is not on the buglist:

 

When having a specification defined as filterclass Exact and Radiobuttons, filtering requiered two clicks. One to select the radiobutton to filter the products and a second click random around the page to execute the filtering. Looks like the the filter is executed as soon the focus is no longer on the selected radiobutton.

 

Regards,

Jerome

 

I think line 384 of products_specifications.php should be changed from :

 

		  $box_text .= tep_draw_radio_field ($filter_name, $filter['id'], $checked, 'onChange="this.form.submit();"') . ' ' . $filter['text'];

 

to

 

		  $box_text .= tep_draw_radio_field ($filter_name, $filter['id'], $checked, 'onClick="this.form.submit();"') . ' ' . $filter['text'];

 

Am I right?

 

Regards Jerome

Link to comment
Share on other sites

Jerome:

1. No, I keep fixing that, then (apparently) finding ways to break it. Back on the list. Again.

 

2. Specification Values are used to provide predefined values for specifications entered with the Products. They can have the same values as the Filters but are not required to. They are only available to set up if you have the Enter Specification Values as field set to something other than Text Box. Having this set to Checkbox or Multi is the only way to enter multiple values for a single Specification in a single product.

 

Yes, I really need to write a manual for this thing. It's way too complex to be easy to grasp. I'm starting to feel like Dr. Frankenstein here. The monster is nearly ready, and will soon go shambling out into the world on its own. Then it's only a matter of time before the people with the torches and pitchforks show up....

 

Regards

Jim

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

Link to comment
Share on other sites

Have you tried the is_int php function Kymation? I've read up it should do what your looking for? Right?

That would work if we were storing the value as an integer. However, the Specification field (and the Filter field as well) is a general-purpose value that is stored as a Varchar. This will always be read out as a string. Sometimes we need to compare it as a string, sometimes as an integer, and sometimes as a float. The trick is figuring out when to use each type. I'm working on this.

 

Regards

Jim

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

Link to comment
Share on other sites

Still have an earlier reported bug which is not on the buglist:

 

When having a specification defined as filterclass Exact and Radiobuttons, filtering requiered two clicks. One to select the radiobutton to filter the products and a second click random around the page to execute the filtering. Looks like the the filter is executed as soon the focus is no longer on the selected radiobutton.

 

Regards,

Jerome

Just saw your last post. That may very well be the problem. I always get the difference between those properties confused. I need to do some testing here....

 

Yep, just found this:

The problem is that Internet Explorer fires onchange events only when the entry has changed AND another element has gotten the input focus. So, with checkboxes and IE, you would have to check/uncheck the checkbox AND click on some other random entry.

Apparently that only happens in IE, which is why I tend to not see the problem. We'll make the change that you gave above. That should be correct in all browsers. I hope.

 

Regards

Jim

Edited by kymation

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

Link to comment
Share on other sites

Specification Values are used to provide predefined values for specifications entered with the Products. They can have the same values as the Filters but are not required to. They are only available to set up if you have the Enter Specification Values as field set to something other than Text Box. Having this set to Checkbox or Multi is the only way to enter multiple values for a single Specification in a single product.

 

Thanks for the explanation. That's clear, so you can have different predefined values for specifications while filtering with another set of data. Never thought of that but very useful, especially when using other filterclasses than exact, like ranges for example.

Link to comment
Share on other sites

Apparently that only happens in IE, which is why I tend to not see the problem. We'll make the change that you gave above. That should be correct in all browsers. I hope.

 

Yes I found this in IE indeed. I always test our store in 5 browsers. But since IE is still the most commonly used browser I use that one for primary testing. And yes, my change seems to work in Firefox as well.

Edited by JvdP
Link to comment
Share on other sites

With the pull down options is there a way to make it write N/A or leave blank instead of 0 as this doesn't fit all situations or can conflict.

 

Thanks for the good work this is really coming along I hope you can find the answer to the filter sorry I can't lend a hand but I am v novice with PHP.

Depends on which pulldown you are talking about. You should be able to enter any custom value you want. If you're talking about the default, that can be turned off if you don't want to use it.

 

Regards

Jim

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

Link to comment
Share on other sites

The variable is being stored as a string, so gettype() will always return string. The problem is that there is just no easy way to do this.

 

Regards

Jim

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

Link to comment
Share on other sites

Am getting an SQL error in admin for 0.4.5 that I wasn't getting in the previous versions.

 

The error is when creating a product specification group and then trying to edit, copy or delete it it. The error is:

 

1054 - Unknown column 'language_id' in 'where clause'

select specification_filters_id from specification_filters where specifications_id = '1' and language_id = ''

 

Looks like the specification filters table has been split into two tables in this version, but some of the sql still needs to be updated to reflect that. I can find queries that look like they would break by going into admin/product_specifications.php and searching for 'description'. References to description_query_raw call off the table TABLE_SPECIFICATIONS_FILTERS instead of one of the new ones. Tried changing the table reference to TABLE_SPECIFICATIONS_FILTERS_DESCRIPTION but this also broke the code because the field filter is no longer present.

Link to comment
Share on other sites

Please tell me if i'm not helping, i'm wanting to use this contribution and obviously i want to help towards making this perfect.

 

I've tested this out on a varchar field in database containing the values below.

 

$var = 'fgrgwwf' returns 3 (string)

$var = '443810371015' returns 1 (float)

$var = '8024' returns 2 (int)

 

	function convert_type( $var )
{
if( is_numeric( $var ) )
{
	if( (float)$var != (int)$var )
	{ // Float
		return '1';
	}
	else
	{
		// Is Int
		return '2';
	}
}
  if (($var != '1') && ($var != '2')) {
   // Is String
   return '3';

  }
}

Edited by Jonojamesmac
Link to comment
Share on other sites

Think I've found something else in the filters. I set up a filter group called clothing with two specifications colour and size inside it. Set the filter class to multiple, display as to pulldown, and enter specifications as multi pulldown. Link it to a category then when I then go into a product in admin in that category, no input fields show up at all. If I change it to text, the field shows up but then we can't enter multiple values. Is this a bug or something I'm doing wrong?

Link to comment
Share on other sites

Think I've found something else in the filters. I set up a filter group called clothing with two specifications colour and size inside it. Set the filter class to multiple, display as to pulldown, and enter specifications as multi pulldown. Link it to a category then when I then go into a product in admin in that category, no input fields show up at all. If I change it to text, the field shows up but then we can't enter multiple values. Is this a bug or something I'm doing wrong?

 

You are not doing something wrong, it is already on the list. I think this the first point in post 113?

Link to comment
Share on other sites

Am getting an SQL error in admin for 0.4.5 that I wasn't getting in the previous versions.

 

The error is when creating a product specification group and then trying to edit, copy or delete it it. The error is:

 

1054 - Unknown column 'language_id' in 'where clause'

select specification_filters_id from specification_filters where specifications_id = '1' and language_id = ''

 

Looks like the specification filters table has been split into two tables in this version, but some of the sql still needs to be updated to reflect that. I can find queries that look like they would break by going into admin/product_specifications.php and searching for 'description'. References to description_query_raw call off the table TABLE_SPECIFICATIONS_FILTERS instead of one of the new ones. Tried changing the table reference to TABLE_SPECIFICATIONS_FILTERS_DESCRIPTION but this also broke the code because the field filter is no longer present.

Yes, that's a bug. I thought I had all of those fixed. Oh well.

 

Regards

Jim

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

Link to comment
Share on other sites

Please tell me if i'm not helping, i'm wanting to use this contribution and obviously i want to help towards making this perfect.

 

I've tested this out on a varchar field in database containing the values below.

Yes, is_numeric will detect an integer or float in a string. This is useful. Some of the ctype_ functions may be useful as well. I just need the time to sit down and work through this. Probably not today, unfortunately.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi to everyone who is contributing and many thanks to the people who started this brilliant addon.

 

I found a few things after installing vers. 0.5 and have a few questions:

1. in the admin section in my (highly customized) version the function tep_hide_session_id was missing in html_output.php. This led to an error which could be resolved by copying the function from the catalogue/includes/functions/html_output.php into the html_output.php in the admin section.

2. I´m experiencing a missing <tr>, I think, in the catalog/index.php. My page looks odd after inserting all the relevant codings. Need to find out where it is missing ... ;-( ... see here: http://www.preisschlager24.de/test-shop/te...-c-895_896.html

 

Questions/Remarks:

1. Filters do not appear when drilling into a specification. The page says in the summary that 3 filters are available, but they aren´t shown. In the database the filters are saved and associated to the specification.

2. I cannot maintain any values for the specifications. When starting to maintain a product the specification is shown but I do not have any possibility to enter a specific value for it. "Enter specification values as" is set to "Text". It seems as if the appropriate text box is missing.

 

Hope to help to get this excellent contribution released ... ;-)

 

Regards,

Tobias

Link to comment
Share on other sites

1. html_output.php is not included in this distribution. tep_hide_session_id() is defined in the stock osCommerce 2.2RC2a, which is what this Contribution is based on. You will have problems like this when trying to use it with older versions of osCommerce.

 

2. Probably a result of merging into your modified store. I don't recommend testing with modified osC code at this point. You will not be able to tell if the problem is with this Contribution or with other mods to your code. A plain install of 2.2RC2a is recommended until we get to version 1.0.

 

1. The summary counts are not reliable. I messed up the code trying to fix something else. If the filters are actually in the database then they should show up. I'll take another look at this as well.

 

2. Sounds like #32 on the bugs list. I'm working on that right now.

 

Thanks for the bug reports. Every one you find helps.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi,

 

found the issue for my bug no. 2 in index.php ... the one who is able to read will not copy too much code from somebody else ... ;-)

 

it was my fault ... I copied too much, lines 322-325 from your index.php ... removed them from my index.php and everything looks fine now in index.php

 

Regards,

Tobias

Link to comment
Share on other sites

One thing I have noticed now not sure if I have missed the code but on v0.5 when you add a product you can't enter the specs unless you add the product and re-edit the product that you just entered.

Yes, that's a known bug. It will be fixed in the next release. If I don't find a new way to break it.

 

Regards

Jim

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...