---
title: "Open-cart: How to relate product options (like size and color)?"  
description: "Open-cart: How to relate product options (like size and color)?"  
author: "marcel ethan"  
published: 2013-06-06  
updated: 2013-06-06  
canonical: https://www.mindstick.com/forum/997/open-cart-how-to-relate-product-options-like-size-and-color  
category: "php"  
tags: ["php"]  
reading_time: 2 minutes  

---

# Open-cart: How to relate product options (like size and color)?

Hi [Developers](https://www.mindstick.com/articles/12875/blunders-you-must-avoid-while-hiring-java-developers-to-get-the-best-fulfilling-your-needs),\
I'm using opencart [version](https://www.mindstick.com/articles/12845/things-to-remember-while-migrating-odoo-to-a-better-version) 1.5.5.1 for our website. I need to add more than one [option](https://www.mindstick.com/forum/159391/jquery-get-selected-option-from-dropdown) for products. For example: I need to show shirts of sizes- [Large](https://www.mindstick.com/interview/34471/what-is-a-large-language-model-llm)/Medium/Small and [colors](https://answers.mindstick.com/qa/31019/should-i-paint-my-interior-with-neutral-or-bright-colors) White/[Black](https://yourviews.mindstick.com/view/83102/badi-elaichi-black-cardamom-health-benefits)/Blue/Red/[Green](https://www.mindstick.com/articles/95829/think-green-sustainable-design-considerations-for-commercial-buildings) etc. By [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) opencart allows us to add separate quantities for each [color](https://www.mindstick.com/articles/77/how-to-split-form-background-color-in-c-sharp) and size.\
How can I mention that we've 5 Large Shirts of Blue Color, 3 Medium Shirts of White Color etc. ?\
Please help. Thanks in [Advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)!

## Replies

### Reply by AVADHESH PATEL

Hi Marcel,\
I guess this would only be possible if You create an options for size x color combinations only. Customer then would have to pick the desired size and color in one option, like:\
**S, black (+ $0.00) - 3 pieces****S, green (+ $0.00) - 1 piece****M, black (+ $0.00) - 7 pieces****M, red (+ $0.00) - 11 pieces****M, blue (+ $0.00) - 2 pieces****L, black (+ $0.00) - 1 pieces****L, black (+ $0.00) - 2 pieces****XL, pink (+ $0.00) - 200 pieces**\
I believe this could be hard to maintain but it would much easier and cheaper than implementing such a dependency into **OpenCart**. But it is a nice idea to think about (maybe Daniel Kerr should more than us...).\
I hope it helpful for you. \


---

Original Source: https://www.mindstick.com/forum/997/open-cart-how-to-relate-product-options-like-size-and-color

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
