Inventory Control Issues

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MadneM
Forum Newbie
Posts: 4
Joined: Wed Mar 02, 2005 4:02 am

Inventory Control Issues

Post by MadneM »

Hey guys I have literally tried everything that i can think of so you are my last hope.

I am making a new ecommerce script, this time with Stock control, what i ideally want to be able to do is have:

product A and product B

product A is a small white tshirt and product B is a medium white tshirt

i also have product C and product D

product C is a small blue tshirt and product D is a Medium blue tshirt.

I want to be able to select any combination of colours and sizes (as above)


so far I have it set so product A is the only product that shows up in my list of tshirts and i want to be able to pick my colour and then my size using drop down boxes or textboxes, however i choose.

so imagine i choose a blue tshirt and i want it in medium so when i add it to my cart it puts in product D

or i could choose i want a white tshirt that is a medium and it would put product B into my cart.

I hope you are all following, can anybody think of a way i can do this, in php?

Any help would b greatlyfully appreciated, my head is stuck (dont u hate it when that happens)

Thanks alot

MadneM
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

break up your infoin separate tables and select and combine them as needed. for e.g.
size info in one table -> small, medium, large etc.
colour info in another table -> red, green blue etc.
type info in third table -> t-shirt, shirt, pant, trousers etc.

and then you could fetch the available combinations and allow them to choose any of them.
Simple ;)
MadneM
Forum Newbie
Posts: 4
Joined: Wed Mar 02, 2005 4:02 am

Post by MadneM »

Sorry i dont follow, how will this help me select different options and come up with the 1 correct product?
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

I wrote:break up your info in separate tables and select and combine them as needed. for e.g.
size info in one table -> small, medium, large etc.
colour info in another table -> red, green blue etc.
type info in third table -> t-shirt, shirt, pant, trousers etc.

and then you could fetch the available combinations and allow them to choose any of them.
Simple ;)
See, you will put all the different info in separate table then when you display it as such
Type : | options : T-Shirt , Shirt , Pant, Trouser |
Size : | options : small , medium , large , extremely-large |
Color : | options : Red , Blue , Yellow , Green , White |
and customer chooses
Type : T-Shirt
Size : small
Color : white
So you know product A has been ordered
if the size had been medium then it would be Product B and so on..
I hope I made myself clearer now ;)
MadneM
Forum Newbie
Posts: 4
Joined: Wed Mar 02, 2005 4:02 am

Post by MadneM »

no, you really have not understood what i have asked for but No worries i'v got it sorted now, anybody got the same problem u can contact me at ross@madnem.com
Post Reply