Jump to content

Recommended Posts

Hi,

So we recently upgrade from PS 1.2.5 to PS 1.4.2.5... we utilize a lot of attributes for more than half of the products in our catalog. So we have heavily relied on the Product Attribute Generator feature for some time now.

In the earlier versions (at least in 1.2.5 and 1.3.3) when we go to the attribute generator page the attributes in the right hand box are collapsed. Only the attribute group names are shown, so we can click on the group we are interested in using and then the list of attributes for that group become listed or "uncollapsed." However, in this new version I have noticed that all the attributes groups (and their attributes) are already expanded, and there is no way to close them.

I can see how this might be slightly easier if you only had a handful of attributes, but we have more than 10 groups with more than 2000 attributes... imagine having to scroll down and filter through everything just to select a few of the attributes to generate.

ANYWAYS, my question is... is there any way to make the attribute panel on this page go back to how it was before (make it collapsible)?

Would really appreciate any help! THANKS!

Share this post


Link to post
Share on other sites

HAHA...

Yes, thanks for the bump!

I have alot of other things on my plate... and this isn't causing any major problems its just really annoying. But I am hoping to compare the codes of the old and new version to see if I can maybe come up with a solution.

The modifications might be too far out of my scope, but it doesn't hurt to take a look... you never know the fix might be easier than we think.

Hopefully by the end of this week or at the latest next week I will take a look and report back. At worst hopefully I can narrow it down to a problem that an experienced programer could easily fix.

Posted.

Share this post


Link to post
Share on other sites

Hi,

So I think I've managed to find a fix... it's quick and dirty, meaning I copied and pasted from the old version into the new.

I'm not an experienced programmer, so there is probably a better way to tweak this... but it works so I can't complain. It makes life 10x easier not having to filter through over 2000 attributes.

Here is what I did...

You need to edit /admin/tabs/AdminAttributeGenerator.php

On line 139 (or near it) you should see this line of code:

echo '    ';



CHANGE THIS LINE TO THE ONE BELOW:

echo '    
';



You could probably tweak some of the name= and id= fields, but it works as is so I'm going to be leaving it until I come upon a problem. I noticed that this "feature" was removed starting from PS v1.3.1 so I dug up our old "archived" site running PS v1.2.5 and copied this line of code DIRECTLY as is.

It seems to work fine, but I will obviously have to test further (ie. create some attributes, modify attributes, etc.). Hopefully, there are no problems, but if there is I will make sure to report back. As for now I am marking this thread SOLVED!

HTH!

Share this post


Link to post
Share on other sites

It looks like part of the "new" code got automatically deleted. So this is the actual code you need to change the first line to...


echo '
';

So the posts keep removing part of the code so I've attached a simple txt file with same basic instructions.

Hope somebody finds this useful!

AttributeGeneratorFIX.txt

Share this post


Link to post
Share on other sites
  • 7 months later...

i replaced all the code by the old one and it works so you have to replace:

<optgroup name="'.$idGroup.'" id="'.$idGroup.'" label="'.htmlspecialchars(stripslashes($attributeGroup['name'])).'">';
   foreach ($attributeJs[$idGroup] AS $k => $v)
 echo ' <option name="'.$k.'" id="attr_'.$k.'" value="'.htmlspecialchars($v, ENT_QUOTES).'" title="'.htmlspecialchars($v, ENT_QUOTES).'"">'.$v.'</option>';
   echo ' </optgroup>';

 

with:

<optgroup onclick="target=getE(\'group_'.$idGroup.'\');toggle(target,target.style.display == \'none\');" name="title_'.$idGroup.'" id="group_title_'.$idGroup.'" label="'.htmlspecialchars(stripslashes($attributeGroup['name'])).'">
  <optgroup style="display: none;" name="'.$idGroup.'" id="group_'.$idGroup.'">';
 foreach ($attributeJs[$idGroup] AS $k => $v)
  echo '
	 <option name="'.$k.'" id="attr_'.$k.'" value="'.$v.'">'.$v.'</option>';
 echo '</optgroup>
   </optgroup>';

Share this post


Link to post
Share on other sites
  • 10 months later...

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
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More