[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • Last Modified:

Zencart product attributes (OSCommerce Spinoff)

Hi guys,

I'm running up against a mean deadline with this website:

and I'm looking for some help with using zencart's product attributes (these may be the same as OSCommerce product attributes).

This company is a manufacturing company who produces its products in a variaty of colors, sized, materials, thicknesses etc. and so getting the attributes right can be tricky.

What I can't figure out is how I would set up this product:
"SandellĀ®'s pre-formed corners are available in: stainless steel - 26g, 28g; copper - 10oz, 12oz, 16oz, and 20oz"

What I need is something like a dropdown saying "What material" where you can choose either Stainless Steel or Copper.
Then after you select a material, you are only able to select the options that pertain to that specific material. Ex, if you choose stainless steel, you can only choose 26g, or 28g (10oz, 12oz, 16oz, and 20oz are not selectable), if you choose copper you can only choose 10oz, 12oz, 16oz, and 20oz (26g and 28g are not selectable).

Here is the new product page:
  • 3
1 Solution
You haven't posted whether the select values have to be pulled from the database. Otherwise a single dropdown is adequate.

  <select name="material" id="material">
    <option value="null" selected="selected">-- What Material ? --</option>
    <option value="null">-- Stainless Steel --</option>
    <option value="ss-26">26g</option>
    <option value="ss-28">28g</option>
    <option value="null">-- Copper --</option>
    <option value="cu-10">10oz</option>
    <option value="cu-12">12oz</option>
    <option value="cu-16">16oz</option>
    <option value="cu20">20oz</option>

Javascript or server-side validation can check for 'null' value and return a warning to the user; else a switch:case can be used to redirect to the appropriate product detail page. If the latter is true - then the selected value can be concatenated to a redirected product detail URL.
blacksixAuthor Commented:
Yes the values have to be pulled from a database. I could do this easily if I had the option of writing the code myself, I'm pretty good with PHP etc., but I'm using the attributes manager built into zencart. Can this be done? Just looking for someone with zencart specific experience on this one (that's why its an easy question worth 500 pts, zencart is not exactly mainstream, but close).
blacksixAuthor Commented:
Thank you for the response though.
blacksixAuthor Commented:
Seems I have found the answer:

This has been referred to as "dependant attributes" in zencart.


It is not possible out of the box, but can be done with some modification to zencart as described in the post above.
Closed, 500 points refunded.
The Experts Exchange
Community Support Moderator of all Ages

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now