Jump to content
Sign in to follow this  
toasty

Attribute Sets Plus

Recommended Posts

I installed the contrib and was able to creat attribute sets but I get this error on product_info.php

 

1146 - Table 'database_osc1.TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS' doesn't exist

 

SELECT pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix , pase.sort_order FROM products_attributes pa, TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS pas2pa, TABLE_PRODUCTS_ATTRIBUTES_SETS pas, TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS pase, products_options_values pov WHERE pa.products_id = '25' AND pa.options_id = '6' AND pas2pa.products_id = pa.products_id AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id AND pas.products_options_id = pa.options_id AND pase.products_attributes_sets_id = pas.products_attributes_sets_id AND pase.options_values_id = pa.options_values_id AND pov.products_options_values_id = pa.options_values_id AND pov.language_id = '1' ORDER BY pase.sort_order, pa.options_values_id

 

I probably did something wrong but I have no idea :huh:

Share this post


Link to post
Share on other sites

I just checked the sql database and TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS is listed there with 2 rows.

Share this post


Link to post
Share on other sites
I just checked the sql database and TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS is listed there with 2 rows.

 

Please read the previous posts before installing a contribution and/or posting an issue. See here: http://forums.oscommerce.com/index.php?s=&...ndpost&p=722870

 

 

Regarding your other message:

Hi I am in the process of installing this contrib, but I must say that the install instructions are extremely confusing and unfriendly for beginners. I doubt I will be able to successfuly install the contrib. But I will keep you updated.

It is not at all helpful to criticise without a) identifying a specific issue and B) suggesting a solution if you know one

 

I have no idea what you mean by this statement. I will confirm it is necessary to make a number of edits to osCommerce code in a number of files and also to add tables to the database (for which I have provided a clearly documented file). I have spent some time making this all as easy as possible. That being said it is a fairly complex contribution that impacts the application in many places and you should consider this before you try installing it.

 

Due to the nature of osCommerce I would always advise that you have a minimum level of programming and database experience to be sure of adding most contributions without issue. Other than that you are winging it - which is fine; as long as you realise you are winging it; but please don't blame that on me! osC is not a modular application and requires complex edits to change functionality.

 

Just make sure you back up!!

 

.....and if you think something can be documented better feel free to explain how. I am always willing to listen and make changes if required.

 

regards

Chris

 

 

 

It would be rather great if products could be selected per category!

 

You mean to be able to select a product category and add sets to all the prodcust in that category in one shot ?

Nice idea, I 'll add it to the wish list.

 

 

it's not that hard if you uses the "Find" feature in notepad to locate the code changes.

 

Yes but....I would advise against using Notepad - download a unix file editor. HTML-Kit or VIM work, (can't remember the others, there are lots).

 

If you use microsoft apps (like notepad) you can introduce spurious control characters into the php code that will break osC and give you a headache.

 

 

Contribution works great, but I must have done something wrong because I lost my previous attributes. They are still listed in admin, but they don't show up when you look at a product. The name of the attribute set shows, but the selection box is empty. If I add an attribute to a product the normal way it will not show up, but if I add it as an attribute set it will. Any help appreciated.

 

Sorry Doc I really don't understand:

...I lost my previous attributes - ummm, added using ASP or pre-ASP? What do you mean by 'previous' ?

...are still listed in admin - where in admin?

...but they don't show up when you look at a product - do you mean looking in catalog/product_info.php or on thge product in admin?

 

....The name of the attribute set shows, but the selection box is empty. If I add an attribute to a product the normal way it will not show up, but if I add it as an attribute set it will. - but you just said the selection box is empty! Please be clear and also make sure you are not mixing 'options' with 'attributes'.

 

Sorry! you will have to be more explicit to get some help with this.

 

regards

Chris.

Share this post


Link to post
Share on other sites

Hello Chris,

 

Just used your contrib - and mind you my client's store is heavily modded - and it worked like a charm!

 

Also, with respect to Options Types contrib - already had it installed and installed you contrib on top with no problem; I would just recommend to any other developer to use a "good" file-compare application to avoid any problems.

 

=========

 

Now with a question for Chris or anybody else out there ;-)

 

Is there a way to create "an option" - one option with some values, and create different "attribute sets" off the one option in such a way so that when tied to a product, they appear independantly?

 

For example, I create an option called message (set as "select") with say five different values (hello, cool, etc). Then I create the A.S. Now the tricky part is that the product can have more than one message - now if I create the diff A.S. called Message 1, 2, etc, the product will only display "one" option and the "select" drop-down will show all the variables repeated. Did I explain it OK?

 

=========

 

Thanks again for a great contrib!

Jim.

Share this post


Link to post
Share on other sites

long post, sorry:

 

error:

1146 - Table 'photogra_osCommerce.TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS' doesn't exist

 

SELECT pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix , pase.sort_order FROM products_attributes pa, TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS pas2pa, TABLE_PRODUCTS_ATTRIBUTES_SETS pas, TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS pase, products_options_values pov WHERE pa.products_id = '28' AND pa.options_id = '1' AND pas2pa.products_id = pa.products_id AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id AND pas.products_options_id = pa.options_id AND pase.products_attributes_sets_id = pas.products_attributes_sets_id AND pase.options_values_id = pa.options_values_id AND pov.products_options_values_id = pa.options_values_id AND pov.language_id = '1' ORDER BY pase.sort_order, pa.options_values_id

 

 

 

 

file:

catalog/admin/includes/database_tables.php

 

<?php

/*

$Id: database_tables.php,v 1.1 2003/06/20 00:18:30 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// define the database table names used in the project

define('TABLE_ADDRESS_BOOK', 'address_book');

define('TABLE_ADDRESS_FORMAT', 'address_format');

define('TABLE_BANNERS', 'banners');

define('TABLE_BANNERS_HISTORY', 'banners_history');

define('TABLE_CATEGORIES', 'categories');

define('TABLE_CATEGORIES_DESCRIPTION', 'categories_description');

define('TABLE_CONFIGURATION', 'configuration');

define('TABLE_CONFIGURATION_GROUP', 'configuration_group');

define('TABLE_COUNTRIES', 'countries');

define('TABLE_CURRENCIES', 'currencies');

define('TABLE_CUSTOMERS', 'customers');

define('TABLE_CUSTOMERS_BASKET', 'customers_basket');

define('TABLE_CUSTOMERS_BASKET_ATTRIBUTES', 'customers_basket_attributes');

define('TABLE_CUSTOMERS_INFO', 'customers_info');

define('TABLE_LANGUAGES', 'languages');

define('TABLE_MANUFACTURERS', 'manufacturers');

define('TABLE_MANUFACTURERS_INFO', 'manufacturers_info');

define('TABLE_NEWSLETTERS', 'newsletters');

define('TABLE_ORDERS', 'orders');

define('TABLE_ORDERS_PRODUCTS', 'orders_products');

define('TABLE_ORDERS_PRODUCTS_ATTRIBUTES', 'orders_products_attributes');

define('TABLE_ORDERS_PRODUCTS_DOWNLOAD', 'orders_products_download');

define('TABLE_ORDERS_STATUS', 'orders_status');

define('TABLE_ORDERS_STATUS_HISTORY', 'orders_status_history');

define('TABLE_ORDERS_TOTAL', 'orders_total');

define('TABLE_PRODUCTS', 'products');

define('TABLE_PRODUCTS_ATTRIBUTES', 'products_attributes');

define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD', 'products_attributes_download');

define('TABLE_PRODUCTS_DESCRIPTION', 'products_description');

define('TABLE_PRODUCTS_NOTIFICATIONS', 'products_notifications');

define('TABLE_PRODUCTS_OPTIONS', 'products_options');

define('TABLE_PRODUCTS_OPTIONS_VALUES', 'products_options_values');

define('TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS', 'products_options_values_to_products_options');

define('TABLE_PRODUCTS_TO_CATEGORIES', 'products_to_categories');

define('TABLE_REVIEWS', 'reviews');

define('TABLE_REVIEWS_DESCRIPTION', 'reviews_description');

define('TABLE_SESSIONS', 'sessions');

define('TABLE_SPECIALS', 'specials');

define('TABLE_TAX_CLASS', 'tax_class');

define('TABLE_TAX_RATES', 'tax_rates');

define('TABLE_GEO_ZONES', 'geo_zones');

define('TABLE_ZONES_TO_GEO_ZONES', 'zones_to_geo_zones');

define('TABLE_WHOS_ONLINE', 'whos_online');

define('TABLE_ZONES', 'zones');

// 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

 

?>

 

 

 

 

 

 

file:

catalog/includes/database_tables.php

 

<?php

/*

$Id: database_tables.php,v 1.1 2003/03/14 02:10:58 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// define the database table names used in the project

define('TABLE_ADDRESS_BOOK', 'address_book');

define('TABLE_ADDRESS_FORMAT', 'address_format');

define('TABLE_BANNERS', 'banners');

define('TABLE_BANNERS_HISTORY', 'banners_history');

define('TABLE_CATEGORIES', 'categories');

define('TABLE_CATEGORIES_DESCRIPTION', 'categories_description');

define('TABLE_CONFIGURATION', 'configuration');

define('TABLE_CONFIGURATION_GROUP', 'configuration_group');

define('TABLE_COUNTER', 'counter');

define('TABLE_COUNTER_HISTORY', 'counter_history');

define('TABLE_COUNTRIES', 'countries');

define('TABLE_CURRENCIES', 'currencies');

define('TABLE_CUSTOMERS', 'customers');

define('TABLE_CUSTOMERS_BASKET', 'customers_basket');

define('TABLE_CUSTOMERS_BASKET_ATTRIBUTES', 'customers_basket_attributes');

define('TABLE_CUSTOMERS_INFO', 'customers_info');

define('TABLE_LANGUAGES', 'languages');

define('TABLE_MANUFACTURERS', 'manufacturers');

define('TABLE_MANUFACTURERS_INFO', 'manufacturers_info');

define('TABLE_ORDERS', 'orders');

define('TABLE_ORDERS_PRODUCTS', 'orders_products');

define('TABLE_ORDERS_PRODUCTS_ATTRIBUTES', 'orders_products_attributes');

define('TABLE_ORDERS_PRODUCTS_DOWNLOAD', 'orders_products_download');

define('TABLE_ORDERS_STATUS', 'orders_status');

define('TABLE_ORDERS_STATUS_HISTORY', 'orders_status_history');

define('TABLE_ORDERS_TOTAL', 'orders_total');

define('TABLE_PRODUCTS', 'products');

define('TABLE_PRODUCTS_ATTRIBUTES', 'products_attributes');

define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD', 'products_attributes_download');

define('TABLE_PRODUCTS_DESCRIPTION', 'products_description');

define('TABLE_PRODUCTS_NOTIFICATIONS', 'products_notifications');

define('TABLE_PRODUCTS_OPTIONS', 'products_options');

define('TABLE_PRODUCTS_OPTIONS_VALUES', 'products_options_values');

define('TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS', 'products_options_values_to_products_options');

define('TABLE_PRODUCTS_TO_CATEGORIES', 'products_to_categories');

define('TABLE_REVIEWS', 'reviews');

define('TABLE_REVIEWS_DESCRIPTION', 'reviews_description');

define('TABLE_SESSIONS', 'sessions');

define('TABLE_SPECIALS', 'specials');

define('TABLE_TAX_CLASS', 'tax_class');

define('TABLE_TAX_RATES', 'tax_rates');

define('TABLE_GEO_ZONES', 'geo_zones');

define('TABLE_ZONES_TO_GEO_ZONES', 'zones_to_geo_zones');

define('TABLE_WHOS_ONLINE', 'whos_online');

define('TABLE_ZONES', 'zones');

 

// 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

 

?>

 

 

 

 

question: why do i get that error? is one of the files bad?

Share this post


Link to post
Share on other sites

Hi Chris,

 

I had a quick look at the instructions for the Attribute Sets Plus and have one question....

 

 

Will not this code replacment for products_info.php , make it so that previously added attributes will not show: (I ask since the prviously added attributes will not have any records in the new tables which here is set as a requirment to show the attributes)

 

WHERE pa.products_id = '" . (int)$_GET['products_id'] . "'

AND pa.options_id = '" . $products_options_name['products_options_id'] . "'

AND pas2pa.products_id = pa.products_id

AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id

AND pas.products_options_id = pa.options_id

AND pase.products_attributes_sets_id = pas.products_attributes_sets_id

AND pase.options_values_id = pa.options_values_id

AND pov.products_options_values_id = pa.options_values_id

AND pov.language_id = '" . $languages_id . "'

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

Share this post


Link to post
Share on other sites

just so you can maybe help me more, here is what the database looks like in phpmyadmin

im thinking that the "1146 - Table 'photogra_osCommerce.TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS' doesn't exist" might be the problem?

sql_screenshot.jpg

Share this post


Link to post
Share on other sites

so i tried to do the following with no success. (note: the error msg is different)

 

edited: (catalog/product_info.php)

FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " .

TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS . " pas2pa, " .

TABLE_PRODUCTS_ATTRIBUTES_SETS . " pas, " .

TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, " .

TABLE_PRODUCTS_OPTIONS_VALUES . " pov

 

 

to become:

 

FROM " . PRODUCTS_ATTRIBUTES . " pa, " .

PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS . " pas2pa, " .

PRODUCTS_ATTRIBUTES_SETS . " pas, " .

PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, " .

PRODUCTS_OPTIONS_VALUES . " pov

 

 

error:

1146 - Table 'photogra_osCommerce.PRODUCTS_ATTRIBUTES' doesn't exist

 

SELECT pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix , pase.sort_order FROM PRODUCTS_ATTRIBUTES pa, PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS pas2pa, PRODUCTS_ATTRIBUTES_SETS pas, PRODUCTS_ATTRIBUTES_SETS_ELEMENTS pase, PRODUCTS_OPTIONS_VALUES pov WHERE pa.products_id = '28' AND pa.options_id = '1' AND pas2pa.products_id = pa.products_id AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id AND pas.products_options_id = pa.options_id AND pase.products_attributes_sets_id = pas.products_attributes_sets_id AND pase.options_values_id = pa.options_values_id AND pov.products_options_values_id = pa.options_values_id AND pov.language_id = '1' ORDER BY pase.sort_order, pa.options_values_id

Share this post


Link to post
Share on other sites
Hi Chris,

 

I had a quick look at the instructions for the Attribute Sets Plus and have one question....

Will not this code replacment for products_info.php , make it so that previously added attributes will not show: (I ask since the prviously added attributes will not have any records in the new tables which here is set as a requirment to show the attributes)

 

Thanks Nick - good call. Turns out I thought I had done this but my site is so customised I missed it...long story!

I have had a crack at this today hopefully this will do the trick. Anyone care to test it? Just paste the following additional code (in product_info.php) as instructed below:

 

Just to be clear, this code is to provide the ability to use the normal attributes system alongside the ASP contribution (even using both on the same product).

 

The logic is simple: Go get the current option attributes set sort order (what it did previously), if this returns nothing then it must be a non-set option so lets ignore the sets stuff and order the attributes as per original osC.

NOTE: this code should not cause damage (as it only selects data, it does not update the database) but be warned it has undergone no testing at all and any untested code may cause spurious results so BACKUP first.

 

So... where original code is:

				// BOF Linkmatics attributes sets plus								  
	  $products_options_query = tep_db_query("
	  SELECT pov.products_options_values_id, pov.products_options_values_name, 
		   pa.options_values_price, pa.price_prefix , pase.sort_order
		  FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . 
				TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS . " pas2pa, " . 
				TABLE_PRODUCTS_ATTRIBUTES_SETS . " pas, " .
				TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, " .
				TABLE_PRODUCTS_OPTIONS_VALUES . " pov
				WHERE	  pa.products_id = '" . (int)$_GET['products_id'] . "'		   
			AND pa.options_id = '" . $products_options_name['products_options_id'] . "'
			AND pas2pa.products_id = pa.products_id
			AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id
			AND pas.products_options_id = pa.options_id
			AND pase.products_attributes_sets_id = pas.products_attributes_sets_id
			AND pase.options_values_id = pa.options_values_id
			AND pov.products_options_values_id = pa.options_values_id
			AND pov.language_id = '" . $languages_id . "'
			ORDER BY pase.sort_order, pa.options_values_id");	   
	  // EOF Linkmatics attributes sets plus

 

Change it to this:

 

				// BOF Linkmatics attributes sets plus								  
	  $products_options_query = tep_db_query("
	  SELECT pov.products_options_values_id, pov.products_options_values_name, 
		   pa.options_values_price, pa.price_prefix , pase.sort_order
		  FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . 
				TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS . " pas2pa, " . 
				TABLE_PRODUCTS_ATTRIBUTES_SETS . " pas, " .
				TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, " .
				TABLE_PRODUCTS_OPTIONS_VALUES . " pov
				WHERE	  pa.products_id = '" . (int)$_GET['products_id'] . "'		   
			AND pa.options_id = '" . $products_options_name['products_options_id'] . "'
			AND pas2pa.products_id = pa.products_id
			AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id
			AND pas.products_options_id = pa.options_id
			AND pase.products_attributes_sets_id = pas.products_attributes_sets_id
			AND pase.options_values_id = pa.options_values_id
			AND pov.products_options_values_id = pa.options_values_id
			AND pov.language_id = '" . $languages_id . "'
			ORDER BY pase.sort_order, pa.options_values_id");
			// BOF Linkmatics attributes sets plus	test patch 001
		 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.options_values_id");	
		 }
		// EOF Linkmatics attributes sets plus	test patch 001
	  // EOF Linkmatics attributes sets plus

 

Any takers ?

 

regards

 

Chris.

Share this post


Link to post
Share on other sites

Ok so instead of whining I decided to do something about it. :D

 

Before I attempted to install this contrib for the second time I went over the txt manual and edited with color codes and also removed all the uneeded notes for a fresh install. It turned out that I got it right this time and since I liked the results of the edit I made to the manual, I added it to the contrib page, I hope it helps other people like it helped me.

 

I also found small mistakes that I corrected, like the change asked to be made to /catalog/admin/includes/languages/english/products_attributes.php. I Believe That change is not necessary as the products_attributes.php file included with the contrib already have the changes in it, the rest was just minor changes.

 

All credit goes to Toasty, as he is the one who actually wrote the manual.

 

 

http://www.oscommerce.com/community/contributions,3610

Share this post


Link to post
Share on other sites
Ok so instead of whining I decided to do something about it. :D

 

Before I attempted to install this contrib for the second time I went over the txt manual and edited with color codes and also removed all the uneeded notes for a fresh install. It turned out that I got it right this time and since I liked the results of the edit I made to the manual, I added it to the contrib page, I hope it helps other people like it helped me.

 

I also found small mistakes that I corrected, like the change asked to be made to /catalog/admin/includes/languages/english/products_attributes.php. I Believe That change is not necessary as the products_attributes.php file included with the contrib already have the changes in it, the rest was just minor changes.

 

All credit goes to Toasty, as he is the one who actually wrote the manual.

http://www.oscommerce.com/community/contributions,3610

 

Well that was a bit of a surprise.

Thankyou for your efforts, and I am pleased to hear you have successfully installed the contribution.

For future reference it may more appropriate to contact the author before loading up new threads to the contribution page; this enables discussion about the clearest way to manage any new versions/information etc. You only have to look at some of the other confusing contributions to understand why.

 

Also I have three advisories about your new install instructions:

 

1. It is never advisable to copy code from a microsoft program (specially rich text) to a file to be used on a unix system (which many people use)- indeed it is not really good practice to do it even to a microsoft system. It can lead to spurious characters in the code and crashing the system for no apparent reason. I would therefore advise against using this new file for that purpose.

 

2. The included file: /catalog/admin/includes/languages/english/products_attributes.php is only relevant if you have no other edits (for example the options types contribution) to the standard osC file. It is therefore useful to show it as a file edit in the install process for those that cannot use the included file.

 

3. I don't know what has been removed from the instructions but I am not aware of any redundant notes so this concerns me.

 

 

Please note I have not had any involvement with the new install process and cannot support its use for that reason.

 

regards

 

Chris

Share this post


Link to post
Share on other sites
For future reference it may more appropriate to contact the author before loading up new threads to the contribution page; this enables discussion about the clearest way to manage any new versions/information etc. You only have to look at some of the other confusing contributions to understand why.

Well I only meant to make it short and more clear for beginners as I stated on the instructions, and I apologize if you did not like me uploading the file.

 

 

1. It is never advisable to copy code from a microsoft program (specially rich text) to a file to be used on a unix system (which many people use)- indeed it is not really good practice to do it even to a microsoft system. It can lead to spurious characters in the code and crashing the system for no apparent reason. I would therefore advise against using this new file for that purpose.

So long as you open the file using wordpad as I stressed in the instructions I don't see how that can possibly happen, in any case that file can be turned into an html file with little effort, I can do it if you think that will make it better.

 

 

2. The included file: /catalog/admin/includes/languages/english/products_attributes.php is only relevant if you have no other edits (for example the options types contribution) to the standard osC file. It is therefore useful to show it as a file edit in the install process for those that cannot use the included file.

If you take the time to read the file you will see that I mention it as an optional edit, I didn't just remove that step. Before it was clearly saying the file should be edited when in fact it was already included with the supplied admin folder.

 

3. I don't know what has been removed from the instructions but I am not aware of any redundant notes so this concerns me.

Nothing was removed except upgrade notes and other general notes, you actually take the time to open both files side by side you will see how it sounds alot more coherent now.

 

 

Anyway, it was not my intention to offend anyone, I just wanted to give something back to the community as I cannot code. I still think it's not bad at all. In any case I am sure thre is a way to request it to be removed.

Edited by WEB11

Share this post


Link to post
Share on other sites

Hi Chris, I would also like to add my appreciation for your great contribution. :thumbsup:

 

I'm still new to OS but have added several contributions to my store and agree wholeheartedly that this went very smoothly and I had no trouble with the instructions at all.

 

It seems I am having one little problem though and have searched around and can't figure it out. Perhaps someone could help.

 

Everything seems to work fine but the sort order won't change for me within the attribute set. The highest priced option is at the top where I would prefer the lowest to be there.

 

I also tried the small change as outlined in Step 6, but still haven't got it.

 

Any tip about where to look would be appreciated.

 

Thanks,

 

Scott

Share this post


Link to post
Share on other sites

Chris,

 

I am doing a site that sells various shirts, and with that, they have the need to force a customer to choose between two or three choices...so your idea of:

 

2. Integrating with the Options Types contribution.

 

is greatly desired by this designer :-)

 

If you have something available...I'd be glad to test it out for you and give you any feedback, etc. I love your contrib! Thanks for providing your time and efforts and making them available for us less gifted folk. :-"

 

Dave

Share this post


Link to post
Share on other sites

Chris,

 

Thank you so much for this very nice upgrade to At Sets. It does fix many issues and is much easier to use. I agree that the ability to add an item to an existing set would be great.

 

Your bug fix for existing attributes does in fact work. I had a few very nervous hours as all attributes stopped working on over 1400 products. Yes, shame on me for not upgrading on my dev server, but I had database issues caused by a supposedly "Easy" contrib so I didn't.

 

I also had the database issue that was posted about. I would like to suggest that you incorporate the attribute fix and relist it as a slightly newer revision.

 

I think your install instructions were fine. I think Chemo set the standard for install instructions, but that does take time.

 

Thanks again!

Scott

Share this post


Link to post
Share on other sites

Hi Im a bit of a newbie type...

 

I thought everything was going so well but when I click on the Attribute sets I get the following

 

message:Access Denied

No Right Permission Access

Please contact your Web Administrator to request

more access or if you found any problem.

 

What Have I done?

 

Please help and would be eternally grateful

 

Alwyn

Share this post


Link to post
Share on other sites

Chris hi.

 

Thanks for a great contribution, which will save me hours of inputting. However, I have a small problem.

 

I followed the installation instructions to the letter, and when I select Admin-> Catalog I get the following error message:

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/bobnanne/public_html/catalog/admin/categories.php on line 1807

 

My edits were not in this part of the file. Line 1807 is

 

echo '<tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . ''">' . "n";

 

and in context, from line 1789 the code is:

 

if ((!isset($HTTP_GET_VARS['cID']) && !isset($HTTP_GET_VARS['pID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $categories['categories_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) {

	$category_childs = array('childs_count' => tep_childs_in_category_count($categories['categories_id']));

	$category_products = array('products_count' => tep_products_in_category_count($categories['categories_id']));



	$cInfo_array = array_merge($categories, $category_childs, $category_products);

	$cInfo = new objectInfo($cInfo_array);

  }



  if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) {

	echo '<tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . ''">' . "n";

  } else {

	echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . ''">' . "n";

  }

?>

 

I don't know much about php, and I have tried escaping the single quotes and the "n" (the sum total of my knowledge) but this does not work.

 

Do you have any idea what is wrong?

 

Many thanks.

 

Bob.

Share this post


Link to post
Share on other sites

I am having a similar problem with product_info.php, this time when any item is selected in the shop area of my site:

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/bobnanne/public_html/catalog/product_info.php on line 217

 

Line 217 is:

 

document.write('<?php echo '<a href="java script:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

 

 

and in context (from line 203) it is

 

<?php

if (tep_not_null($product_info['products_image'])) {

?>

	  <table border="0" cellspacing="0" cellpadding="2" align="right">

		<tr>

		  <td align="center" class="smallText">

<script language="javascript"><!--

document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

</noscript>

		  </td>

		</tr>

	  </table>

<?php

 

can you help me with this as well?

 

Many thanks.

 

Bob.

Share this post


Link to post
Share on other sites

Attribute Sets Plus for osCommerce 2.2 MS2

=================================

 

NEWS:: NEW VERSION (V1.01) now in contributions section.

 

CHANGES

-----------

Attributes Sets Plus includes the following improvements:

 

- minor updates to the install readme file (incorporating user feedback)

- patch included to assure display of legacy and non-sets attributes

 

See the install file for more information.

 

Contribution is found here: http://forums.oscommerce.com/index.php?showtopic=173616

________________________________________

 

 

 

2. Integrating with the Options Types contribution.

 

is greatly desired by this designer :-)

 

If you have something available...I'd be glad to test it out for you and give you any feedback, etc. I love your contrib! Thanks for providing your time and efforts and making them available for us less gifted folk. :-"

 

Dave

 

Dave

I'd love to oblige but the search for more dosh is on right now + I have been rebuilding my systems and that's put me behind so I'm afraid it will have to wait a while - I have it done on my system so its not rocket science, but extracting to be standalone is!

I will note your interest and get back to you for testing if you still need it later on.

regards

Chris.

Share this post


Link to post
Share on other sites

I installed everything according to the installation directions, and created my attribute set. I assigned an attribute set to a product, and then attempted to unset it. After unchecking the attribute set for that specific product, and then saving, I get the message that the operation was successful. Then when I click on the attribute set icon, it shows the set being selected for the product again.

 

Any idea as to what's wrong?

 

Additionally, once a set has been created, it copies it to product_attributes, meaning that I have to not only delete the set, but delete each attribute. Is this how it's supposed to work?

 

Thanks!

Damian

Share this post


Link to post
Share on other sites
I installed everything according to the installation directions, and created my attribute set. I assigned an attribute set to a product, and then attempted to unset it. After unchecking the attribute set for that specific product, and then saving, I get the message that the operation was successful. Then when I click on the attribute set icon, it shows the set being selected for the product again.

 

Any idea as to what's wrong?

 

Additionally, once a set has been created, it copies it to product_attributes, meaning that I have to not only delete the set, but delete each attribute. Is this how it's supposed to work?

 

Thanks!

Damian

 

Damian

 

Thankyou for your query. I have had an initial look and it appears that you are correct - the Set is not removed when you use the method you describe - there must be a function call missing. The same can however be achieved by another route (and this is why I missed it!) so it is not critical.

______________________________________________________________________

WORKAROUND for Removing an Attribute Set from a Product:

 

The same function can be achieved by selecting the required product as before

<Admin - Catalog - Categories/Products - [navigate to the desired product]>

Select EDIT (to edit the product)

Check the set(s) you wish to remove

Select PREVIEW

Select UPDATE

 

The set will be correctly removed from the product (i.e the products_attributes table)

_______________________________________________________________________

 

I will try to find time to fix this shortly but you should be OK with the workaround in the meantime.

 

regards

Chris.

Edited by toasty

Share this post


Link to post
Share on other sites
Damian

 

Thankyou for your query. I have had an initial look and it appears that you are correct - the Set is not removed when you use the method you describe - there must be a function call missing. The same can however be achieved by another route (and this is why I missed it!) so it is not critical.

______________________________________________________________________

WORKAROUND for Removing an Attribute Set from a Product:

 

The same function can be achieved by selecting the required product as before

<Admin - Catalog - Categories/Products - [navigate to the desired product]>

Select EDIT (to edit the product)

Check the set(s) you wish to remove

Select PREVIEW

Select UPDATE

 

The set will be correctly removed from the product (i.e the products_attributes table)

_______________________________________________________________________

 

I will try to find time to fix this shortly but you should be OK with the workaround in the meantime.

 

regards

Chris.

 

Sweet, thanks for the help. I didn't even think about editing the product -- I just deleted the entries right out of the database. Thanks for your help and hard work.

 

Damian

Share this post


Link to post
Share on other sites

Dear ASP users

 

I will continue to provide support but just a cautionary word that not only has my primary system been refusing to connect to the internet, despite a rebuild, but I have had a wee problem-ette recently and I am off to hospital to get it sorted.......

 

So don't expect lightning reactions just now; but I'LL BE BACK at some point in the near future.

 

Happy selling

 

Chris.

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  

×