Dependent Attributes

Started by draude on 24 Apr 2008, 9:18 AM · Views: 26,634

Results 21 to 40 of 62
10 Aug 2010, 10:21 PM
#21
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Dependent Attributes

Seriously, this feature has been constantly requested since 2006...
and nobody (except the 'Magento' shopping cart *Magento has many other problems that defeat the appeal of switching to their cart.) has been able to implement it.

I would pay hundreds of dollars for an easy implementation of "Dependent Dropdowns"...
'easy' means a regularly updated MOD... not an hourly Freelance developer rummaging around in the guts of my LIVE store every time there's a new ZenCart update.

sigh wishful thinking


11 Aug 2010, 12:49 AM
#22
jmacdoug avatar

jmacdoug

New Zenner

Join Date:
Jun 2007
Location:
NJ
Posts:
84
Plugin Contributions:
0

Re: Dependent Attributes

blackhalo - I feel the same. I have put about half my life into finding this solution!! Just kidding but it sure feels like it. I have found a BEAUTIFUL extension for magento that is so far, (upgrade friendly). I love ZC and it has a powerful attribute system. Many devs on here claim you can pretty do whatever you want in ZC with custom coding but I am also not excited about poking around a live site and risking failure when you update. Some devs have said to me "just don't ever run an update"!!

Anyway, take a look at my site http://www.modebook.com/get-started-here/modebook-deco/modebook-deco-square.html

Sorry but you have to register real quick!! If you want something like this I know the developer and the extension is $100. Magento is very solid although you need the best of the best servers on premium hosts to runi it fast and effecient which is why I only use simplehelix.com as there cpanel setup is second to none as well for $19.95./month with unlimited domain names.

Best

Jeff

11 Aug 2010, 5:43 AM
#23
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Re: Dependent Attributes

jmacdoug:

Magento is very solid although you need the best of the best servers on premium hosts to runi it fast and effecient which is why I only use simplehelix.com as there cpanel setup is second to none as well for $19.95./month with unlimited domain names.

That looks nice, it's clean...
interesting use of the Dependency too, changing all the swatches based on the dropdown menu.

There's no doubt Magento works good out of the box, I actually signed up with SimpleHelix last year sometimes, did a test run...
I didn't get that far though, being a one man show, I had other responsibilities (and my loooong ZenCart experience was still somewhat fresh in my mind).

Plus, with a major release of both ZenCart and osCommerce coming in the relatively near future...
I chose to just sit tight for the time being... see what comes of things.

I will say this though Jeff, considering your specific needs for ModeBook...
I don't think you'll find anything even close to that functionality in the new ZenCart, or most others...
that's waaay too custom for general features.

I'd be happy with just dependent dropdowns...
but combining dependent dropdowns with selectable color swatches...
hell, those are finishing touches, the end of the feature development cycle...
the 'cycle' these carts haven't even started yet!

That's a nice site, it's a solid vote for Magento.
Thanks for pointing it out.

:bigups:

14 Aug 2010, 3:23 PM
#24
jmacdoug avatar

jmacdoug

New Zenner

Join Date:
Jun 2007
Location:
NJ
Posts:
84
Plugin Contributions:
0

Re: Dependent Attributes

Thanks, I appreciate the compliment. It's funny, I had my site setup with ZC to begin with because I found an OUTSTANDING extension for selecting color swatches that was seamless and looked GREAT! It is located at the link below if you are interested. I had another dev claim they could produce the dependent dropdown thing for like $300 which was still ok but they dropped the ball and never got back to me so I was led to water and then the drought came.

Check the PAPS site out here www.##############################################################

It is a paid extension so beware. Notice they still have me listed as a live site www.modebook.com

If I could get dependent attributes working I would go RIGHT BACK TO ZENCART!!!!! and drop magento in a heartbeat. :hug:

Best

Jeff

14 Aug 2010, 6:44 PM
#25
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Re: Dependent Attributes

Thanks for that, interesting mod...
I've never seen it before, and I have looked for this type of stuff in the past.

Others may be interested in this advanced image mod...
this forum really doesn't like their domain name though (you'll need to change the beginning and end manually):

WWWDOT** product-attribute-pictures **DOTCOM

For posterity.

15 Feb 2011, 10:36 PM
#26
timmle avatar

timmle

New Zenner

Join Date:
Feb 2011
Posts:
2
Plugin Contributions:
0

Re: Dependent Attributes

I have been directed here by many people.

What i mean by the topic title is this;

If i was to have 3 dropdown options for the customer to choose, for instace;

Drop Down 1- Colour
-Blue
-Black
-Red
Green

Drop Down 2 - Size
-Small
-Medium
-Large
-XL

Drop Down 3 - Sleeve Length
-Short
-Long

BUT.... let's say the manufacturer doesn’t make Red, Large Shirts with Long Sleeves. So when the customer selectd Red from the first drop down i need Drop Down 2 to only display Small, Medium and XL, and Drop down 3 to only show Short Sleeves.

Hoping Zencart is capable of this.

16 Feb 2011, 11:34 AM
#27
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Dependent Attributes

Nope. Zencart doesn't support dependent attributes in the current version, and there's no mod available for that function.

18 Mar 2011, 5:39 PM
#28
gprit avatar

gprit

Zen Follower

Join Date:
Mar 2009
Posts:
176
Plugin Contributions:
0

Re: Dependent Attributes

I have the need to set up a store which will have multiple choices (not just 3-4) - probably drop down lists.
eg:
product colour front
product colour back
front logo style
back logo style
front logo colour
back logo colour
...with this option
...with that option
...with another option
...for age group xx
etc

What is the best way to do this so that it is simple to follow and easy for an end user to set up and manage?
Are there any templates around that would be a starting point?

18 Mar 2011, 6:03 PM
#29
gjh42 avatar

gjh42

Black Belt

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

Re: Dependent Attributes

The dropdowns on the product info page are not a template issue; you would use attributes for them, and they will automatically show when you create them in admin.

If by "end user" you mean a store manager adding new products, you can set up one dummy product with all the attributes for its product type, and they can copy/duplicate that each time they want to make a new product of that type and edit the name, description, pictures, etc.

18 Mar 2011, 8:06 PM
#30
gprit avatar

gprit

Zen Follower

Join Date:
Mar 2009
Posts:
176
Plugin Contributions:
0

Re: Dependent Attributes

Have set up stores with 2/3/4 options but not this many. With so many options and multiple choices, the standard attribute feature would be very unwieldy? Not sure how it would even work with multiple cascading choices of this possible number.

Additionally eg choosing logo style would mean saving earlier choices whilst displaying x number of styles on a page to choose from.

I thought an existing template along these lines might make it easier!

18 Mar 2011, 8:51 PM
#31
gjh42 avatar

gjh42

Black Belt

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

Re: Dependent Attributes

This sounds like you want what is called "dependent attributes", which is not supported in standard Zen Cart or any other general purpose cart system.

If you want one feature to appear only after another has been chosen, you will need to do some fancy custom javascript coding. There will be no template available for it in any form.

16 Apr 2011, 6:14 PM
#32
wolf111 avatar

wolf111

New Zenner

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

Re: Dependent Attributes

i dont find any mod about dependent attributes, i guess that i need to high sb to do this for me, what do i get a dependent attributes mod?

16 Apr 2011, 6:19 PM
#33
gjh42 avatar

gjh42

Black Belt

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

Re: Dependent Attributes

If you want to hire someone for this, either use oDesk, or contact one of the professionals who post regularly in the forum. You can tell something about their competency from the answers they give here.

16 Apr 2011, 7:29 PM
#34
wolf111 avatar

wolf111

New Zenner

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

Re: Dependent Attributes

i give 2 choices to the customers: A Normal card, or B Card with their own text,
if they choose A, they get a drop down attributes, if they choose B, they get some text and drop down attributes.

A. Normal card

  • drop down (blue card/white card/ pink card)

B. Card with your own text

  • text of first line (text required)
  • text of second line (text option)
  • text color (drop down)
  • background color (drop down)
  • font (radio)
    ...

do you think it difficult ? in what price range ?
is there a professional username list i could contact from zencart forum?

16 Apr 2011, 7:37 PM
#35
gjh42 avatar

gjh42

Black Belt

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

Re: Dependent Attributes

There is no list available. Just look through the forum at posters who give good advice about topics similar to yours; professionals will generally have a link to their site in their signature.

You would need some javascript for this kind of testing.

19 Apr 2011, 12:34 AM
#36
mypctechs avatar

mypctechs

New Zenner

Join Date:
Aug 2009
Location:
Phoenix, Arizona
Posts:
6
Plugin Contributions:
0

Re: Dependent Attributes

Hey Wolf111, I am in the same boat as you right now. I have a drop-down with 5 items and, when one is selected, I need to modify the contents of a group of checkboxes.

After searching the internet I found one reference to 'this feature coming soon in a future version of Zen-Cart', could that be version 2.0?

Anyways - This looks like something I will need to custom code for my client. If I find out anything useful along the way I will let you know.


Andre Morris
seenBEST Web Design

19 Apr 2011, 2:06 AM
#37
mypctechs avatar

mypctechs

New Zenner

Join Date:
Aug 2009
Location:
Phoenix, Arizona
Posts:
6
Plugin Contributions:
0

Re: Dependent Attributes

Wolf111, I've decided to write up a quick solution (in my case) to handle this issue. My scenario involves a drop down box which, when different elements have been selected, will show or hide checkboxes from another attributes group.

This is by no means meant to be a solution that will work for everyone, but it should help you with direction on creating similar functionality for your store. Honestly my solution is very basic at this point, but works for ME. If you can setup your main attribute as a drop down box, then use checkboxes for the sub-attributes, and those checkboxes are not using images this will work :shocking:...

STEP #1:
includes/modules/attributes.php contains code to draw checkboxes. There are 3 blocks of code that I needed to modify under case '0':, case '1':, and case '2': The first thing to do is wrap a DIV around each checkbox so I can later find them with JavaScript. The base code for case 0 is similar to this:

$tmp_checkbox .= zen_draw_checkbox_field('id[' . $products_options_names->fields['products_options_id'] . ']['.$products_options_value_id.']', $products_options_value_id, $selected_attribute, 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '"') . '<label class="attribsCheckbox" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . $products_options_details . '</label><br />' . "\n";

Wrap a DIV around case0, case1, and case2. Also put an ID to the DIV and get rid of the unnecessary BR like this:

$tmp_checkbox .= '<div id="div-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . zen_draw_checkbox_field('id[' . $products_options_names->fields['products_options_id'] . ']['.$products_options_value_id.']', $products_options_value_id, $selected_attribute, 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '"') . '<label class="attribsCheckbox" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . $products_options_details . '</label></div>' . "\n";

STEP 2:
The next thing you'll need to do is drop a javascript code hook into your drop-down box. attributes.php draws the drop downs, and the code looks something like this:

                  
$options_menu[] = zen_draw_pull_down_menu('id[' . $products_options_names->fields['products_options_id'] . ']', $products_options_array, $selected_attribute, 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '"') . "\n";

You want to change that code to insert JavaScript that calls a function whenever the drop down changes. We use the onchange event.

                  $options_menu[] = zen_draw_pull_down_menu('id[' . $products_options_names->fields['products_options_id'] . ']', $products_options_array, $selected_attribute, 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '" onchange="setOptions(\'attrib-' . $products_options_names->fields['products_options_id'] . '\');"') . "\n";

STEP 3:
Now you'll need to drop a JavaScript script into the header of your site. This checks to see if the drop-down box ID matches the ID of your actionable drop-down, and if it does goes about hiding the DIVS you've selected. In my case, I already know that the ID of the drop-down is attrib-1. So, the base JavaScript in the head of the site looks something like this...

<script type="text/javascript">
function setOptions(chosen) {
    if (chosen == "attrib-1") {
		alert('yes');
    }
}
</script>

STEP 4:
Test! If it works, you'll get a pop up box when you change the drop-down box. You shouldn't get a pop up box anywhere else than the drop down that you want to use to hide the checkboxes.

STEP 5:
Now you'll need to write your JavaScript. I can't provide a good example for your site since it depends on the attrib-# ID of your drop-down box and also depends on the div-# ID of your checkboxes. I'll give you an example of what my new JavaScript header code looks like for my site.

<script type="text/javascript">
function setOptions(chosen) {
    if (chosen == "attrib-1") {
		var index = document.getElementById("attrib-1").selectedIndex;
		if (document.getElementById("attrib-1").options[index].text == 'Red') {
			document.getElementById('div-9-59').style.display = "none";
			document.getElementById('div-9-60').style.display = "none";
			document.getElementById('div-9-61').style.display = "none";
			document.getElementById('div-9-62').style.display = "none";
			document.getElementById('div-9-55').style.display = "block";
			document.getElementById('div-9-56').style.display = "block";
			document.getElementById('div-9-57').style.display = "block";
			document.getElementById('div-9-58').style.display = "block";
		}
		else {
			document.getElementById('div-9-55').style.display = "none";
			document.getElementById('div-9-56').style.display = "none";
			document.getElementById('div-9-57').style.display = "none";
			document.getElementById('div-9-58').style.display = "none";
			document.getElementById('div-9-59').style.display = "block";
			document.getElementById('div-9-60').style.display = "block";
			document.getElementById('div-9-61').style.display = "block";
			document.getElementById('div-9-62').style.display = "block";
	}
	    }

}
</script>

This should get you started.. Let me know if you need any help!


Andre Morris
seenBEST Web Design

19 Apr 2011, 3:22 AM
#38
gjh42 avatar

gjh42

Black Belt

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

Re: Dependent Attributes

Thanks for posting this! It should be a big help for those who are barely js-literate but understand code (like me:). I can see using this to improve the functionality of some of my stone-set jewelry pieces.

23 May 2011, 10:30 PM
#39
quick1 avatar

quick1

New Zenner

Join Date:
Oct 2009
Posts:
32
Plugin Contributions:
0

Re: Dependent Attributes

this js is nice, but there's one issue,

if you select one option from the dropdown attrib-1, it works correct
if you add the product to cart, then click the product link from the cart and back to the product page, it shows all hidden options, only after you select the attrib-1 dropdown option again, those options would be hidden according to the js code

any ideas to fix this issue?

14 Jun 2011, 6:46 PM
#40
enjoiracin avatar

enjoiracin

New Zenner

Join Date:
Jun 2011
Posts:
13
Plugin Contributions:
0

Re: Dependent Attributes

I was wondering if there is any way to do the following:

Say I have a product that is available as a single item and also is available to choose as a combination.
So a customer would choose either if they would like the single item (Priced $10.00) or if they want to make it a combo (Priced $20.00).
If they select the single item they can just go ahead and add the item to the cart.
If they select the combo option the customer then chooses from what other item they want (from a drop down window) with their product to make it the combo.
After selecting the product combination they can then add it to the cart.

I know this is a bit confusing and complicated but I was really hoping there is some way this can be done.

I tried to search for something like this but had no luck...