Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute Sets Plus


toasty

Recommended Posts

Hello Chris,

 

I've been using your contrib for months now (which install without a problem the first time) and my version of osC which I use for all our customers is very, very heavily modded, and I already had the "Options Type" contrib installed prior to adding yours.

 

If I may, I would like to comment that for those looking at this contrib (as well as others) please use a good "file compare" application (such as Beyond Compare) then there should be no problems installing any contribs...provided of course you understand how osC works to begin with (that helps too ;-).

 

=====

 

On another note, curious if there's a way to "set the order" of how the "sets" appear when tied to a product? I edited the following line:

 

ORDER BY pas.products_attributes_sets_id,pase.sort_order");

 

however it doesn't sort by sets like I assumed...if someone could comment and/or suggest, it would be appreciated.

 

Thanks again for a great contrib!

Jim Stoffel

If you mean the order of how the product options appear on the products page then no, this contribution does not alter that code (which is further up the product_info page).

This contribution can only order the attributes of the options that have an associated set.

 

So many ask for this so I took a (very) quick look and I think the line you need is this one (beware my example might be slightly different to your code due to so much change in my system, but this the query I think)):

$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name desc");

 

Change the order by to what your after (e.g change desc to asc to reverse the sort)

 

regards

Chris.

Link to comment
Share on other sites

I fixed the language issue (translated options appearing in the drop down menu) this will not erase the translation fanctionallity, meaning that if you create a set it will work properly for the rest of the languages.

The modified products_attributes_sets.php follows:

.........

 

 

Thanks for your work on this. Nice to have some help at last!

When I get round to the next update I'll look at incorporating your efforts.

regards

Chris.

Link to comment
Share on other sites

Thank you for your previous help Chris! I have fixed the Database table file like you suggested and all is fine with that issue.

 

Now I am having trouble with the sort order of the Attribute values on the product_info.php page. I tried to adjust the sort order in the admin section and the order does chage but not how I have instucted it to. It almost appears to change randomly but only when I instruct a change.

 

Also, in the admin section I have two instances of Attribut Sets in the navigation section to the left.

 

Thanks for the help and the great contrib!!

James Tomasello

Link to comment
Share on other sites

I think I've missed something or entered something wrong while installing this contrib'. I can create and assign sets fine, but when I view the produce in the catalog I get the following error...

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in .../catalog/includes/functions/database.php on line 99

Can anyone point me to where I'm most likely to have gone wrong please.

 

 

Thanks in advance,

Ian.

Link to comment
Share on other sites

Thank you for your previous help Chris! I have fixed the Database table file like you suggested and all is fine with that issue.

 

Now I am having trouble with the sort order of the Attribute values on the product_info.php page. I tried to adjust the sort order in the admin section and the order does chage but not how I have instucted it to. It almost appears to change randomly but only when I instruct a change.

 

Also, in the admin section I have two instances of Attribut Sets in the navigation section to the left.

 

Thanks for the help and the great contrib!!

 

It sounds like you are not sorting by the ASP sort field, more likely by the record id.

Find the line in the install text file and you should have this:

ORDER BY pase.sort_order, pa.options_values_id");

 

pase.sort_order is the ASP sort field and you can see it in the PRODUCTS_ATTRIBUTES_SETS_ELEMENTS table (if you know how to look in the database). If it is populated the script should use it.

 

Chris.

Link to comment
Share on other sites

Thanks for your work on this. Nice to have some help at last!

When I get round to the next update I'll look at incorporating your efforts.

regards

Chris.

 

Note to all those with dissappearing attributes and Language issues - I think this issue is related to globals on/off and php backwards compatibility. When I get time I have a few lines to add and test (with someone helpful!).

 

Thanks to 'reihtec' for helping identify the possible culprit. If anyone else is willing to test my theory and also try out some new code when its ready please let me know either here or by a pm. (there is no danger to your data in the testing - its only display issues we are dealing with).

 

Happy New Year to all.

 

Chris.

Link to comment
Share on other sites

I think I've missed something or entered something wrong while installing this contrib'. I can create and assign sets fine, but when I view the produce in the catalog I get the following error...

Can anyone point me to where I'm most likely to have gone wrong please.

Thanks in advance,

Ian.

 

 

Is that all the error text you get? Is there more information given about the error?

Link to comment
Share on other sites

Is that all the error text you get? Is there more information given about the error?

 

Sorry Chris, that's all there is. All I can add is te error appears on ALL product pages, not just the ones I've assigned an Attibute Set to. You can see the error for yourself at http://www.submariners.co.uk/Store/.

 

I expect I'll just have to work through the whole thing again. I was just hoping someone could point me towards the most likely places and save me some time. I'll let you know if I find anything for future reference.

 

 

Ian.

 

PS > I'm very impressed by the level of support you provide on here. Well done and thank you for your efforts.

Link to comment
Share on other sites

Sorry Chris, that's all there is. All I can add is te error appears on ALL product pages, not just the ones I've assigned an Attibute Set to. You can see the error for yourself at http://www.submariners.co.uk/Store/.

 

I expect I'll just have to work through the whole thing again. I was just hoping someone could point me towards the most likely places and save me some time. I'll let you know if I find anything for future reference.

Ian.

 

PS > I'm very impressed by the level of support you provide on here. Well done and thank you for your efforts.

 

:D Found it

 

There's a clash with the "Product Attributes - Option Type Feature" contribution in product_info.php. I redid this file and with some careful merging of the two, I now have them working together perfectly.

Link to comment
Share on other sites

:D Found it

 

There's a clash with the "Product Attributes - Option Type Feature" contribution in product_info.php. I redid this file and with some careful merging of the two, I now have them working together perfectly.

 

Thanks for the update. I also have it working with Option Types, but for anyone listening this is not for folk without at least some experience of what they are doing.

 

Using the Option Types contribution requires that you use a little know-how to place the ASP code in the correct place(s) to properly function.

 

Chris.

Link to comment
Share on other sites

Hello,

 

the Contribution is great and works excellent. But, I?ve one question:

 

I?ve had a contribution installed before for copying attribute when i duplicate a product.

 

Then there is called this function:

 

function tep_copy_products_attributes($products_id_from,$products_id_to) {
 global $copy_attributes_delete_first, $copy_attributes_duplicates_skipped, $copy_attributes_duplicates_overwrite, $copy_attributes_include_downloads, $copy_attributes_include_filename;
 // $products_id_to= $copy_to_products_id;
 // $products_id_from = $pID;
 $products_copy_to_query= tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_id='" . $products_id_to . "'");
 $products_copy_to_check_query= tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_id='" . $products_id_to . "'");
 $products_copy_from_query= tep_db_query("select * from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . $products_id_from . "'");
 $products_copy_from_check_query= tep_db_query("select * from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . $products_id_from . "'");

// Check for errors in copy request
 if (!$products_copy_from_check=tep_db_fetch_array($products_copy_from_check_query) or !$products_copy_to_check=tep_db_fetch_array($products_copy_to_check_query) or $products_id_to == $products_id_from ) {
echo '<table width="100%"><tr>';
if ($products_id_to == $products_id_from) {
  // same products_id
  echo '<td class="messageStackError">' . tep_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . '<b>WARNING: Cannot copy from Product ID #' . $products_id_from . ' to Product ID # ' . $products_id_to . ' ... No copy was made' . '</b>' . '</td>';
} else {
  if (!$products_copy_from_check) {
	// no attributes found to copy
	echo '<td class="messageStackError">' . tep_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . '<b>WARNING: No Attributes to copy from Product ID #' . $products_id_from . ' for: ' . tep_get_products_name($products_id_from) . ' ... No copy was made' . '</b>' . '</td>';
  } else {
	// invalid products_id
	echo '<td class="messageStackError">' . tep_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . '<b>WARNING: There is no Product ID #' . $products_id_to . ' ... No copy was made' . '</b>' . '</td>';
  }
}
echo '</tr></table>';
 } else {

if (false) { // Used for testing
echo $products_id_from . 'x' . $products_id_to . '<br>';
echo $copy_attributes_delete_first;
echo $copy_attributes_duplicates_skipped;
echo $copy_attributes_duplicates_overwrite;
echo $copy_attributes_include_downloads;
echo $copy_attributes_include_filename . '<br>';
} // false for testing

if ($copy_attributes_delete_first=='1') {
  // delete all attributes and downloads first
	$products_delete_from_query= tep_db_query("select pa.products_id, pad.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad  where pa.products_id='" . $products_id_to . "' and pad.products_attributes_id= pa.products_attributes_id");
	while ( $products_delete_from=tep_db_fetch_array($products_delete_from_query) ) {
	  tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " where products_attributes_id = '" . $products_delete_from['products_attributes_id'] . "'");
	}
	tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $products_copy_to_check['products_id'] . "'");
}

while ( $products_copy_from=tep_db_fetch_array($products_copy_from_query) ) {
  $rows++;
// This must match the structure of your products_attributes table
// First test for existing attribute already being there
  $check_attribute_query= tep_db_query("select products_id, products_attributes_id, options_id, options_values_id from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . $products_id_to . "' and options_id='" . $products_copy_from['options_id'] . "' and options_values_id ='" . $products_copy_from['options_values_id'] . "'");
  $check_attribute= tep_db_fetch_array($check_attribute_query);
// Check if there is a download with this attribute
  $check_attributes_download_query= tep_db_query("select * from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " where products_attributes_id ='" . $products_copy_from['products_attributes_id'] . "'");
  $check_attributes_download=tep_db_fetch_array($check_attributes_download_query);

// Process Attribute
  $skip_it=false;
  switch (true) {
	case ($check_attribute and $copy_attributes_duplicates_skipped):
	  // skip duplicate attributes
	  $skip_it=true;
	  break;
	case (!$copy_attributes_include_downloads and $check_attributes_download['products_attributes_id']):
	  // skip download attributes
	  $skip_it=true;
	  break;
	default:
	  if ($check_attributes_download['products_attributes_id']) {
		if (DOWNLOAD_ENABLED=='false' or !$copy_attributes_include_downloads) {
		  // do not copy this download
		  $skip_it=true;
		} else {
		  // copy this download
		}
	  }

// skip anything when $skip_it
	  if (!$skip_it) {
		if ($check_attribute['products_id']) {
		  // Duplicate attribute - update it

		  $sql_data_array = array(
			'options_id' => tep_db_prepare_input($products_copy_from['options_id']),
			'options_values_id' => tep_db_prepare_input($products_copy_from['options_values_id']),
			'options_values_price' => tep_db_prepare_input($products_copy_from['options_values_price']),
			'price_prefix' => tep_db_prepare_input($products_copy_from['price_prefix']),
			'products_options_sort_order' => tep_db_prepare_input($products_copy_from['products_options_sort_order']),
			'product_attribute_is_free' => tep_db_prepare_input($products_copy_from['product_attribute_is_free']),
			'products_attributes_weight' => tep_db_prepare_input($products_copy_from['products_attributes_weight']),
			'products_attributes_weight_prefix' => tep_db_prepare_input($products_copy_from['products_attributes_weight_prefix']),

			'attributes_price_onetime' => tep_db_prepare_input($products_copy_from['attributes_price_onetime']),

			'attributes_display_only' => tep_db_prepare_input($products_copy_from['attributes_display_only']),

			'attributes_default' => $HTTP_POST_VARS['attributes_default'][$rows],
			'attributes_qty_prices_onetime' => $HTTP_POST_VARS['attributes_qty_prices_onetime'][$rows],
			'attributes_discounted' => $HTTP_POST_VARS['attributes_discounted'][$rows],

			'attributes_price_factor' => $HTTP_POST_VARS['attributes_price_factor'][$rows],
			'attributes_price_factor_offset' => $HTTP_POST_VARS['attributes_price_factor_offset'][$rows]
		  );

		  $cur_attributes_id = $check_attribute['products_attributes_id'];
		  tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES, $sql_data_array, 'update', 'products_id = \'' . tep_db_input($products_id_to) . '\' and products_attributes_id=\'' . tep_db_input($cur_attributes_id) . '\'');
		} else {
		  // New attribute - insert it
// , attributes_default, attributes_qty_prices_onetime, attributes_discounted
		  tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . $products_id_to . "', '" . $products_copy_from['options_id'] . "', '" . $products_copy_from['options_values_id'] . "', '" . $products_copy_from['options_values_price'] . "', '" . $products_copy_from['price_prefix'] . "', '" . $products_copy_from['products_options_sort_order'] . "', '" . $products_copy_from['product_attribute_is_free'] . "', '" . $products_copy_from['products_attributes_weight'] . "', '" . $products_copy_from['products_attributes_weight_prefix'] . "', '" . $products_copy_from['attributes_price_onetime'] . "', '" . $products_copy_from['attributes_display_only'] . "', '" . $products_copy_from['attributes_default'] . "', '" . $products_copy_from['attributes_qty_prices_onetime'] . "', '" . $products_copy_from['attributes_discounted'] . "', '" . $products_copy_from['attributes_price_factor'] . "', '" . $products_copy_from['attributes_price_factor_offset'] . "')");
		}

// Manage download attribtues
		if (DOWNLOAD_ENABLED == 'true') {
		  if ($check_attributes_download and $copy_attributes_include_downloads) {
			// copy download attributes
//				echo 'Download - ' . ' Attribute ID ' . $check_attributes_download['products_attributes_id'] . ' ' . $check_attributes_download['products_attributes_filename'] . ' copy it<br>';
			$new_attribute_query= tep_db_query("select * from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . $products_id_to . "' and options_id='" . $products_copy_from['options_id'] . "' and options_values_id ='" . $products_copy_from['options_values_id'] . "'");
			$new_attribute= tep_db_fetch_array($new_attribute_query);

			$sql_data_array = array(
			  'products_attributes_id' => tep_db_prepare_input($new_attribute['products_attributes_id']),
			  'products_attributes_filename' => tep_db_prepare_input($check_attributes_download['products_attributes_filename']),
			  'products_attributes_maxdays' => tep_db_prepare_input($check_attributes_download['products_attributes_maxdays']),
			  'products_attributes_maxcount' => tep_db_prepare_input($check_attributes_download['products_attributes_maxcount'])
			);

			$cur_attributes_id = $check_attribute['products_attributes_id'];
			tep_db_perform(TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD, $sql_data_array);
		  }
		}
	  } // $skip_it
	  break;
  } // end of switch
} // end of products attributes while loop
 } // end of no attributes or other errors
} // eof: tep_copy_products_attributes

 

But this code causes an error and no attribute set is copied to the duplicated product.

 

Does someone have a solution for this attribute copy code?

 

Hope you can help me.

 

Thanks

Michael

Link to comment
Share on other sites

I could have sworn that I installed an update that allowed updates to existing attribute sets... I KNOW I have used it!!! ;)

 

What do we need to do to add the ability? Break a few legs? Explain to someone that the perfect wife still needs updating once in a while???? (features) ahahah kidding...

 

who's on first base? Anyone working on this or is it still up for grabs....

Link to comment
Share on other sites

I could have sworn that I installed an update that allowed updates to existing attribute sets... I KNOW I have used it!!! ;)

 

What do we need to do to add the ability? Break a few legs? Explain to someone that the perfect wife still needs updating once in a while???? (features) ahahah kidding...

 

who's on first base? Anyone working on this or is it still up for grabs....

Welcome to ASP James.

The only patch I have supplied is to enable viewing of attributes not in sets.

I am not sure what you mean by 'existing attributes sets' - if you mean from the original AS contribution then no - the code is totally different and it cannot be done, if yo mean existing ASP sets then yes you can update them.

 

I'm not to keen on breaking legs, but I'd be happy to work on a perfect wife design with you - perhaps a captcha output system to filter out any nagging might be popular? (Sorry girls!...)

 

Scary....'Anyone working on this or is it still up for grabs....' >>>was that an offer of help? There are a couple of things that need doing examples include: coding the multi-language and blank attributes fixes and fixing the removal of set items ) ...I have in my head roughly how to do most things but can't find the time at the mo.

 

..but don't run for the hills, I won't be offended if you can't help.

Link to comment
Share on other sites

Hello,

 

the Contribution is great and works excellent. But, I?ve one question:

 

I?ve had a contribution installed before for copying attribute when i duplicate a product.

 

Then there is called this function: <snip>...</snip>

 

But this code causes an error and no attribute set is copied to the duplicated product.

 

Does someone have a solution for this attribute copy code?

 

Hope you can help me.

 

Thanks

Michael

 

Hello Micheal

Well that's not a lot to go on. After all, no mention of what the error is (it helps to copy and paste the whole error) and I've no idea what is calling this function.

Nevertheless, a stab in dark for you:

The function you have pasted uses about 11 custom fields in the products_attributes table that are not standard osC. Unless you have been editting the ASP code I don't really see how these two can co-exist. If you have been editting the asp code then it could be anything.

Other than that its a bit like me asking you fix my car - you kind of need to be there!

 

regards

Chris.

Link to comment
Share on other sites

Sorry Chris, that's all there is. All I can add is te error appears on ALL product pages, not just the ones I've assigned an Attibute Set to. You can see the error for yourself at http://www.submariners.co.uk/Store/.

 

I expect I'll just have to work through the whole thing again. I was just hoping someone could point me towards the most likely places and save me some time. I'll let you know if I find anything for future reference.

Ian.

 

PS > I'm very impressed by the level of support you provide on here. Well done and thank you for your efforts.

 

I guess you worked out the problem then? Nice looking site, keep at it! FYI: You have an error bottom right under Latest Forum Post:

<li><a href="http:

 

regards

Chris.

Link to comment
Share on other sites

Great instructions. Very professional.

 

I had previously installed Product Attributes Sort Order v 1.04

 

I had a problem after installing Attributes Sets Plus 1.01

 

I lost my previous sort order on my attributes for existing product options. (size:S,M,L)

 

The sort options were still there. Just not applied in the product view.

 

Changing step 6.1b, the 1.01 patch to:

 

// >>>>> BOF Linkmatics attributes sets plus patch v1.01
	   if (tep_db_num_rows($products_options_query)== 0 ) {
				   $products_options_query = tep_db_query("
		   SELECT pov.products_options_values_id, pov.products_options_values_name,
				  pa.options_values_price, pa.price_prefix , pa.options_values_id
			 FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " .
					  TABLE_PRODUCTS_OPTIONS_VALUES . " pov
			 WHERE pa.products_id = '" . (int)$_GET['products_id'] . "'
			   AND pa.options_id = '" . $products_options_name['products_options_id'] . "'
			   AND pov.products_options_values_id = pa.options_values_id
			   AND pov.language_id = '" . $languages_id . "'
			 ORDER BY pa.sort_order");
	   }
	  // <<<<< EOF Linkmatics attributes sets plus patch v1.01

 

fixed my problem. Note the last line was changed from:

 

ORDER BY pa.options_values_id");

 

to

 

ORDER BY pa.sort_order");

Thanks

 

Mike

Link to comment
Share on other sites

Hopefully I missing it....

 

Works great. An I have a LOT of contributions installed previously. Great time saver.

 

Is the any way to increase the size of an attribute set????? Example: I want to add more colors to the set and it is full.

 

Even if I have to SQL the DB table as a last resort.

 

Thanks

Thanks

 

Mike

Link to comment
Share on other sites

Hopefully I missing it....

 

Works great. An I have a LOT of contributions installed previously. Great time saver.

 

Is the any way to increase the size of an attribute set????? Example: I want to add more colors to the set and it is full.

 

Even if I have to SQL the DB table as a last resort.

 

Thanks

 

Well, I don't like chucking this about because folk always destroy their systems, but if you feel comfortable messing about with it (ie: don't try this at home without an adult present!) AND promise not to tell anyone.....

 

Before doing any of this ensure it is a test database - I have not tried this so you have be either clever, brave or really stupid if you do try it. Of course if you are the last one then I suggest you don't try it :-)

 

DO NOT TRY THIS IF YOU ARE NOT SURE YOU KNOW WHAT YOU ARE DOING AND ARE A COMPETENT DATABASE ADMIN. IT MIGHT NOT WORK ANYWAY!

 

Procedure to add an extra attribute to a set using SQL & osC (I think).

STEP 1: First you need to create the new attribute:

Use standard osC admin. This makes an entry in the products_options_values table (which is the osC table for attributes values).

 

STEP 2: Now we have an attribute THEN we need to ADD the ELEMENT to the SET:

 

I think it would happy if you just added a row using INSERT to the PRODUCTS_ATTRIBUTES_SETS_ELEMENTS table setting the fields as follows:

 

products_attributes_sets_elements_id - this field is auto incremented so leave out

products_attributes_sets_id - this field is the id field from the set in the PRODUCT_ATTRIBUTES_SETS table (so take a look in the table to find the id for the set you want; easy enough as the set name is also there).

 

options_values_id - this field is from the products_options_values table (which is the osC table for attributes values) - look up the id for the attribute you created in step 1.

 

options_values_price - your price or 0

price_prefix - '+' or '-'

sort order - A positive number. This should be the number of existing elements + 1. You can change thsort order in admin after the element has been added.

 

and that's it I think.

 

NOTE: At this point you have only updated the set, not the products with the set - they will not show the additional record unless you access the product, remove the set, and re-add the set to the product. I use easy populate to do this, hence it has never been an issue for me.

 

If I'm wrong I'm sorry :-"

 

good luck!

Link to comment
Share on other sites

Well, I don't like chucking this about because folk always destroy their systems, but if you feel comfortable messing about with it (ie: don't try this at home without an adult present!) AND promise not to tell anyone.....

 

Before doing any of this ensure it is a test database - I have not tried this so you have be either clever, brave or really stupid if you do try it. Of course if you are the last one then I suggest you don't try it :-)

 

DO NOT TRY THIS IF YOU ARE NOT SURE YOU KNOW WHAT YOU ARE DOING AND ARE A COMPETENT DATABASE ADMIN. IT MIGHT NOT WORK ANYWAY!

 

Procedure to add an extra attribute to a set using SQL & osC (I think).

STEP 1: First you need to create the new attribute:

Use standard osC admin. This makes an entry in the products_options_values table (which is the osC table for attributes values).

 

STEP 2: Now we have an attribute THEN we need to ADD the ELEMENT to the SET:

 

I think it would happy if you just added a row using INSERT to the PRODUCTS_ATTRIBUTES_SETS_ELEMENTS table setting the fields as follows:

 

products_attributes_sets_elements_id - this field is auto incremented so leave out

products_attributes_sets_id - this field is the id field from the set in the PRODUCT_ATTRIBUTES_SETS table (so take a look in the table to find the id for the set you want; easy enough as the set name is also there).

 

options_values_id - this field is from the products_options_values table (which is the osC table for attributes values) - look up the id for the attribute you created in step 1.

 

options_values_price - your price or 0

price_prefix - '+' or '-'

sort order - A positive number. This should be the number of existing elements + 1. You can change thsort order in admin after the element has been added.

 

and that's it I think.

 

NOTE: At this point you have only updated the set, not the products with the set - they will not show the additional record unless you access the product, remove the set, and re-add the set to the product. I use easy populate to do this, hence it has never been an issue for me.

 

If I'm wrong I'm sorry :-"

 

good luck!

UGH.

 

In step 2, can't the INSERT just insert a blank placeholder row to expand the table by one row.. Then add the actual attribute in the normal Attributes Set admin?? That way ou wouldnt need to know the attribute ID,etc..

 

Similar to what is probably done initially when u create a new blank Attribute Set.

 

Is this hard to add to the code? :-) Seems quite handy. INSERT a blank row at the end of the Attributes set. Then add the attribute using the same mechanism u have.

 

Just a wild guess.

Thanks

 

Mike

Link to comment
Share on other sites

UGH.

 

In step 2, can't the INSERT just insert a blank placeholder row to expand the table by one row.. Then add the actual attribute in the normal Attributes Set admin?? That way ou wouldnt need to know the attribute ID,etc..

 

Similar to what is probably done initially when u create a new blank Attribute Set.

 

Is this hard to add to the code? :-) Seems quite handy. INSERT a blank row at the end of the Attributes set. Then add the attribute using the same mechanism u have.

 

Just a wild guess.

 

Aha...you mean you want an easy way - why did'nt you say so!

 

How about this (easiest using phpmyadmin to edit the record if you have it):

step 2:

Let's assume for this you want to add a new color to a color set.

 

- Got to admin/catalog/Attributes Sets

- Create a new set, (select the same option you wish to add to your existing set, let's assume the option is COLOR for this example) with set size of 1 and give it a name e.g. mynewcolor

- add the new attribute (as you wish to add to your existing set)

LOOK in table products_attributes_sets for the new set id (in my case 32)

LOOK in table products_attributes_sets for the existing set id (in my case 30)

LOK in table products_attributes_sets_elements for the new attribute record. It will be the only record with products_attributes_sets_id set to 32. UPDATE this value to the id of existing set (30 in my example).

 

Now go to admin/catalog/Attributes Sets and delete the 'mynewcolor' set and edit your existing set for correct sort etc. and save.

...and Bob's your uncle as us brits say!

 

Almost user friendly!

Link to comment
Share on other sites

Good Evening Mr. Mellor!

 

You are THE man! I have recently taken up the task of building an e-commerce site for a door hardware company and your Attribute Sets Plus contribution is GOLD GOLD GOLD! With a product line of around 1000 items, each with MULTIPLE attribute sets(some attributes have 20 options!), you have saved me literally hundreds of punishing hours in attribute/option Hades!

 

Thank you!

 

Chad

Link to comment
Share on other sites

i just installed this mod and i dont think its working right.

 

how do i get this to work? im confused with it a little bit.

 

i can see the Attributes Sets link, and i added 2 sets, color and size, with color having 2 options and size having 8. now what am i suppose to do or see?

Link to comment
Share on other sites

Hi Gotti,

 

Now check in the Categories/Products section and look for the "AS" logo. Click on it and then check the boxes for the options you want applied to that product. See picture below

 

catp1.jpg

 

 

 

Good luck!

 

Chad

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...