Jump to content
Sign in to follow this  
toasty

Attribute Sets Plus

Recommended Posts

Hi Shayne

My suggestion would be to go to backup and re-add your categories.php edits.

regards

Chris.

 

Hey Chris, thanks for quick reply.

 

Did what you sugested a few times last night, however, no change. I've got a couple other contribs install so I'm wondering if this is conflicting problem. However, I've searched through the file, and can't seem to find what would be causing the problem. I might start editing the categories file and removing each contrib edit one by one. Process of elimination. I have the following contribs installed:

 

Category Description 1.4

SPPC (latest one)

Extra picture hack. Allows me to add 3 extra pictures to a product.

 

Thanks

Shayne

Share this post


Link to post
Share on other sites

Ok... so I've modified an original copy of the categories.php and added the code from the readme.

 

Uploaded the modified file... and nope, it doesn't work. I can't delete any new or existing products. No errors, the page simply refreshes. So this is with an original categories.php file with the changes for ASP without any contribs or mods.

 

I'd post my code here but it's over 1100 lines...

 

Hope someone can help. Anyone have any ideas?

 

Thanks again!

Shayne

Share this post


Link to post
Share on other sites
Ideas?...yeah: do what is says and SET_BIG_SELECTS=1

But seriously, I would need to look at the osC code to answer this (whihc I do not have time for just now). Another option is to increase the max join size or set big selects = 1 in your mysql config file.

Out of interest How many products/attributes do you have?

cheers

C.

Ok, so I'd probably need to contact my host.

Anyway, I rolled back to my original OSC install and added the attributes one by one :(

 

I have 29 products, with varying sizes, colours and lengths making for a total of 365 attributes.

Your contribution worked a treat up until my SQL gave me an error. It would have been a real time saver :)


Jonathan Cole

=ASY=jof

Share this post


Link to post
Share on other sites
Ok, so I'd probably need to contact my host.

Anyway, I rolled back to my original OSC install and added the attributes one by one :(

 

I have 29 products, with varying sizes, colours and lengths making for a total of 365 attributes.

Your contribution worked a treat up until my SQL gave me an error. It would have been a real time saver :)

 

Interesting. Not very many by any standards - I would query with your host - it sounds like they have restricted the query size dramatically (probably to avoid hogging of the database server). You are the first with this issue - I 100's products and thousands of attributes as do many others.

 

I will make a note and address thids in a later release.

 

regards

Chris.

Share this post


Link to post
Share on other sites

Hi guys,

 

First of all, looks like a great product, brilliant work :)

 

I do however have one rather large problem!

 

I have just gone thorugh the installation procedure and have the following issue:

 

When I go to the attribute sets page, and try to create a new set, the drop down list, although long is blank! Have I done somthing fundamentally wrone!?

 

Cheers,

 

James

Share this post


Link to post
Share on other sites
Hi guys,

 

First of all, looks like a great product, brilliant work :)

 

I do however have one rather large problem!

 

I have just gone thorugh the installation procedure and have the following issue:

 

When I go to the attribute sets page, and try to create a new set, the drop down list, although long is blank! Have I done somthing fundamentally wrone!?

 

Cheers,

 

James

Hi James]

Read the support thread from the start and you will find the work around you need.

regards

Chris.

Share this post


Link to post
Share on other sites
Read the support thread from the start and you will find the work around you need.

 

To those who install this contrib for the first time and get an error, please read the support thread from the very beginning as Chris has pointed out. You'll more than likely find the solution as others have installed this contrib - with and without errors - and have noted their solution if not suggested alterations.

 

Now, if you don't see the solution, then go back and double check your code to ensure you've inserted "every" piece of code verbatim. I suggest using a file compare program such as "Beyond Compare", especially if you're installing this contrib on top of an already modified osC. For example, our "base" shop that we install for our customers has well over fifteen contrib - all working together - including this one. However, it took a bit of extra time to ensure the lines of code from Chris' contrib did not overwrite or conflict with another contrib.

 

Here's a suggested Check List:

1. Backup, backup, backup the affected osC pages

2. Have a "test environment" instead of using a "live" site

3. Read the "readme" thoroughly for the contrib - if not twice

4. Compare each orig page - side by side (again suggesting using Beyond Compare) - with the "new contrib" page and make the necessary code change(s)

5. Insert the provided SQL statement

6. Test as needed in "test environment"

7. If any errors:

?????a. Read the contrib "readme" again to ensure you didn't forget anything

?????b. Read this support thread from the very beginning to the end

?????c. Do a "search" in the osC forum as well, as the error you received may be caused by an accidental omission in the orig osC code, and more than likely, someone has already seen it and provided a solution

?????d. Cross-check your lines of edited code

?????e. Make sure you added the new SQL code correctly - make sure the new tables are there

?????f. And if it is still not working, restore from your backups and start fresh, with a pad of paper and pencil to check off each step

 

Bottom line: Take your time and have patience, and in the end, you'll have an enhanced working store for which your customers will appreciate.

 

Jim.

Edited by InfoHaven

Share this post


Link to post
Share on other sites

Hi guys,

 

I downloaded this plugin at the weekend and all appeared well, that is until I tried to delete a product or temporarily make it invisible to teh frint end users (cliking the red dot).

 

When I try to delete a product, nothing happens, it goes through the process as it would if it was going to work, but nothing happens, the product still appears in the list, the same goes for making the product invisible.

 

Can anyone shed any light on this fairly major problem I am encountering?

 

Thanks for the help :)

 

James

Share this post


Link to post
Share on other sites
Hi guys,

 

I downloaded this plugin at the weekend and all appeared well, that is until I tried to delete a product or temporarily make it invisible to teh frint end users (cliking the red dot).

 

When I try to delete a product, nothing happens, it goes through the process as it would if it was going to work, but nothing happens, the product still appears in the list, the same goes for making the product invisible.

 

Can anyone shed any light on this fairly major problem I am encountering?

 

Thanks for the help :)

James

 

James, is this a "live" site or test? And when you make invisible, I'm assuming you mean you're in the admin area and clicking on the "red" dot. What error are you getting when making the product status green to red? And after a "red" status, does the product still show up in the following link (which it shouldn't):

http://yourdomain/index.php?cPath=00

 

Did you double check your code entries?

J.

Share this post


Link to post
Share on other sites

Hi, this is a live site. I have double checked all my code and I can't spot any errors.

 

Yes I'm trying to delete/make invisible from the admin side, I dont actually see any errors, it's just nothing happens!

 

Cheers.

 

p.s. I dont mind setting up a special FTP account if anyone needs to view any files etc.

 

Thanks for the help.

Share this post


Link to post
Share on other sites
Hi, this is a live site. I have double checked all my code and I can't spot any errors.

 

Yes I'm trying to delete/make invisible from the admin side, I dont actually see any errors, it's just nothing happens!

 

Cheers.

 

p.s. I dont mind setting up a special FTP account if anyone needs to view any files etc.

 

Thanks for the help.

 

I had the same problem (see previous replies) where I wasn't able to delete any products at all. I turns out that while modifying the categories.php file, I took out a big chunk of code.

 

In my case, I removed the entire "case 'delete_product_confirm' " which is what caused my problem.

 

Everything seems to work fine. Maybe compare your file to an original file. Here's my bit of code if you want to compare.

 

case 'delete_product_confirm':

if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['product_categories']) && is_array($HTTP_POST_VARS['product_categories'])) {

$product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);

$product_categories = $HTTP_POST_VARS['product_categories'];

 

for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) {

tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "' and categories_id = '" . (int)$product_categories[$i] . "'");

}

 

$product_categories_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'");

$product_categories = tep_db_fetch_array($product_categories_query);

 

if ($product_categories['total'] == '0') {

tep_remove_product($product_id);

}

}

 

if (USE_CACHE == 'true') {

tep_reset_cache_block('categories');

tep_reset_cache_block('also_purchased');

}

jjg_db_attributeSets($_POST['products_attributes_sets_id'], $products_id, $action );

tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));

break;

 

 

 

Hope that helps.

Shayne

Share this post


Link to post
Share on other sites
Is there another method which could be affecting my ability to delete or is it most likely to be the aforementioned one?

 

Cheers

 

Do you have your original catagories.php that you backed up? You should compare the original against the "modified" catagories provided by the contrib. This will help point out what line might have been deleted as I suspect its "original osC" code that was deleted. As I've mentioned before in this support thread, "Beyond Compare" is a good file compare application.

 

Let us know what you find.

J.

Share this post


Link to post
Share on other sites

Hi everyone, just wondering if anyone can help create a version that work with add_weight_to_attributes v0.2 ?

 

I created a version that work well with PCA but can't go any further with adding attribute set functionality working together with add_weight_to_attributes v0.2 :(

 

help please.

Share this post


Link to post
Share on other sites

getting this wierd error:

 

Attribute Sets

 

1146 - Table 'XXXX_XXXX.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]

Share this post


Link to post
Share on other sites
getting this wierd error:

 

Attribute Sets

 

1146 - Table 'XXXX_XXXX.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]

 

I'm assuming you imported the SQL tables, and if so, did you double check your tables to ensure they are there and there wasn't any errors on import?

Share this post


Link to post
Share on other sites
getting this wierd error:

 

Attribute Sets

 

1146 - Table 'XXXX_XXXX.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]

 

Hi GoTTi

 

I'm guessing you have forgotten to update the /catalog/admin/includes/database_tables.php and/or /catalog/includes/database_tables.php. files.

For your information: TABLE_PRODUCTS_ATTRIBUTES_SETS is a variable that has to be defined. This is done by adding the definition to the database_tables.php file.

 

regards

Chris.

 

This is an excerpt from the install file for the relevant edits to be made:

----------------------------------------------------		
Step 5  Note: 5.1 is in the admin directory. and 5.2 is in the catalog - both edits MUST be made or the system will not be happy.		

Step 5.1  Add database table names to /catalog/admin/includes/database_tables.php.

	Add the following lines to this file:  /catalog/admin/includes/database_tables.php
							(!!!NOTE!!!)Be sure to put these two new functions BEFORE
			 				the ending PHP tag which looks like this "?>" without the quotes.

	// BOF Linkmatics attributes sets plus custom tables
			define('TABLE_PRODUCTS_ATTRIBUTES_SETS', 'products_attributes_sets');
	define('TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS','products_attributes_sets_elements');
			define('TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS', 'products_attributes_sets_to_products');
			// EOF Linkmatics attributes sets plus custom tables

Step 5.2   Add database table names to /catalog/includes/database_tables.php.

	Add the following lines to this file:  /catalog/includes/database_tables.php
							(!!NOTE!!!)Be sure to put these two new functions BEFORE
			 				the ending PHP tag which looks like this "?>" without the quotes.

	// BOF Linkmatics attributes sets plus custom tables
			define('TABLE_PRODUCTS_ATTRIBUTES_SETS', 'products_attributes_sets');
	define('TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS','products_attributes_sets_elements');
			define('TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS', 'products_attributes_sets_to_products');
			// EOF Linkmatics attributes sets plus custom tables			

----------------------------------------------------

Share this post


Link to post
Share on other sites

thanx i did miss the upload for some reason.

 

in the admin page, the left side in catalog shos this:

 

Configuration

 

Catalog

Categories/Products

Products Attributes

BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES_SETS

Manufacturers

Reviews

Specials

Products Expected

 

whats that bout?

Share this post


Link to post
Share on other sites
thanx i did miss the upload for some reason.

 

in the admin page, the left side in catalog shos this:

 

Configuration

 

Catalog

Categories/Products

Products Attributes

BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES_SETS

Manufacturers

Reviews

Specials

Products Expected

 

whats that bout?

 

I would suggest you are more precise about your edits and follow the instructions precisely step by step.

This is another editting issue.

Share this post


Link to post
Share on other sites

Hi toasty

 

Stupid question number one, do i need to install any other contributions prior to installing this one

Is this the contribution that gives an option like this one (might look familar to you :D ) as I need to sets of attributes to be displayed like the colour and lens choice attributes

 

Thanks

Share this post


Link to post
Share on other sites

Ok...got a weird one

 

I create several sets.

 

Say....

 

Set 1 >

Option 1

Option 2

Option 3

 

Set 2 >

Option A

Option B

Option C

 

If I go into one product and add both sets what I get listed on the products page is:

 

product info..............

 

Option 1: Drop Down: Option 1, Option 2, Option 3

Option 2: Drop Down: Option 1, Option 2, Option 3, Option A, Option B, Option C

 

It should be

 

Option 1: Drop Down: Option 1, Option 2, Option 3

Option 2: Drop Down: Option A, Option B, Option C

 

Do you know any reason why I would bet duplicating the first option added to the product in the second option as well as the second options?

 

If I add three sets it does the samething....

 

Option 1: correct

Option 2: Option1 Options + Option 2 Options

Option 3: Options1 Options + Option2 Options + Option 3 Options

 

 

Thoughts?????

 

 

http://www.oceanhomesetc.com/store/product...products_id=476

Edited by Pilot_bell

Share this post


Link to post
Share on other sites
Hi toasty

 

Stupid question number one, do i need to install any other contributions prior to installing this one

Is this the contribution that gives an option like this one (might look familar to you :D ) as I need to sets of attributes to be displayed like the colour and lens choice attributes

 

Thanks

 

This contribution is totally independant of any other (so 'no') and and does not alter the standard osC schema in any way (making it easy to integrate with other contributions if required).

Yes that site is an example of ASP. It is from that site I extracted the contribution to share a little of my work.

 

enjoy.

 

C.

Share this post


Link to post
Share on other sites
Ok...got a weird one

 

I create several sets.

 

Say....

 

Set 1 >

Option 1

Option 2

Option 3

 

Set 2 >

Option A

Option B

Option C

 

If I go into one product and add both sets what I get listed on the products page is:

 

product info..............

 

Option 1: Drop Down: Option 1, Option 2, Option 3

Option 2: Drop Down: Option 1, Option 2, Option 3, Option A, Option B, Option C

 

It should be

 

Option 1: Drop Down: Option 1, Option 2, Option 3

Option 2: Drop Down: Option A, Option B, Option C

 

Do you know any reason why I would bet duplicating the first option added to the product in the second option as well as the second options?

 

If I add three sets it does the samething....

 

Option 1: correct

Option 2: Option1 Options + Option 2 Options

Option 3: Options1 Options + Option2 Options + Option 3 Options

Thoughts?????

http://www.oceanhomesetc.com/store/product...products_id=476

 

Simple answer - no I don't know.

99% of new errors reported in this thread are due to editing mistakes (missing code, accidentally deleted code or syntax errors) when installing the contribution. I would suggest this is where your problem lies too. The fix: Recheck and if you can't find anything go to backup and re-install.

 

C.

Share this post


Link to post
Share on other sites
Simple answer - no I don't know.

99% of new errors reported in this thread are due to editing mistakes (missing code, accidentally deleted code or syntax errors) when installing the contribution. I would suggest this is where your problem lies too. The fix: Recheck and if you can't find anything go to backup and re-install.

 

C.

 

Thanks....what I figured out is if I put the product_info.php page back to default without the edits it all works fine. Figured this would work since it is just simply grouping the attributes and such but still assigning them to OS Comm Admin attributes the same way. It is all working again. I compared though the php file that I had to the install instructions and it was exactly the same so not sure what happened.

 

Thanks though.....

 

Seen any issues with sort order? I did notice when you create the sets where it add the actual attribute in the OS Comm part there are no sort orders but there are in the attribute set part. Thoughts?

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  

×