Forums / All Other Contributions/Addons / Improved Attributes Controller (now built-in to v1.3.9)

Improved Attributes Controller (now built-in to v1.3.9)

Views: 72,230

Results 121 to 140 of 305
16 Jul 2007, 5:40 PM
#121
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Improved Attributes Controller (now built-in to v1.3.9)

LRS:

I just now installed it with version 1.3.7.1 and it does the same thing for me. No matter how many option values I select, it sets them all to option value id 1 regardless of which option / option value combination I select.
try this fix and see if it helps:

open admin/attributes_controller.php and find the following section of code:

// ***************    start modification for improved attributes controller

for ($i=0; $i<sizeof($_POST['values_id']); $i++) {

        $check_duplicate = $db->Execute("select * from " . TABLE_PRODUCTS_ATTRIBUTES . "
                                         where products_id ='" . $_POST['products_id'] . "'
                                         and options_id = '" . $_POST['options_id'] . "'
                                         and options_values_id = '" . $_POST['values_id'][i] . "'");

        if ($check_duplicate->RecordCount() > 0) {
          // do not add duplicates give a warning
          $messageStack->add_session(ATTRIBUTE_WARNING_DUPLICATE . ' - ' . zen_options_name($_POST['options_id']) . ' : ' . zen_values_name($_POST['values_id'][i]), 'error');
        } else {
          // Validate options_id and options_value_id

Make the highlighted changes.
I think that should solve the problem.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

16 Jul 2007, 6:19 PM
#122
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Improved Attributes Controller (now built-in to v1.3.9)

http://www.timeofyear.com/images/problems/problematt.JPG

I still cant figure this one out. Why this is happening...
(It wont provide me with the dropdown menus')

I am running 1.3.7 and have the following installed:

Admin Store Name 1.3.6, Ask a question with sidebox 1.8, automatic login 1.1, backup my sql 1.3, colum layout grid 1.3.7, contact us add subject v1, credit card sidebox v1.2, edit orders 1.1, tinymce 1.3.5, email adress exporter 1.2.c, Easy Populate 1.2.5.4, google sitemap 1.3.8, How did you hear about us 1.3.7, Image Handler 2, Improved Who's Online, Info at a glance 1.5, Links Manager 3.1.1, Logon Box v1.4.1, Login spruce up admin 1.2, master password 1.2.0, newsletter subscripe 2.0.6, pop up on attribute images, purchase orders, quick updates, return authrorazation, save your sidebox layouts, scrolling whats new and Specials, stock by attributes 4.4, super orders 2.0 rev45, ty package handler 2.2b, usps autofill 1.1, zen lightbox 1.3, google base froogle feeder 1.4.2, google checkout 1.3.2, newsletter subscribe 2.0.6, Percent Shipping, Cross Sell 1.3.1, and one of the modules that change product info to make all the image on the left and the info to the right.

16 Jul 2007, 6:39 PM
#123
lrs avatar

lrs

Zen Follower

Join Date:
Feb 2006
Posts:
130
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

clydejones:

try this fix and see if it helps:

open admin/attributes_controller.php and find the following section of code:

// *************** start modification for improved attributes controller

for ($i=0; $i<sizeof($_POST['values_id']); $i++) {

    $check_duplicate = $db->Execute("select * from " . TABLE_PRODUCTS_ATTRIBUTES . "
                                     where products_id ='" . $_POST['products_id'] . "'
                                     and options_id = '" . $_POST['options_id'] . "'
                                     and options_values_id = '" . $_POST['values_id'][i] . "'");

    if ($check_duplicate->RecordCount() > 0) {
      // do not add duplicates give a warning
      $messageStack->add_session(ATTRIBUTE_WARNING_DUPLICATE . ' - ' . zen_options_name($_POST['options_id']) . ' : ' . zen_values_name($_POST['values_id'][i]), 'error');
    } else {
      // Validate options_id and options_value_id
>  
> Make the highlighted changes.
> I think that should solve the problem.
 
I added the two bits of text shown in orange  \[i]  where indicated above but it still puts option name value id 1 in every option name / option value combination I have tried. 
 
When inserting an option name / option value combination for a product, the option value choices that show up to choose from are the ones that match the chosen option name (none of which are option value id 1), but once the insert button is clicked, it reverts to that pesky id 1 option value for every selection.
18 Jul 2007, 5:24 AM
#124
katie929 avatar

katie929

New Zenner

Join Date:
Jul 2007
Posts:
4
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

I have a problem ...

when I'm adding colors or sizes to a product using the new improved attributes controller ... all that comes out is this ...

:huh:

18 Jul 2007, 3:25 PM
#125
chrisdrumm avatar

chrisdrumm

New Zenner

Join Date:
Jul 2005
Posts:
53
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

I figured out the bug that was having the Option Name & Option Value display in a seemingly random order

I changed the code on line 1780:

ORDER BY po.products_options_sort_order, pov.products_options_values_sort_order";

to

ORDER BY po.products_options_name, pov.products_options_values_name";

...so now it is sorting by the options name - this makes large lists of options much easier to navigate.

19 Jul 2007, 8:44 AM
#126
ss4ssstore avatar

ss4ssstore

New Zenner

Join Date:
Jul 2007
Posts:
1
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

katie929:

I have a problem ...

when I'm adding colors or sizes to a product using the new improved attributes controller ... all that comes out is this ...

:huh:

I am having the same problem... and I've tried Chris' fix, and the other fixes that I can find and nothing. It DOES show the multi box, but the beep thing just keeps putting in the default number 1 attribute over and over.

19 Jul 2007, 5:13 PM
#127
hrm avatar

hrm

New Zenner

Join Date:
Oct 2005
Posts:
95
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

I'm having the same problem mentioned above only my options_values are being set to 0 on insert/copy. However, I can go back and edit each attribute individually, after it is inserted, and it will save the option value at that point. Is there maybe something different in the way the controller handles the "update" vs. "insert"/"copy"?

Heather
Results! Why, man, I have gotten a lot of results.
I know several thousand things that won't work.
----Thomas Edison

20 Jul 2007, 7:38 AM
#128
ljdream00 avatar

ljdream00

Zen Follower

Join Date:
Jun 2007
Location:
Michigan
Posts:
168
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

Ditto for me too with this same Issue.

Zencart Websites I've Designed:
deejaycentipede(DOT)com
djellery216(DOT)com

20 Jul 2007, 1:56 PM
#129
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Improved Attributes Controller (now built-in to v1.3.9)

ss4ssstore:

I am having the same problem... and I've tried Chris' fix, and the other fixes that I can find and nothing. It DOES show the multi box, but the beep thing just keeps putting in the default number 1 attribute over and over.

hrm:

I'm having the same problem mentioned above only my options_values are being set to 0 on insert/copy. However, I can go back and edit each attribute individually, after it is inserted, and it will save the option value at that point. Is there maybe something different in the way the controller handles the "update" vs. "insert"/"copy"?

katie929:

I have a problem ...

when I'm adding colors or sizes to a product using the new improved attributes controller ... all that comes out is this ...

:huh:

LRS:

I added the two bits of text shown in orange [i] where indicated above but it still puts option name value id 1 in every option name / option value combination I have tried.

When inserting an option name / option value combination for a product, the option value choices that show up to choose from are the ones that match the chosen option name (none of which are option value id 1), but once the insert button is clicked, it reverts to that pesky id 1 option value for every selection.

ljdream00:

Ditto for me too with this same Issue.

Try This - its working fine for me.

Just unzip the file and upload the attributes_controller.php file to the admin folder on your server. (This has all the "security patches" for version 1.3.7.1)

[Attachment no longer available]

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

20 Jul 2007, 3:58 PM
#130
hrm avatar

hrm

New Zenner

Join Date:
Oct 2005
Posts:
95
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

Thanks for the file fix. I've been playing with it and here's what I discovered:

First of all, I had two other mods that altered the attributes controller - Dual Pricing and Gift Certificate Value Field

I started fresh with your edited file and added the Dual Pricing changes - everything worked fine.

Then, after adding the GC value code, the problem is back. I've posted this issue to that mods support thread - http://www.zen-cart.com/forum/showthread.php?p=406167 asking the writer if he has any clue what might be causing the problem.

I just wondered if maybe the others who are experiencing this problem are also using the GC Value mod.

Heather
Results! Why, man, I have gotten a lot of results.
I know several thousand things that won't work.
----Thomas Edison

20 Jul 2007, 4:18 PM
#131
lrs avatar

lrs

Zen Follower

Join Date:
Feb 2006
Posts:
130
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

clydejones:

Try This - its working fine for me.

Just unzip the file and upload the attributes_controller.php file to the admin folder on your server. (This has all the "security patches" for version 1.3.7.1)

[Attachment no longer available]

Thanks! That did it.

24 Jul 2007, 12:38 AM
#132
katie929 avatar

katie929

New Zenner

Join Date:
Jul 2007
Posts:
4
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

thank you! it works! :clap:

31 Jul 2007, 1:32 AM
#133
slobadog avatar

slobadog

New Zenner

Join Date:
Mar 2006
Posts:
89
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

LRS:

Thanks! That did it.

Ditto! Thanks very much for your effort, my life is now sooo much easier.

19 Aug 2007, 5:23 PM
#134
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

clydejones:

Try This - its working fine for me.

Just unzip the file and upload the attributes_controller.php file to the admin folder on your server. (This has all the "security patches" for version 1.3.7.1)

[Attachment no longer available]
Clyde,
I compared this attachment to the file in the downloads section, they are identical, so this is what I already have installed.
It does not fix the problem for the randomization that occurs with the attributes when all set to sort order 0, it doesn't even sort them by ID, it's random.
Now, this doesn't happen in Zen Cart's front end, where all attributes are nicely sorted, and they are also sorted in the standard attributes controller.php.
So there is a flaw in the logic of this mod somewhere, I am not knowledgeable enough as of yet to delve into that.
I guess that the only fix available to me at present is to manually sort all the attributes according to instructions given earlier by Ajeh in this same thread.
Lastly, I've read somewhere that this mod can also do mass deletion of attributes, but for the life of me cannot figure out how to do that.
Of course, mass insertion is done just by holding down the ctrl key, selecting and then pressing the insert button, but mass deletion??

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

19 Aug 2007, 6:30 PM
#135
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Improved Attributes Controller (now built-in to v1.3.9)

ckosloff:

Clyde,
I compared this attachment to the file in the downloads section, they are identical, so this is what I already have installed.
It does not fix the problem for the randomization that occurs with the attributes when all set to sort order 0, it doesn't even sort them by ID, it's random.
Now, this doesn't happen in Zen Cart's front end, where all attributes are nicely sorted, and they are also sorted in the standard attributes controller.php.
So there is a flaw in the logic of this mod somewhere, I am not knowledgeable enough as of yet to delve into that.
I guess that the only fix available to me at present is to manually sort all the attributes according to instructions given earlier by Ajeh in this same thread.
Lastly, I've read somewhere that this mod can also do mass deletion of attributes, but for the life of me cannot figure out how to do that.
Of course, mass insertion is done just by holding down the ctrl key, selecting and then pressing the insert button, but mass deletion??

Strange: I have an option name called TEST (sort order 0) and option values test a, test b, test c (sort order 0 for all of them) and when I go to the attributes controller the first dropdown shows TEST where it should be (in the alphabetical listing) and the second dropdown shows test a, test b and test c in alphabetical order.

On deletions - If you go into the attributes controller and have already set up a product(s) with attributes you should see the product(s) with its list of attributes.
At the top left portion of that section there is a delete button ("delete" YOUR_ATTRIBUTE_NAME:) that handles the multi-deletes.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

19 Aug 2007, 7:03 PM
#136
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

clydejones:

Strange: I have an option name called TEST (sort order 0) and option values test a, test b, test c (sort order 0 for all of them) and when I go to the attributes controller the first dropdown shows TEST where it should be (in the alphabetical listing) and the second dropdown shows test a, test b and test c in alphabetical order.

On deletions - If you go into the attributes controller and have already set up a product(s) with attributes you should see the product(s) with its list of attributes.
At the top left portion of that section there is a delete button ("delete" YOUR_ATTRIBUTE_NAME:) that handles the multi-deletes.
I'm afraid I won't be able to respond to first part of your post: I have already started the process of manually setting sort order for attributes.
Regarding deletions: I was refering to selective mass deletions.
Of course the delete button you refer to will delete all attributes, but suppose I just want to delete some attributes without going through the tedious process of reloading page every time.
Something similar to the selective mass insertion that this mod allows me to do. Any suggestions on how to do that?
Thanks for your help.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

20 Aug 2007, 5:14 PM
#137
tatiana77 avatar

tatiana77

Zen Follower

Join Date:
May 2007
Posts:
114
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

hello all,

Since I have the Dual Pricing mod, whenever I upload the attributes_controller.php file to my admin, I get problems with adding/copying attributes... so.. my question is, does anyone have the codes to add in this file rather than completely overwriting it?

I think this would help both mods to work without having the above problem.

Thanks a lot.


20 Aug 2007, 5:29 PM
#138
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Improved Attributes Controller (now built-in to v1.3.9)

tatiana77:

hello all,

Since I have the Dual Pricing mod, whenever I upload the attributes_controller.php file to my admin, I get problems with adding/copying attributes... so.. my question is, does anyone have the codes to add in this file rather than completely overwriting it?

I think this would help both mods to work without having the above problem.

Thanks a lot.

Use a file comparison tool like winmerge

You can then merge the differences in both versions of the attributes controller file.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

20 Aug 2007, 7:07 PM
#139
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

clydejones:

Strange: I have an option name called TEST (sort order 0) and option values test a, test b, test c (sort order 0 for all of them) and when I go to the attributes controller the first dropdown shows TEST where it should be (in the alphabetical listing) and the second dropdown shows test a, test b and test c in alphabetical order.

On deletions - If you go into the attributes controller and have already set up a product(s) with attributes you should see the product(s) with its list of attributes.
At the top left portion of that section there is a delete button ("delete" YOUR_ATTRIBUTE_NAME:) that handles the multi-deletes.
To add a little to my reply, my attributes do not sort alphabetically but by a complex alphanumeric code given by manufacturers.
Zen Cart and Excel sort them similarly, however the logic the mod applies is different.
Regarding selective mass deletion, I guess I will have to reload page every time since the mod does not have the ability.
Thanks.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

21 Aug 2007, 11:01 AM
#140
mambotech avatar

mambotech

New Zenner

Join Date:
Apr 2006
Posts:
7
Plugin Contributions:
0

Re: Improved Attributes Controller (now built-in to v1.3.9)

Hi, I have followed the install instructions and I am running 1.2.7 DB patched to 1.3.0 but I getting this error when trying to opening the http://hawksdev.systemcms.com/admin/attributes_controller.php

Fatal error: Cannot redeclare draw_optiontype_pulldown() (previously declared in /var/www/hawkswood/zencart/admin/attributes_controller.php:553) in /var/www/hawkswood/zencart/admin/includes/languages/english/attributes_controller.php on line 560

Any ideas please

Mark