Jump to content
Sign in to follow this  
toasty

Attribute Sets Plus

Recommended Posts

Thanks for the contrib!! Installed with no issues at all, first time through.

 

Question for any and all forum denizens, though - I realise that currently the only way to add a set is after the product is created, because that's default osC behaviour. However, I've noticed a contrib or two that moves the attribute adding to the add product page. Has anyone tried doing anything like that with this app (i.e. being able to add a set when creating the product)?

 

Thank you!

Share this post


Link to post
Share on other sites

Hey,

 

I wanted to know, is there a way to put a quantity for each size. As I do have limited stock always of different items. And a quantity / size / product would be AMAZING.

 

Thanks, if there is let me know. I just recently installed it and can't find anything like that.

Share this post


Link to post
Share on other sites
Hey,

 

I wanted to know, is there a way to put a quantity for each size. As I do have limited stock always of different items. And a quantity / size / product would be AMAZING.

 

Thanks, if there is let me know. I just recently installed it and can't find anything like that.

 

 

I am looking for the same, hoping someone can offer a suggestion.

Share this post


Link to post
Share on other sites

Hi all.

 

this is a great mod, i love it.

 

however, i have found one shortfall in it when editing a previously created set.

if i have a set that contains 3 selections, and i want to increase the number of selections to 5 as new ones have become available, how do i do this without deleting the set and re creating it.

if the set is deleted it will be removed from all products that use that set, and then need to be re added.

 

is there a way to add a button to add a new set element, like the remove from set button, or some way to modify the set array size.

 

im off now to investigate what happens when i start poking around in the db tables, but if anyone knows a better way that would be great.

 

many thanks.

Share this post


Link to post
Share on other sites
I wanted to know, is there a way to put a quantity for each size. As I do have limited stock always of different items. And a quantity / size / product would be AMAZING.

 

I believe there are other contribs that do this. In theory they should work with this contrib (as long as they are well designed).

Edited by toasty

Share this post


Link to post
Share on other sites
Hi all.

 

this is a great mod, i love it.

 

however, i have found one shortfall in it when editing a previously created set.

if i have a set that contains 3 selections, and i want to increase the number of selections to 5 as new ones have become available, how do i do this without deleting the set and re creating it.

if the set is deleted it will be removed from all products that use that set, and then need to be re added.

 

is there a way to add a button to add a new set element, like the remove from set button, or some way to modify the set array size.

 

im off now to investigate what happens when i start poking around in the db tables, but if anyone knows a better way that would be great.

 

many thanks.

 

If you look back in this thread (not too far) somebody kindly contributed a mod to do this.

Alternatively PM me and I will email it to you.

 

regards

Chris.

Share this post


Link to post
Share on other sites

Hello - I just installed this thing. I am running Win2K3, PHP 5 and MySQL 5 on IIS 6. Just a heads up - dont know if it affects anyone else or not but these are the issues I ran into when installing. BTW - thanks for the install instructions, while a bit overwhelming at first - they are spot on.

 

 

1. I ended up changing the database engine to INNODB from MyISAM to match everything else.

2. I was running into SQL errors when trying to add a new set. Adding a blank value to an auto_increment database field is a no-no.

 

 

in admin/products_attributes_sets.php I changed the following queries

 

 

 

$insert_sql="insert into ".TABLE_PRODUCTS_ATTRIBUTES_SETS. " (products_attributes_sets_id, products_attributes_sets_name, products_options_id)
values ('','" .  $_POST['products_attributes_sets_name'] . "'," .  $_POST['products_options_id'] . ")";

 

to

 

$insert_sql="insert into ". TABLE_PRODUCTS_ATTRIBUTES_SETS . " (products_attributes_sets_name, products_options_id) 
values ('" .  $_POST['products_attributes_sets_name'] . "'," .  $_POST['products_options_id'] . ")";

 

*notice - I removed products_attributes_sets_id and its corresponding blank value

 

 

 

and

 

 

$insert_sql="insert into ".TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " (products_attributes_sets_elements_id, products_attributes_sets_id, options_values_id, options_values_price, price_prefix, sort_order)
values (''," . 
$new_attribute_set_id . "," . 
(int)$_POST['products_options_values_id_'.$i] . "," .
tep_db_input($_POST['options_values_price_'.$i]) . ",'" .
tep_db_input($_POST['price_prefix_'.$i]) . "'," . 
tep_db_input($_POST['sort_order_'.$i]) . ")";

 

to

 

$insert_sql="insert into ".TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS ." (products_attributes_sets_id, options_values_id, options_values_price, price_prefix, sort_order)
values (" . 
$new_attribute_set_id . "," . 
(int)$_POST['products_options_values_id_'.$i] . "," .
tep_db_input($_POST['options_values_price_'.$i]) . ",'" .
tep_db_input($_POST['price_prefix_'.$i]) . "'," . 
tep_db_input($_POST['sort_order_'.$i]) . ")";

 

*notice - I removed products_attributes_sets_elements_id and its corresponding blank value

 

 

Everything seems to be working after that.

Share this post


Link to post
Share on other sites

Thanks for the update. Good call.

To be correct the value you have replaced is an empty value, not a blank. However, your approach is better in this case and more correct for MySQL.

I expect you found this due to MySQL 5.x being more strict in its evaluation or something to do with the mode your are running in (e.g. NO_AUTO_VALUE_ON_ZERO for which I thin the default setting changed for v5.... or some other).

 

There are other instances that you have not mentioned (perhaps because you have not yet triggered the code). e.g. admin/products_attributes.php line 52. There may be others as this is the syntax that was used for this contribution so I suggest you vet the files for inserts start8ing with ('', or similar.

 

I don't have time to test this just now (everything has to be tested!) but I would suggest it is a good update for everyone to make. Just test well if you do.

If you are running MySQL 4.xx it is unlikely to make any difference, but still a good thing to do to avoid issues later - just pay attention to the quotes being correct. They are important.

 

regards

 

Chris.

Share this post


Link to post
Share on other sites
Attribute Sets  

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 ''',1)' at line 2

insert into products_attributes_sets_elements (products_attributes_sets_elements_id, products_attributes_sets_id, options_values_id, options_values_price, price_prefix, sort_order) values ('',1,9,,'',1)

[TEP STOP]

Share this post


Link to post
Share on other sites

Has anyone had any luck with an image as an attribute? I have a project that I am working on for a cosmetic site that wants to have a choice of images. I would think that I would use radio buttons for the choice but have an image to select for color.

 

Thanks,

 

Scott

Share this post


Link to post
Share on other sites
Anyone know if this is compatable with

Product Attributes - Option Type Feature ?

 

I already have this contribution insatalled and it is a pretty extensive install and my attributes are strating to get out of hand.

 

I can confirm that I have the two running together (an older version of OT), however I installed it along time ago and can't remember what I did!

Here are some tips for you to consider.

 

1. ASP is a tool to add and manage sets to standard OSC. i.e the code is on the admin side (with the exception of one 'optional' code segment in the catalog to display according to sort order - you can omit this if you wish if there is a conflict. I can't pinpoint it for you as I don't have it to hand but it should be obvious to you.

 

2. Other than adding it to the admin menu the ASP admin code is all outside of OSC. i.e. it does not effect the standard code and standard operation of OSC.

 

3. All ASP data is stored outside of OSC database tables. It is standalone in this respect and therefore does not effect standard operation of OSC.

 

This is all from memory (from 2 yrs back!) but in theory if it works with osc it should work with options types. I think OT deals with the types in the catalog and for ASP they are just standard options/attributes (but its a bit fuzzy!)

 

As you say I do remember that OT is fairly complex to add as it is on the catalog side but I don't 'think' there were any conflicts. Just keep a minds eye on what is going on and you should be fine.

 

Best of luck

 

C.

Share this post


Link to post
Share on other sites

Attributes are messing up my final prices. I don't know if it is caused by this contribution because I didn't test the checkout process before installing.. hadn't made it that far in the setup process. I am using a layout template, so who knows which files came pre-modified.

 

Here's what happens:

 

No attributes selected ... price is correct.

e.g. Product = $25, no atts, Total = $25

 

Attribute selected on a product with a price greater than $0 ... price is ignored and only attribute price is used.

e.g. Product = $25, $5 atts, Total = $5

 

Attribute selected on a product with price = $0 ... $10 is added to the total of the attributes.

e.g. Product = $0, $5 atts, Total = $15

 

Any ideas what could be causing this? The general forums have had no suggestions for me.

Note: These incorrect values are the same on shopping_cart.php and checkout_confirmation.php

 

edited for clarity.

Edited by candycanuck

Share this post


Link to post
Share on other sites

Hello all!

 

I can't decide what to do with all the free time this mod is going to give me...

 

I just have to get it working. :)

 

I've installed the mod, double checked for accuracy and I'm still getting this error on the product pages...

 

The table that it says doesn't exist actually does exist.

 

Any ideas?

 

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

Available Options:

 

1146 - Table '3106_sun_store_2.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 = '402' 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

 

[TEP STOP]

 

 

Thanks!

 

Jim

Share this post


Link to post
Share on other sites
-------------------------------

Available Options:

 

1146 - Table '3106_sun_store_2.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 = '402' 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

 

[TEP STOP]

 

You have missed an entry in admin/includes/database_tables.php

 

Check your install instructions for updates to this file.

For example on a quick look I found this in mine (yours may be slightly different - follow the instructions!):

// BOF Linkmatics attributes sets

define('TABLE_PRODUCTS_ATTRIBUTES_SETS', 'products_attributes_sets');

define('TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS', 'products_attributes_sets_to_products');

// Linkmatics BOF DB Rewrite

define('TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS','products_attributes_sets_elements');

// Linkmatics EOF DB Rewrite

// EOF Linkmatics attributes sets

 

Once you've done that you can go have a capuccino and put your feet up while ASP does all the work :thumbsup:

Edited by toasty

Share this post


Link to post
Share on other sites
Attributes are messing up my final prices. I don't know if it is caused by this contribution because I didn't test the checkout process before installing.. hadn't made it that far in the setup process. I am using a layout template, so who knows which files came pre-modified.

 

Here's what happens:

 

No attributes selected ... price is correct.

e.g. Product = $25, no atts, Total = $25

 

Attribute selected on a product with a price greater than $0 ... price is ignored and only attribute price is used.

e.g. Product = $25, $5 atts, Total = $5

 

Attribute selected on a product with price = $0 ... $10 is added to the total of the attributes.

e.g. Product = $0, $5 atts, Total = $15

 

Any ideas what could be causing this? The general forums have had no suggestions for me.

Note: These incorrect values are the same on shopping_cart.php and checkout_confirmation.php

 

edited for clarity.

 

All I can tell you is that ASP makes no changes to your cart logic. ASP is an 'admin' utility that helps you maintain the attributes you have created using OSC and helps you add them to the products. Assuming this is working ok and you can see what you expect on the products in the catalog then ASP has done its job. Some people find the sort functionality doesn't work for them so they remove the ASP code from product_info.php. If you do that you have absolutley no ASP code on the catalog side at all and it will still function fine (without the sort order working of course).

 

Are you using some other contribs? Your symptoms are rather strange. Good luck (think about going to backups maybe?)

 

cheers

 

Chris.

Share this post


Link to post
Share on other sites
You have missed an entry in admin/includes/database_tables.php

 

Check your install instructions for updates to this file.

For example on a quick look I found this in mine (yours may be slightly different - follow the instructions!):

// BOF Linkmatics attributes sets

define('TABLE_PRODUCTS_ATTRIBUTES_SETS', 'products_attributes_sets');

define('TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS', 'products_attributes_sets_to_products');

// Linkmatics BOF DB Rewrite

define('TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS','products_attributes_sets_elements');

// Linkmatics EOF DB Rewrite

// EOF Linkmatics attributes sets

 

Once you've done that you can go have a capuccino and put your feet up while ASP does all the work :thumbsup:

 

Chris, You ROCK!

 

I actually had the code in the files, but must not have uploaded them...

 

Awesome.

 

Completely Awesome.

:thumbsup:

 

Thanks a mil... if you've got a donate bin, I'll buy you a cappuccino!

 

Jim

Share this post


Link to post
Share on other sites

I have the same problem.

 

The sort option does not work properly.

 

It works on the admin site, but it doesn't work on the catalog site.

 

Has anyone find the solution for this ??

Edited by riwi

Share this post


Link to post
Share on other sites

Is there a way to add an option to an existing set? I don't see that. If I need to do this manually, can someone give me instructions? thanks!

Share this post


Link to post
Share on other sites

Hi Chris

I have the same problem and was wondering was it ever fixed yet.

QUOTE(jaide @ Jun 8 2007, 08:25 PM)

Sorry!

 

Symptoms - it shows as everything is working normal, I get success pages, but the changes are not reflected on the site, or when I go back to the products I edited in the admin panel

 

URL (to my site?): http://www.ezdecal.com

 

What did you do - I go to admin, click the AS button, uncheck the sets, click save, "Successful", I check the product on my site, still has all AS

 

Do you get an error - no error, it loads as normal, says successful, I check on my site/admin, and still there.

 

 

In a blinding rush but if I remember correctly this is a known issue. If you wish to remove from the product you need to edit the product and click the items to remove - it will then work.

Removing via the AS icon does not work for some reason but as the work-around works fine I have never needed to fix. This app is supported on an 'as needed' basis !

 

regards

Chris.

 

Not fussed about the AS button the work around is fine, but I need to be able to delete products, in admin it goes through the motions all correctly with no errors but the product is still there and not deleted.

If I go to delete a category i get this warning

Warning: reset() [function.reset]: Passed variable is not an array or object in X:\mydomain.com\catalogue\admin\includes\functions\database.php on line 192

 

Warning: Cannot modify header information - headers already sent by (output started at X:\mydomain.com\catalogue\admin\includes\functions\database.php:192) in X:\mydomain.com\catalogue\admin\includes\functions\general.php on line 22

 

line 192 in database.php is

reset($arr_attributeSetID);

 

line 22 in general is

header('Location:' . $url);

 

If I use the back button in the browser the category has been deleted OK

 

if line 192 is commented out the category problem disappears but not being a php coder I am sure this would cause a problem somewhere else and the delete product still does not work

 

can you help?

 

thanks

Brian

Edited by Brian-Bear

Share this post


Link to post
Share on other sites

Fixed

 

I had made a mistake in adding the modified code to admin/catagories.php, using winmerge the problem was found and rectified.

Share this post


Link to post
Share on other sites

Hi Chris,

Thanks for this contibution. It is great!

I had some difficulties, because I had the Product Attrib sort v1.2a installed and so I got the empty boxes etc. I uploaded the clean files and also made the change from Reihtac on page 5 of this thread and now everything works great and is also sorted!

I do have a question though. I am creating a shop with candles and they do have 38 colors. No problem of course with your contri, but I would love to add the visible colour to the dropdownmenu. I mean the text of the colour I already have of course, but is it in some way possible to see the actual colour in the dropdownmenu?

I saw this on another site and they were using javascript for it, but I don't know how to add that in Oscommerce, so that it works. I do have the javascript code if you want it.

This is the site where I saw it:

http://www.stickerland.nl/product_info.php...roducts_id/1046

Scroll down to where it says: "000 Kies hieronder een kleur" and you see what I mean.

I asked the siteowner but he couldnot help me further.

So it would be great if your contri could also provide this. I don't know anything about coding, so sorry if what I ask is too difficult.

Edited by libralion

Share this post


Link to post
Share on other sites

HI,

 

I tried to install the Attribute sets but now everytime I try to insert an attribute, wether it be through the OSCommerce attribute or the Attribute Sets it gives me this error:

 

1366 - Incorrect integer value: '' for column 'products_attributes_id' at row 1

 

insert into products_attributes values ('', '37', '5', '25', '4', '+')

 

[TEP STOP]

 

 

This is only my 2nd addition to osCommerce so maybe I did something wrong?

Share this post


Link to post
Share on other sites
...I do have a question though. I am creating a shop with candles and they do have 38 colors. No problem of course with your contri, but I would love to add the visible colour to the dropdownmenu. I mean the text of the colour I already have of course, but is it in some way possible to see the actual colour in the dropdownmenu?

...

 

libralion, I'm glad you like the contrib. I'm afraid I don't do custom requests - the contribution is considered (Beta) stable and that is as far it I will take it.

Alternatively I am available on a contractual basis (please feel free to pm me for this), which is a whole other ball game!

 

regards

Chris.

Edited by toasty

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  

×