View Single Post
  #1  
Old 03-16-2003, 06:32 PM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default Idea for Size/Color listing?

Hi folks.
My company deals in clothings. The challenge they posted to me is this.

They have a product AA-000112, with 6 different colors, 7 sizes. Each of these color/size combo have different amount of stock available. For easier stocktaking, instead of using option fields for color and size, I'm set on the task of coming up with a possible stock tracking solution, using THE SAME PRODUCT CODE, as we dont't want customers to see 6X7=42 different links of basically the same item.

I have an idea, but while I'm implementing it, if any of you have any inputs or recommendation, I'd be more than glad to hear it.

-using Param field, set it as text, seperating option fields with dash and equals and comma.
ex. red-xs=5, red-l=0, blue-s=9, blue-xl=3

-pseudocode for product_display.tpl

if {paramXX ne ""}
store paramXX field into $temp array
{section name=option loop={$temp}
{if $temp.option after "=" ne 0}
put non zero index into array
{$temp.option|truncate:left stuff}
<option>{$temp.option|truncate:before dash}<option>
{/if}
{/section}
{section}
Do the same for $temp.option, truncate after dash
{/section}
{/if}

Once users hit the submit button, another code will cut out the digit after "=" and subtract by how many the users selected, it will then add up all available stocks in the param and update to the SQL database AVAIL field.

Forgot to add that when users select the products, it'll run through the check for low avail limit and stock over-selection.

...or am I over my head with that idea? TIA everyone!
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote