Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute Sets Plus


toasty

Recommended Posts

I have noticed that a few of you have integrated QT PRO with ASP and there are a couple parts where I can't figure out how to merge them... (The page I got stuck on so far is catalog/product_info.php)

 

Any help would be greatly appreciated!

 

Thanks!!!

Link to comment
Share on other sites

Hi - this is a great contribution - thanks very much. It's working fine although I have noticed a problem (bug?) with the shopping cart page. I cannot update the quantity in the shopping cart. It remains at 1 - regardless of what I try and change it to.

 

This *only* happens with products that have been assigned my Attribute Sets. The cart updates the quantity of ordinary (attribute-less products) just fine.

 

I think this is due to the way Attribute Sets communicates with shopping_cart.php.

 

Any ideas??

Edited by jasonabc
Link to comment
Share on other sites

As a note to this - once an Attribute-Set-assigned product is in the cart I cannot add it to the cart again if I choose another weight or scent.

 

Example: Fruit Candle (Vanilla) and (8oz) goes into the cart. Cannot update quantity.

 

Try and add same candle but with different scent and different weight this time and cart remains unchanged. Can anyone confirm? Here's a link to the site:

 

http://milenasboutique.com/product_info.php?products_id=118

 

thanks!

Link to comment
Share on other sites

Installed ASP on a vanilla install of OSC and the problems are fixed - it updates the cart fine. Glad the problem is on my end and not with the mod itself ;-) I'll take a look thru and see what I missed. Great work - many thanks for such a useful and time-saving mod.

Link to comment
Share on other sites

Hello,

 

can I use the contrib when I need quantities for my product options? That means I have many products whhith the option "size". And the values are often Small, Medium, Large etc. But the quantity for each product is different (after the order from customers..).

 

Is the contrib ready for quantities?

 

Thanks.

NBA

Link to comment
Share on other sites

Just to add, this contribution works with both Multiple Categories and Product Option Extras installed. However, be careful when adding the modifications as some of the modifications needed by Attributes Set Plus will overwrite the code for Multiple Categories. You will need to rearrange your code in places and not add some of the requested changes for this install in other places (some of the lines your changing are actually being changed for exactly the same code (mainly to ensure your in the right place) and its right at those points that the multiple categories contribution modifcations were made).

 

I am happy to assist anyone who has Multiple Categories installed and who also wants to use this contribution.

 

Cheers

 

Steve

My Toolbox: Crimson Editor, Adobe Photoshop CS2.0, Expression Web, Macromedia Suite 8.0, Cinema 4D, Nvu.

Link to comment
Share on other sites

Toasty, you think you can send me your easy populated file ?

Must be only the easypopulate.php that you modified to make attributes sets plus work with it right ?

 

I would really like to be able to do this and I tried to make it work but I couldn't so if you can help me :D

Link to comment
Share on other sites

Attribute Sets Plus for osCommerce 2.2 MS2

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

 

Purpose of this Contribution

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

This contribution builds on the original Attributesets contribution. It provides the ability to add a set of predefined 'attributes' (herafter known as an Attribute Set) to a product.

Attributes Sets Plus irons out the creases and any remaining bugs of the excellent original contribution for a smoother operation.

 

CHANGES

-----------

Attributes Sets Plus includes the following improvements:

 

- This contribution is now register_globals OFF ready

- Ability to add multiple attribute sets to a single product at a time.

- The engine now uses database structures instead of arrays.

- A number of bugs were ironed out

- The processes alterred to allow for legacy products AND legacy attributes to co-exist with new attributes sets

- The deletes now make mor logical sense and work correctly

- No core osC tables are alterred - custom tables are used instead

- Less chance of conflict with other contributions (so I am told)

- The install is clear and well commented to help spot editting errors

 

See the install file for more information.

 

[Note: As far as I can see this contribution includes at least everything up to attribute sets 5.5, although the it is not the same code.]

________________________________________

(Contribution thread will be shown in next post)

 

Hi, I just installed this contribution, and I thought that I've installed correctly, but when I try to access it from admin section it gives me the following error:

 

1146 - Table 'nu-oroco_p_os1.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 check the datatbase and all 3 tables are there

any help is greatly appreciated.......Thanx, Chad

Link to comment
Share on other sites

Check your database_tables.php file in includes in admin directory

 

Do you have these line in it ??

 

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

Link to comment
Share on other sites

Attribute Sets Plus for osCommerce 2.2 MS2

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

 

Purpose of this Contribution

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

This contribution builds on the original Attributesets contribution. It provides the ability to add a set of predefined 'attributes' (herafter known as an Attribute Set) to a product.

Attributes Sets Plus irons out the creases and any remaining bugs of the excellent original contribution for a smoother operation.

 

CHANGES

-----------

Attributes Sets Plus includes the following improvements:

 

- This contribution is now register_globals OFF ready

- Ability to add multiple attribute sets to a single product at a time.

- The engine now uses database structures instead of arrays.

- A number of bugs were ironed out

- The processes alterred to allow for legacy products AND legacy attributes to co-exist with new attributes sets

- The deletes now make mor logical sense and work correctly

- No core osC tables are alterred - custom tables are used instead

- Less chance of conflict with other contributions (so I am told)

- The install is clear and well commented to help spot editting errors

 

See the install file for more information.

 

[Note: As far as I can see this contribution includes at least everything up to attribute sets 5.5, although the it is not the same code.]

________________________________________

(Contribution thread will be shown in next post)

 

HELP! Getting a TEP error after installing things as per the txt file, not sure what TEP STOP means or how I can fix it. Please look at THIS PAGE AND SCROLL DOWN, supposed to launch today, thank youuuuu!

Link to comment
Share on other sites

HELP! Getting a TEP error after installing things as per the txt file, not sure what TEP STOP means or how I can fix it. Please look at THIS PAGE AND SCROLL DOWN, supposed to launch today, thank youuuuu!

 

 

 

 

Here is the code error, hard to see because it's black on black:

 

1146 - Table 'lovebrigade.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 = '135' AND pa.options_id = '2' 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

 

[TEP STOP]

Link to comment
Share on other sites

Here is the code error, hard to see because it's black on black:

 

1146 - Table 'lovebrigade.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 = '135' AND pa.options_id = '2' 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

 

[TEP STOP]

 

 

I just stopped in here to post because I am getting the same error message

Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!!

 

Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience.

 

The quickest way to learn is to forget to BACKUP!

Link to comment
Share on other sites

I am still trying to get this to work with QT PRO (which is already installed and working)... The install file for ASP step 6 for product_info.php shows that I need to replace this with new code:

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

 

but I have this:

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

$products_attributes = tep_db_fetch_array($products_attributes_query);

if ($products_attributes['total'] > 0) {

 

I would really like to know how to integrate the two... thanks!

Link to comment
Share on other sites

Here is the code error, hard to see because it's black on black:

 

1146 - Table 'lovebrigade.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 = '135' AND pa.options_id = '2' 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

 

[TEP STOP]

 

 

see post 335 above.

Link to comment
Share on other sites

I am still trying to get this to work with QT PRO (which is already installed and working)... The install file for ASP step 6 for product_info.php shows that I need to replace this with new code:

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

 

but I have this:

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

$products_attributes = tep_db_fetch_array($products_attributes_query);

if ($products_attributes['total'] > 0) {

 

I would really like to know how to integrate the two... thanks!

 

These are not equivalent.

The ASP code you posted is getting the attributes fom the database.

The code you have is counting how many attributes you have. It then excutes 'some other code' IF you have more than zero attributes attached to the product.

Not the same thing at all - and I am not familiar with QT Pro - I would hazard a guess you have chosen the wrong code to replace.

Link to comment
Share on other sites

Toasty,

 

I have installed your contribution and it looks like it is going to do exactly what I need it to do, but I am running into 1 problem. Hopefully you can help me figure it out.

 

Since Installed AS any new products I add / existing products WON'T delete :( When I hit delete it asks to confirm and when I do it just goes back to the product page and hasn't deleted the product. Only way I can get things to delete now is if I delete the entire category which isn't very feasable.

 

Any ideas?

Link to comment
Share on other sites

Revisement to my previous post:

 

When I try to delete a whole category/subcategory I get this message:

 

Warning: reset(): Passed variable is not an array or object in /home/nantaske/public_html/osCommerce/catalog/admin/includes/functions/database.php on line 190

Warning: Cannot modify header information - headers already sent by (output started at /home/nantaske/public_html/osCommerce/catalog/admin/includes/functions/database.php:190) in /home/nantaske/public_html/osCommerce/catalog/admin/includes/functions/general.php on line 22

 

Please help.

Link to comment
Share on other sites

Thanks for the reply. I tried re-installing the backup of the original product_info.php file and the attributes came back, but some of them were in reverse order and some are in normal order, so then I copied in your code again and it's the same. I even went to the Attributes Sets panel and tried to re-order the options in reverse order to see if they would show in normal order in the store, but still no change.

 

You can play around with the sort order in product_info.php

 

If you look at the query in section 6 of the attributes sets plus install, you have to change the sql query to include all the necessary tables and link info for the order by part of the statement. If you have a contribution as I do which provides a case switch and then multiple different versions of the queries, you will have to manually copy the bits about pase.sort_order into all of the relevant queries otherwise you will only get the right sort order on some drop downs.

Link to comment
Share on other sites

Tried installing this and when logged into admin the left colum of options is missing. The languages screwed up too

 

Categories/Products

Products Attributes

Manufacturers

Reviews

BOX_CATALOG_EASYPOPULATE

BOX_CATALOG_EASYPOPULATE_BASIC

Specials

BOX_CATALOG_SHOP_BY_PRICE

BOX_CATALOG_XSELL_PRODUCTS

BOX_CATALOG_SALEMAKER

BOX_CATALOG_FEATURED

etc,

 

And when I try click on any link I get this error:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and g.admin_groups_id=' at line 1

 

select a.admin_id, a.admin_firstname, a.admin_lastname, a.admin_email_address, a.admin_created, a.admin_modified, a.admin_logdate, a.admin_lognum, g.admin_groups_name from admin a, admin_groups g where a.admin_id= and g.admin_groups_id=

 

[TEP STOP]

 

Reverted back to my original php files etc, but the errors are still there! I take I've screwed my sql database then? Any thoughts on what the heck I've done wrong!?

Link to comment
Share on other sites

I found that if you modify an attribute set and you have other sets associated to the same items the other sets dispear from the produt_info page and to make them come back you have to go click save in AS edit page.

 

Anyone know how to fix that ??

 

4 sets on the same item.

 

I edit one sets and the 3 other disapear from produt_info page that customer see

 

To make them come back you have to go in A.S. edit page and just click save again cause all the 4 sets are still check. Once you click save everything come back to normal...

 

 

sorry double post :P

Edited by WhiteBlade
Link to comment
Share on other sites

Thanks for the fantastic contrib!!! Really helped me out. :D

 

 

Problem that I don't know if it related to ASP or not.

 

I use dev area to make changes and test them and before taking ASP live into a site I noticed an odd quirk.

 

I would normally load in test products (using EasyPopulate) and play around with it then remove them. Repeat, and rinse... :-"

 

However I've noticed that it now removes images on the products. I used to just delete the products and it would leave the images in the images folder there. Saves me heaps of time having to load the images time and time again.

 

Is there some change that occurs or a feature (read:bug) that ASP has fixed in OSC that now removes the images with the product?

 

Even if it isn't related to ASP does anyone know of a way to make sure the images aren't deleted anyway?

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