Jump to content
kymation

[Development] Products Specifications

Recommended Posts

Another bug. That would apply to any of the multi-select forms. I need to check for existing values before updating, and the existing code doesn't do that properly. Your way will work as well, and might actually be less of a database load. Your code is definitely cleaner. I'll have to think about that a bit.

 

Thanks for the bug report and the fix code.

 

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

I had written another way that checked for existing values first, comparing them to the submitted values, and updated / removed / inserted as needed, but didn't like how BIG it was. As I laid down to go to sleep I decided to scratch all of that and just remove & re-apply the specs. No good reason to write 100 lines of code when 30 will do that I can see.

Share this post


Link to post
Share on other sites

Noticed something odd on the frontend filters box, maybe I'm not the only one?

 

Created a set of color filters and applied that to a couple products in a pull-down selection filter. Before setting any filters on the frontend, I see 6 items in the list.

 

* Show all

* White

* Blue

* Green

* Red

* Black

 

Selecting one of the colors, Blue for instance, will remove Black from the list as well as re-ordering the items in that list. So after clicking Blue, my list looks like this...

 

* Show all

* Red

* White

* Blue

* Green

 

I'll take a closer look into this tonight unless this is an known issue & has already been fixed. Thanks!

Share this post


Link to post
Share on other sites

No, that looks like a new bug. Make sure you have the sort order set correctly for your colors, and that no two have the same sort order value. Otherwise this shouldn't happen.

 

You might also consider using actual colors for your selection, if this is something you are interested in. A 1-pixel GIF works well for a color sample.

 

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

I'll play around with the color samples, sounds interesting. I didn't set any sort orders on the colors assuming that it would order it automagically for me alphabetically. I'll check it out though & verify that it's not a product of neglecting to set the sort order.

 

Elijah

 

No, that looks like a new bug. Make sure you have the sort order set correctly for your colors, and that no two have the same sort order value. Otherwise this shouldn't happen.

 

You might also consider using actual colors for your selection, if this is something you are interested in. A 1-pixel GIF works well for a color sample.

 

Regards

Jim

Share this post


Link to post
Share on other sites

There is no default ordering. Perhaps there should be. Setting more than one Filter to the same Sort Order will cause weird results like you have been seeing. OK, adding that to the bugs list.

 

I'm currently working on the User's manual for this thing, since it so clearly needs one. Badly. I'm up to 63 pages right now. Don't worry, I padded it out with the License text and some other tidbits. It's still gonna be huge.

 

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

Well, no dice on the disappearing dropdown list items. I set unique sort orders for each of the 5 colors and saw the same results. I'll trace the cord back to the wall in the morning & report back the find & fix.

 

The ability to filter by image is pretty slick. Gonna have to see just how many colors we will need to filter by since I think our visitors would appreciate that, but wouldn't want to do it if there are anything more than about 15 color selections. Something like this though has promise for being able to construct custom css pulldown menus with onmouseover() image popups next to the name or inline somewhere. Would be handy in a case such as ours where we have a couple hundred theme categories (disney characters, tv characters, etc) that would be nice to show an image next to the text. Lots of possibilities.

 

Do you keep a bug-list & feature request online anywhere? It would be nice to proactively attack some of those bugs and add features as you and others bring them up. I only ask because our company is anxious to start populating product specs in our 3000+ product database. In other words, I have the time and desire to help get this to a stable release as quickly as possible.

Share this post


Link to post
Share on other sites

Now there's a good idea. Give me a few minutes to set something up. I'm quite willing to share the work if it means getting more done faster.

 

We're actually fairly close to a stable release, although not with all of the options/extras everyone has asked for. As long as we can fix the current bugs, and nobody complains too much, I'm about ready to call this a release candidate. Then we can add other cool features as needed/wanted/we have time to spare.

 

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

Perfect, I look forward to seeing that list and am happy to hear that you're close to seeing it become stable. Keep up the great work!

Share this post


Link to post
Share on other sites

OK, here's the public bugs/features list. Post an updated version if you wish, or I'll keep it up to date. Please let me know what you're working on so I can avoid duplicating your efforts.

 

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

The disappearing menu item bug was all on my side, so no worries there.

 

Was looking at the way the urls were generated for the filters in catalog/includes/functions/products_specifications.php. For instance, in tep_draw_links_menu() would it be better to just remove the filter get var completely when someone clicks the "Show All" link? Or is keeping track of previously applied filters intended?

 

something like this...

 

$field .= '  <a href="' . tep_href_link ($target, tep_get_array_get_params (array ($name, 'page') ) . ($link_data['id'] == '0' ? '' : $name . '=' . tep_output_string ($link_data['id'])) ) . '">' .  tep_output_string ($link_data['text']) . '</a><br>' . "\n";

 

instead of...

 

$field .= '  <a href="' . tep_href_link ($target, tep_get_array_get_params (array ($name, 'page') ) . $name . '=' . tep_output_string ($link_data['id']) ) . '">' .  tep_output_string ($link_data['text']) . '</a><br>' . "\n";

 

Elijah

Share this post


Link to post
Share on other sites
....would it be better to just remove the filter get var completely when someone clicks the "Show All" link? Or is keeping track of previously applied filters intended?<snipped>

The code looks for a variable even if it's not set as a _GET var, and sets it to 0 if it's not, so no difference there. Your way would produce a nicer-looking URL string, so it might be easier to debug. Otherwise the result is the same.

 

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

Bug #66 fixed

 

"66. When editing a Specification the "Enter Specification Values as" pulldown

default value is not set."

 

In catalog/admin/products_specifications.php

 

Changed query at line 2247 from:

 

		$specification_query_raw = "select products_column_name,
									   specification_sort_order,
									   show_filter,
									   filter_class,
									   filter_show_all,
									   filter_display
								from " . TABLE_SPECIFICATION . "
								where specifications_id = '" . $sInfo->specifications_id . "'
								limit 1";

 

to

 

		$specification_query_raw = "select products_column_name,
									   specification_sort_order,
									   show_filter,
									   filter_class,
									   filter_show_all,
									   filter_display,
									   enter_values
								from " . TABLE_SPECIFICATION . "
								where specifications_id = '" . $sInfo->specifications_id . "'
								limit 1";

 

 

Easy enough!

Share this post


Link to post
Share on other sites

Gah! OK, I clean missed that. Thanks for the fix.

 

The way it's going, we'll be ready for another release before 0.5.1 even shows up at the official site (No, it's still not up.)

 

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

As far as the sort order's go, wouldn't it be easy enough to do something like adding a secondary order by clause? I haven't dug deep enough to see if this would wonk anything else out, but if it doesn't this would at least alphabetize the results if someone (like me) were to ignore the tedious task of assigning sort values to each of a couple hundred spec/filter options. Easy enough to apply on admin & frontend too. Indexes may need some work after something like this though. <shrug>

 

For example, In catalog/admin/products_specifications.php

 

on line 1731 change this

 

								order by sp.specification_sort_order

 

to this ???

 

								order by sp.specification_sort_order, sd.specification_name

Edited by Yarhajile

Share this post


Link to post
Share on other sites

Yes, that's what I had in mind. You're right about the indexes too. I should take another look at them anyway, given all of the changes this has gone through. I'm a bit worried about the database load on a big store. There are a lot of queries in here, and some of them (filters) are fairly complex. This probably needs some tuning. After we get everything working, that is.

 

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 get interesting with the exponential combinations. Will be throwing about 3000 products with no fewer than 5 specs each on the testbed in the next couple weeks. Just have to have an enthusiastic pep talk with the poor saps that will be editing those products. :-)

 

Speaking of which, have you given any thought to any mass importing such as our case? I was just gonna export the pertinent product information into a spreadsheet, add the columns for each of the filter specs & have them fill in the filter values for each row & then update the database from that file with the data they submitted. I just can't see anyone updating 3000 products through the admin; checking boxes, selecting pull-down menu options, blah blah.

 

Elijah

Edited by Yarhajile

Share this post


Link to post
Share on other sites

That's #45 on the Bugs/Features list. I have no idea how much work that will be, since I'm not familiar with the code for Easy Populate.

 

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

Just thought of something for a post-stable release feature addon. Newegg.com pushes chosen filters onto the breadcrumb with an 'x' to remove it from the filter list. This also shrinks down the list of filters displayed to the visitor. This would be an admin set control, allowing you to toggle the display of the filter when the breadcrumb version is used.

 

Just a thought.

Share this post


Link to post
Share on other sites

Integrating it into EP would be a project all in itself. I don't suspect it would be terrible though.

Share this post


Link to post
Share on other sites

On my setup, version 4.5.1 still doesn't allow the entry of multiple filter options on the categories screen because setting anything except 'text' for the 'enter specifications as' option on a filter still results in a text box being displayed on the catergories.php file. This means in a situation like entering clothing colours, you can't assign two possible values to a product (e.g. red and blue) because only a text box is displayed when editing the product in categories.php.

 

Am setting the filter class for the clothing colours as multiple and tried enter specifications as pulldown, checkbox and radio buttons. it always shows a text box in categories.php no matter what is chosen for 'enter specifications as' so cannot assign two colour options to a product to show up in the filters.

 

Apologies in advance if this is already on the bugs list. haven't seen anyone else raise this problem with 4.5.1 as it sounds like others are getting the view specifications as options to work? maybe i'm just doing something wrong? have posted in case this is a bug as i can't see it on the bugs list as open. Installation is unmodified test site on osc rc2a with php5.2 so no other modules interfering.

Share this post


Link to post
Share on other sites
Just thought of something for a post-stable release feature addon. Newegg.com pushes chosen filters onto the breadcrumb with an 'x' to remove it from the filter list. This also shrinks down the list of filters displayed to the visitor. This would be an admin set control, allowing you to toggle the display of the filter when the breadcrumb version is used.

 

Just a thought.

Good idea. Added to the wish list.

 

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
On my setup, version 4.5.1 still doesn't allow the entry of multiple filter options on the categories screen because setting anything except 'text' for the 'enter specifications as' option on a filter still results in a text box being displayed on the catergories.php file. This means in a situation like entering clothing colours, you can't assign two possible values to a product (e.g. red and blue) because only a text box is displayed when editing the product in categories.php.

 

Am setting the filter class for the clothing colours as multiple and tried enter specifications as pulldown, checkbox and radio buttons. it always shows a text box in categories.php no matter what is chosen for 'enter specifications as' so cannot assign two colour options to a product to show up in the filters.

 

Apologies in advance if this is already on the bugs list. haven't seen anyone else raise this problem with 4.5.1 as it sounds like others are getting the view specifications as options to work? maybe i'm just doing something wrong? have posted in case this is a bug as i can't see it on the bugs list as open. Installation is unmodified test site on osc rc2a with php5.2 so no other modules interfering.

This works correctly on my test store. I don't know why yours wouldn't work. Some error in admin/categories.php?

 

Incidentally, to store multiple selections you need to set Enter Specification Values as: to either check box, multi-pulldown, or multi-image. All the rest only allow a single selection.

 

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

Also, do you have Specification Values set for this Specification? If there are no values for the checkboxes etc. to show, they default to the text box.

 

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

To aid in everyone's understanding of how this works (yes, I know it's complicated) here is the draft User's Manual:

Portable Document Format (PDF)

Open Document Format (ODT)

 

Comments and bug reports on this document are also welcome. I already know that the page numbers are messed up (my template is fighting me) and the Troubleshooting part is incomplete. Anything else is fair game.

 

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

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

×