Jump to content
Sign in to follow this  
joeyjgarcia

Attribute Sets Contribution

Recommended Posts

First of all, I'd like to thank you for developing this package. It's going to save my client hours and hours of time when I get it installed.

 

This is my problem though - the installation. I think someone else mentioned that it would be nice to see a 'complete package', something that I can do in one go - however I don't see that happening anytime soon so I'll have to do it the upgrade way. I just want to be clear on the installation procedure.

 

Am I to install the version posted July 15 /2004 (My osCommerce is already heavily modified) first, then upgrade with the version posted Aug 30th, and the the August 30th update? I just want to be clear before I begin.

Share this post


Link to post
Share on other sites
In reply to "why can't just leave the assignment of set 2,3,4,5 to product A,B as they are" 

 

Typically, the end results is the same. 

 

I would recommend modifying an Attribute Set only if it is wrong or needs to be re-sorted.  Otherwise, I would just create a new set for new attributes, this way you can re-edit the products without recourse.

 

No matter what I do, there is always someone that is not happy.  I would encourage you to hack it to meet your needs.

 

Joey

 

Joey:

Got it, thanks!!

Michael

Share this post


Link to post
Share on other sites

My version 4 is a complete package, but I also offer "upgrade notes" for those who need it. It was the version 3 (by someone else) that did a partial package.

 

I'm going to post this as a contribution now since the beta testing seemed to flush out the bugs.

 

Joey

 

First of all, I'd like to thank you for developing this package.  It's going to save my client hours and hours of time when I get it installed. 

 

This is my problem though - the installation.  I think someone else mentioned that it would be nice to see a 'complete package', something that I can do in one go - however I don't see that happening anytime soon so I'll have to do it the upgrade way.  I just want to be clear on the installation procedure.

 

Am I to install the version posted July 15 /2004 (My osCommerce is already heavily modified) first, then upgrade with the version posted Aug 30th, and the the August 30th update?  I just want to be clear before I begin.

Edited by joeyjgarcia

Share this post


Link to post
Share on other sites

Bug Fix to manual method of managing Product Attributes the old way.

 

Ok, I fixed this the right way by adding a new column to the manual method of managing product attributes. I modified the install instructions by adding another sub-step to Step 3 and added a Step 8. All the changes were related to products_attributes.php file. I think this is a good addition to version 4 (besides fixing the bug that throws an error) since it will easily allow people to retro-fit their older attributes so they can be sorted correctly.

 

If you haven't tweaked your /catalog/admin/products_attributes.php file then you can use the "total_replacement" version and skip Step 8. You'll have to add a line to the /catalog/admin/includes/languages/english/products_attributes.php file or just use the "total_replacement" version for this file. This is the Step 3 ammendment.

 

I am going to now post this as a new contribution on the official site.

 

Joey

 

 

Good catch!!!  This is the kind of stuff I like to hear about!

 

I get the same error when I try what you tried. 

 

I must say, I didn't plan on have to use to old way but in all reality even I have had to use once in a while.  I thought I accounted for this when I set the sort_order field to allow nulls and the default value to 0.  I'll work on this and see if there is a clean fix then hacking the insert statement.  Thanks!.

 

Joey

Edited by joeyjgarcia

Share this post


Link to post
Share on other sites

:blush:

Ive just added this to my site and for some reason i am getting this error when i try to add sets in admin?

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /usr/hsphere/local/home/slap/r00tkits.info/admin/includes/functions/database.php:13)

 

I previously had this running fine on a different server but seem to have a problem now?

Anyone else got this error before that could help me out?

 

thanks!

Share this post


Link to post
Share on other sites

Great Contribution.

 

I found a bug in it though, When you create an attribute set and you click on "Edit" and select the first element in "Remove Set Element" and hit "Save", the code crashes. This only happens when removing the first element.

 

Any Ideas?

 

Thanks!

-Steve

Share this post


Link to post
Share on other sites
Bug Fix to manual method of managing Product Attributes the old way.

 

Ok, I fixed this the right way by adding a new column to the manual method of managing product attributes.  I modified the install instructions by adding another sub-step to Step 3 and added a Step 8. 

Actually there is no sub-step 3 in the contribution that explain how to fix manual method of managing Product Attributes the old way. Probably I'd better come back to this problem:

with PA-4 installed I can add separate product attributes the old way. But when I complete editting a product with separate attributes I've got

ATTRIBUTE SET WARNING: At least one Attribute Set is set to '--none--' of the 3 total set(s) used for this product. 
ATTRIBUTE SET WARNING: At least one Attribute Set is set to '--none--' of the 3 total set(s) used for this product. 
ATTRIBUTE SET WARNING: At least one Attribute Set is set to '--none--' of the 3 total set(s) used for this product.

and of cource updating this product leads to disappearing all old attributes. It is pretty important for me and I'd be pleased if you have a fix to the problem!


Best wishes,

Alex Z.

Share this post


Link to post
Share on other sites

I think I've seen this error before in one of the earlier posts a long time ago. I didn't change that function so you might want to make sure you didn't install a step twice or in the wrong area.

 

Joey

 

 

 

:blush:

Ive just added this to my site and for some reason i am getting this error when i try to add sets in admin?

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /usr/hsphere/local/home/slap/r00tkits.info/admin/includes/functions/database.php:13)

 

I previously had this running fine on a different server but seem to have a problem now?

Anyone else got this error before that could help me out?

 

thanks!

Share this post


Link to post
Share on other sites

Alwx, the warnings are saying that you are about to change this product from having 2 Attribute Sets to NONE, hence the warnings. If you get these then you should go back and set 2 of the 3 Attribute Sets to what they were before (they should have done that automatically). The third one is there just in case you wanted to add a new Attribute Set.

 

It's funny when I need beta testers no one steps forward, but now that I officially release it people are all about testing this out. Well, just in case people are confused, it isn't more stable just because I officially released it, it just means that there were fewer beta testers.

 

I'll have to run some more tests myself and if I get the same results then I will be putting out a new 4.1 release soon, but I want to wait until I field all the bugs.

 

Steve's bug may be legitimate, but it doesn't seem like something that should hold any one back the fix should be nominal.

 

I'll be listening for more posts.

 

Thanks,

 

Joey

 

 

Actually there is no sub-step 3 in the contribution that explain how to fix manual method of managing Product Attributes the old way. Probably I'd better come back to this problem:

with PA-4 installed I can add separate product attributes the old way. But when I complete editting a product with separate attributes I've got 

ATTRIBUTE SET WARNING: At least one Attribute Set is set to '--none--' of the 3 total set(s) used for this product. 
ATTRIBUTE SET WARNING: At least one Attribute Set is set to '--none--' of the 3 total set(s) used for this product. 
ATTRIBUTE SET WARNING: At least one Attribute Set is set to '--none--' of the 3 total set(s) used for this product.

and of cource updating this product leads to disappearing all old attributes. It is pretty important for me and I'd be pleased if you have a fix to the problem!

Share this post


Link to post
Share on other sites

BTW, I checked the install.txt file and it showed the newly added install sub-step in Step 3, that you said was missing is there.

 

Here is what I was referring to.

        /catalog/admin/includes/languages/english/products_attributes.php

        Add this line:

          define('TABLE_HEADING_OPT_SORT_ORDER', 'Sort Order');

 

 

 

 

Actually there is no sub-step 3 in the contribution that explain how to fix manual method of managing Product Attributes the old way. Probably I'd better come back to this problem:

with PA-4 installed I can add separate product attributes the old way. But when I complete editting a product with separate attributes I've got 

ATTRIBUTE SET WARNING: At least one Attribute Set is set to '--none--' of the 3 total set(s) used for this product. 
ATTRIBUTE SET WARNING: At least one Attribute Set is set to '--none--' of the 3 total set(s) used for this product. 
ATTRIBUTE SET WARNING: At least one Attribute Set is set to '--none--' of the 3 total set(s) used for this product.

and of cource updating this product leads to disappearing all old attributes. It is pretty important for me and I'd be pleased if you have a fix to the problem!

Share this post


Link to post
Share on other sites

Page 6 of this thread shows the same error and a solution.

 

Joey

 

 

:blush:

Ive just added this to my site and for some reason i am getting this error when i try to add sets in admin?

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /usr/hsphere/local/home/slap/r00tkits.info/admin/includes/functions/database.php:13)

 

I previously had this running fine on a different server but seem to have a problem now?

Anyone else got this error before that could help me out?

 

thanks!

Share this post


Link to post
Share on other sites

This was a good catch!

 

I will release the change in my next release, but in the mean time here is the fix.

 

Line 216 from products_attributes_sets.php

 	 if( $i == 0 ){

 

 

changed to this for the bug fix

 	 if( strlen($update_value) == 0 ){

 

 

Great Contribution.

 

I found a bug in it though, When you create an attribute set and you click on "Edit" and select the first element in "Remove Set Element" and hit "Save", the code crashes. This only happens when removing the first element.

 

Any Ideas?

 

Thanks!

-Steve

Share this post


Link to post
Share on other sites

The problem was found when using old way of adding attributes for each product. I had to stop using your contrib beacuse impossibility of it. Sorry.

 

Howevere please if you need me as a beta-test do not hesitate to ask! :thumbsup:

Edited by Alex Zuyev

Best wishes,

Alex Z.

Share this post


Link to post
Share on other sites

I have a problem... It all seems to work fine, but when I get the orders, there are no descriptions of the attributes. For example, instead of getting a small, medium or large under the product description, all it show is a " -:"

Where, and how, can I fix that?

Thanks!

Share this post


Link to post
Share on other sites

Fatal error: Cannot redeclare jjg_db_attributesets() (previously declared in /home/mainly/public_html/shop/admin/includes/functions/database.php:149) in /home/mainly/public_html/shop/admin/includes/functions/database.php on line 228

 

Ne ideas on how i can fix this??!?!?!

 

email them to me if poss at fisheh@mainly-serv.com

 

tyvm

Share this post


Link to post
Share on other sites

Dear Joey,

Firstly, Thanks for updating your contribution.

My present situation is I have version 3 (I know you are not supporting this version) installed .. With lot of troubles I managed to stay with this for sometime, but now that version 4 is realised.. I am eager to install this ASAP.

I need little help from you to make my life easy. ? Its just a sql statement I need .. but please let me explain ..

 

I am using this mod on my shop for movie rental section .. you can have a look at http://www.irishasians.com/asianshop/index.php?cPath=1 .

The idea is each record (movie) will have 5 options

And each option will have list of all the records (movies) in that category .

 

What I plan to do .

a) Create one attribute set through admin area

B) Assign all the records and their respective values ( like cost etc)

c) Assign this attribute to a Record (just one)

 

And now I wish to use phpmyadmin to execute SQL statement which take the attribute value from the above record and update all other records in that category - INSERT STATEMENT

 

And also if there are any news movies added at later stage - AN UPDATE or I don?t mind deleting all and repeating the process ? DELETE and/or UPDATE STATEMENT

 

I hope the above is not confusing .. if so please let me know

 

Please help

 

Many thanks

 

Aali

Share this post


Link to post
Share on other sites

When in doubt look at the values you have in the Attribute Set you have assigned to the products. Look in the products_attributes_sets table and look at the products_attributes_sets_values field for the problem set. This will tell the story.

 

Joey

 

I have a problem... It all seems to work fine, but when I get the orders, there are no descriptions of the attributes. For example, instead of getting a small, medium or large under the product description, all it show is a " -:"

Where, and how, can I fix that?

Thanks!

Share this post


Link to post
Share on other sites

This error was documented a page or 2 ago and also on page 6.

 

When you fix this can you post the answer here because this comes up every once and a while.

 

Thanks,

 

Joey

 

Fatal error: Cannot redeclare jjg_db_attributesets() (previously declared in /home/mainly/public_html/shop/admin/includes/functions/database.php:149) in /home/mainly/public_html/shop/admin/includes/functions/database.php on line 228

 

Ne ideas on how i can fix this??!?!?!

 

email them to me if poss at fisheh@mainly-serv.com

 

tyvm

Share this post


Link to post
Share on other sites
When in doubt look at the values you have in the Attribute Set you have assigned to the products.  Look in the products_attributes_sets table and look at the products_attributes_sets_values field for the problem set.  This will tell the story.

 

Joey

 

 

Still can't figure it out. It all look fine to me. But of course, I am no expert. :blink: I'm updating to the 4.0 version, maybe that will correct it?

I'll let you know if it doesn't work.

Share this post


Link to post
Share on other sites

Joey, Can I expect something on this please.

Thanks

Dear Joey,

  Firstly, Thanks for updating your contribution.

  My present situation is I have version 3 (I know you are not supporting this version) installed .. With lot of troubles I managed to stay with this for sometime, but now that version 4 is realised.. I am eager to install this ASAP.

  I need little help from you to make my life easy. ? Its just a sql statement I need .. but please let me explain ..

 

I am using this mod on my shop for movie rental section .. you can have a look at http://www.irishasians.com/asianshop/index.php?cPath=1 .

The idea is each record (movie) will have 5 options

And each option will have list of all the records (movies) in that category .

 

What I plan to do .

a)  Create one attribute set through admin area

B) Assign all the records and their respective values ( like cost etc)

c) Assign this attribute to a Record (just one)

 

And now I wish to use phpmyadmin to execute SQL statement which take the attribute value from the above record and update all other records  in that category - INSERT STATEMENT

 

And also if there are any news movies added at later stage - AN UPDATE or I don?t mind deleting all and repeating the process ? DELETE and/or UPDATE STATEMENT

 

I hope the above is not confusing .. if so please let me know

 

Please help

 

Many thanks

 

Aali

Share this post


Link to post
Share on other sites

I just installed the mods, and I am getting this error:

 

Attribute Sets

 

1146 - Table 'db117028926.TABLE_PRODUCTS_ATTRIBUTES_SETS' doesn't exist

 

select products_attributes_sets_id, products_attributes_sets_name from TABLE_PRODUCTS_ATTRIBUTES_SETS where 1 order by products_attributes_sets_name

 

[TEP STOP]

 

 

Where did I go wrong? Please help!

Share this post


Link to post
Share on other sites

I am assuming that db117028926 is your database.

 

This is one of two possible causes:

 

1) You haven't created the TABLE_PRODUCTS_ATTRIBUTES_SETS table.

or

2) You haven't correctly added the /catalog/admin/includes/database_tables.php

 

Whenever you see text that is in all uppercase it is "constant variable" which should be translated to the actual table name.

 

Hope this helps.

 

Joey

 

 

 

I just installed the mods, and I am getting this error:

 

Attribute Sets 

 

1146 - Table 'db117028926.TABLE_PRODUCTS_ATTRIBUTES_SETS' doesn't exist

 

select products_attributes_sets_id, products_attributes_sets_name from TABLE_PRODUCTS_ATTRIBUTES_SETS where 1 order by products_attributes_sets_name

 

[TEP STOP]

 

 

Where did I go wrong? Please help!

Share this post


Link to post
Share on other sites

Sorry for the delay, my power supply died and I just received my new one tonight.

 

 

It is hard to picture what you want to do.

 

I picture a product displayed on the product_info.php page with five options (which are drop-down lists), each list consists of a all the movie titles in that category ( can't see how this would be useful, but then again I don't understand a lot of things :)).

 

 

You said:

And now I wish to use phpmyadmin to execute SQL statement which take the attribute value from the above record and update all other records  in that category - INSERT STATEMENT

 

When you said "which take the attribute value from the above record" does that mean the selected item in the option list? I'll assume this is what you mean.

 

next, you also said "and update all other records in that category - INSERT STATEMENT" . Are you going to update all the records or insert new records? You mention both actions in the same sentence. If you meant UPDATE what would you be changing for all the records in that category? Would you be using the selected item in the option? If so how? I assume you didn't mean INSERT, because that would really confuse me.

 

Joey

 

 

 

 

 

 

Joey, Can I expect something on this please.

Thanks

Share this post


Link to post
Share on other sites

I hope you aren't updating from version 3, because it can't be done without a lot of pain. I suggestion you totally uninstall version, reverting the way things were before you installed my contribution. If you have version 2.1 installed, then version 4 will installl fine.

 

Did you look at the Table using a tool like phpMyAdmin? If you can find that table, then browse the contents of the table and you should be able to see the difference between an incorrect Attribute Set and a correct one by making sure they all look the same except the values, that is the format should look the same.

 

Joey

 

BTW, I created a version 4.1 but I haven't uploaded it yet. I changed it so that when you edit a product it displays the attribute set the product is using as text instead of in a drop-down list, this prevents accidentally unsetting the attribute set. There is still 1 drop-down list for adding a new attribute set. What is keeping me from uploading these changes is that I want to make it so that a user can add a bunch of attribute sets in one edit, instead of a bunch of edits. I'll try to get it done soon because I have a large project that fell into my lap that will keep me busy for months.

 

 

Joey

 

 

 

Still can't figure it out. It all look fine to me. But of course, I am no expert.  :blink:  I'm updating to the 4.0 version, maybe that will correct it?

I'll let you know if it doesn't work.

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
Sign in to follow this  

×