Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Dependant Attributes - Can I do this?

Dependant Attributes - Can I do this?

Locked

Views: 20,157

Results 1 to 20 of 65
This thread is locked. New replies are disabled.
7 Apr 2008, 12:06 PM
#1
dogsndubs avatar

dogsndubs

New Zenner

Join Date:
Apr 2008
Posts:
2
Plugin Contributions:
0

Dependant Attributes - Can I do this?

Hi - I am new to the firum and would like to ask a pre-sale type question.

Does anyone know whether Zen Cart will do the following or can someone code this option for me?

I have a number of T Shirt designs which are all available on Unisex T Shirts, Kids T Shirts, Hoodies etc

What I need is the ability for a customer to intially choose a design, then choose a garment and depending on what they choose, the next option would only show sizes and colours that relate to the choice of garment the customer made.

Does anyone know whether this can be done?

I have tried Cube Cart but it will not allow me to achieve this, hopefully Zen Cart will :)

Regards
Marc

https://www.dogsndubs.com

11 Apr 2008, 7:00 AM
#2
twinge avatar

twinge

New Zenner

Join Date:
Jun 2005
Posts:
36
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

I just spent about 2 hours researching this, and came up empty handed. It appears that Zen Cart does not offer this at all, and it doesn't appear to be on the list of goals for the next year or two of development. I couldn't find any module add-ons that offered this either. AND I couldn't find any other free shopping cart solutions that had this functionality. D'oh!

You're left with basically 3 options:

  1. Use notes in the drop-downs to tell the customers when options aren't available, e.g. "Royal Blue (Unisex Only)". This is the method I'm currently using, but it's not a very good one - customers are dumb (or not web-savvy, at least) and often pick attributes clearly labeled as invalid.

  2. Separate top-tier attributes into categories. In this case you'd have a category for Hoodies, a category for Ladies' Cut, etc. This could be a fairly good solution depending on how many different options you want to have (too many and it'd get cluttered). This also assumes you only have 1 level of dependency - meaning that, different options are set for Hoodies/Ladies'/Kid's, but don't depend on anything else. If your colors ALSO depend on size, for example, this method would be too messy to use.

  3. Code it. Either figure out the PHP or Javascript code to make it happen yourself, or pay someone to do it. This is the method I'll employ when I have the time to do so, but that could be a while. I also don't know how easy it would be to modify something like this and still make it 'external' enough to upgrade easily; you might have to do some extra manual steps each time you update, depending.

On a side note, this question should really be in the FAQ (if it's in there, I sure didn't see it). I've seen this asked a LOT here when I was searching for past posts in the topic, and they usually either go unanswered or are answered with "Zen Cart doesn't currently support dependent attributes".

11 Apr 2008, 7:09 AM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

Zencart's attributes feature in the current version, does not enable field validation on input.

I believe the devs are looking at putting it into the next version...

11 Apr 2008, 7:13 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Dependant Attributes - Can I do this?

For two sets of attributes, you can use the Product Attribute Grid mod to display the available combinations.

11 Apr 2008, 7:14 AM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

Good point Glenn... I forgot about this!

14 Apr 2008, 6:06 PM
#6
modernm avatar

modernm

New Zenner

Join Date:
Dec 2007
Location:
Hoboken, NJ
Posts:
97
Plugin Contributions:
1

Re: Dependant Attributes - Can I do this?

Check out Dynamic Drop Downs for Stock by Attributes in the contrib section. The sequenced drop downs work great for multiple attributes. Use the single drop down for single attributes and have the ability to show out of stock next to the attribute.

Cal

26 Apr 2008, 5:27 AM
#8
dogsndubs avatar

dogsndubs

New Zenner

Join Date:
Apr 2008
Posts:
2
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

Hi - Thanks everybody for your replies. Sorry I didn't reply earlier - computer and work problems :(

I will look into the options you have suggested and see if I can work around it using the mods.

Thanks again.:smile:

26 Apr 2008, 7:23 AM
#9
uvfch avatar

uvfch

New Zenner

Join Date:
Apr 2008
Posts:
7
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

modernm:

Check out Dynamic Drop Downs for Stock by Attributes in the contrib section. The sequenced drop downs work great for multiple attributes. Use the single drop down for single attributes and have the ability to show out of stock next to the attribute.

Cal

Hi, this feature is great. I tried installed it in my testing store which was runing with stock by attributes well. After installation, this message appear after the product description, and do not show the product attributes:

1146 Table 'lessuvco_store.TABLE_PRODUCTS_STOCK' doesn't exist
in:
[select quantity from TABLE_PRODUCTS_STOCK where products_id = '1' AND quantity > 0]

any idea on this?

Thanks.

26 Apr 2008, 12:11 PM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Dependant Attributes - Can I do this?

This is a problem with the integration of the osCommerce based product attribute dropdown mod into Zen Cart. in the current version of the mod (1.3) line 87 of the pad_sequenced_dropdowns.php class calls for data from a table that doesn't exist in Zen Cart or Stock by Attributes. Hopefully modernm will pop back and fix that.

26 Apr 2008, 8:47 PM
#11
modernm avatar

modernm

New Zenner

Join Date:
Dec 2007
Location:
Hoboken, NJ
Posts:
97
Plugin Contributions:
1

Re: Dependant Attributes - Can I do this?

uvfch:

Hi, this feature is great. I tried installed it in my testing store which was runing with stock by attributes well. After installation, this message appear after the product description, and do not show the product attributes:

1146 Table 'lessuvco_store.TABLE_PRODUCTS_STOCK' doesn't exist
in:
[select quantity from TABLE_PRODUCTS_STOCK where products_id = '1' AND quantity > 0]

any idea on this?

Thanks.

Add the following line to includes/database_tables.php

define('TABLE_PRODUCTS_STOCK', 'products_with_attributes_stock');

Cal

26 Apr 2008, 11:23 PM
#12
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Dependant Attributes - Can I do this?

modernm:

Add the following line to includes/database_tables.php

define('TABLE_PRODUCTS_STOCK', 'products_with_attributes_stock');

> CalI was hoping that it would turn out to be something straightforward like this ... though rather than editing a core and non-overwriteable file, it would be better to change the pad_sequenced_dropdowns.php class to select from TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK instead of TABLE_PRODUCTS_STOCK.
27 Apr 2008, 12:43 AM
#13
modernm avatar

modernm

New Zenner

Join Date:
Dec 2007
Location:
Hoboken, NJ
Posts:
97
Plugin Contributions:
1

Re: Dependant Attributes - Can I do this?

uvfch:

Hi, this feature is great. I tried installed it in my testing store which was runing with stock by attributes well. After installation, this message appear after the product description, and do not show the product attributes:

1146 Table 'lessuvco_store.TABLE_PRODUCTS_STOCK' doesn't exist
in:
[select quantity from TABLE_PRODUCTS_STOCK where products_id = '1' AND quantity > 0]

any idea on this?

Thanks.

kuroi:

I was hoping that it would turn out to be something straightforward like this ... though rather than editing a core and non-overwriteable file, it would be better to change the pad_sequenced_dropdowns.php class to select from TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK instead of TABLE_PRODUCTS_STOCK.

Your absolutely right. When I free this week I will do some clean up of the contrib and update it.

Cal

22 May 2008, 1:58 AM
#14
snakehips avatar

snakehips

New Zenner

Join Date:
Mar 2008
Posts:
2
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

Cal, you should be kissed! I can't wait to see this mod! It's been driving me beserk for the last three weeks...

2 Jun 2008, 3:14 AM
#15
vcsharpin avatar

vcsharpin

New Zenner

Join Date:
Mar 2008
Posts:
14
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

I've installed this mod and have the following error:

1146 Table 'multiplayeru.products_with_attributes_stock' doesn't exist in: [select quantity from products_with_attributes_stock where products_id='182' AND quantity > 0]

Thanks in advance!

2 Jun 2008, 7:31 AM
#16
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Dependant Attributes - Can I do this?

VCSharpin:

I've installed this mod and have the following error:

*1146 Table 'multiplayeru.products_with_attributes_stock' doesn't exist in: [select quantity from products_with_attributes_stock where products_id='182' AND quantity > 0]*It sounds as though you have a problem with your Stock by Attributes installation. Recheck that you have followed the step for installing the SQL patch.

2 Jun 2008, 10:18 AM
#17
jan51 avatar

jan51

New Zenner

Join Date:
Jul 2006
Posts:
12
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

Is the second dropdown box dependent on the first one? For example, can size small in the first drop-down box have one set of colors in the second box and size 5XL have a second set of colors? Or are the values in the second box the same regardless of what is chosen in the first box? If these are TRULY dependent dropdown boxes, I have been waiting for this for years! I haven't been able to use Zen Cart because the only workaround I've been able to live with is to use stock levels to control color choices for different sizes. I was only able to do it with some special mods I got for CubeCart. If dependent attributes are available in Zen, I will definitely switch!

2 Jun 2008, 12:32 PM
#18
vcsharpin avatar

vcsharpin

New Zenner

Join Date:
Mar 2008
Posts:
14
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

kuroi:

It sounds as though you have a problem with your Stock by Attributes installation. Recheck that you have followed the step for installing the SQL patch.

Double checked and received notification that I was doing duplicate entries on the database. In looking at the SQL, I'm not seeing anything referencing 'products_with_attributes_stock' - only the instruction to change the database_tables.php file, which I did.

Here's the link to my page if you want to see the error in action:
http://www.multiplayeru.com/index.php?main_page=product_info&cPath=66&products_id=182

Thanks in advance!

3 Jun 2008, 9:27 PM
#19
vcsharpin avatar

vcsharpin

New Zenner

Join Date:
Mar 2008
Posts:
14
Plugin Contributions:
0

Re: Dependant Attributes - Can I do this?

VCSharpin:

Double checked and received notification that I was doing duplicate entries on the database. In looking at the SQL, I'm not seeing anything referencing 'products_with_attributes_stock' - only the instruction to change the database_tables.php file, which I did.

Here's the link to my page if you want to see the error in action:
http://www.multiplayeru.com/index.php?main_page=product_info&cPath=66&products_id=182

Thanks in advance!

I still need assistance with this. I reinstalled everything, same error. I backed everything out so going to my site won't show the error any longer. If I can't get this to work I may have to change ecommerce solutions, and I really don't want to do that since I use zen for my other site.

Thanks!

3 Jun 2008, 9:37 PM
#20
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Dependant Attributes - Can I do this?

VCSharpin:

Double checked and received notification that I was doing duplicate entries on the database. In looking at the SQL, I'm not seeing anything referencing 'products_with_attributes_stock' - only the instruction to change the database_tables.php file, which I did.The products_with_attributes_stock table is inserted by the SQL for stock_by_attributes. If you can't see it in your database, that means a problem with your stock_by_attributes installation. This problem would need to be resolved before you can get any further with dependant attributes. Did you run the stock_by_attributes SQL? Did it give you any errors? Did you run it though a database management tool, phpMyAdmin or the install SQL patch function in the Admin?