Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Idea for Size/Color listing?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #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
  #2  
Old 03-16-2003, 10:35 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

a lot of coding changes plus some less obvious things.
eg:

Make sure that you put these fields into product_modify.tpl as each time you modify a product these fields are overwritten with the content of that template. Normally when you add extra field these are brought into the product modify template automatically but if you shortcut the product options calculations side (as you are planning) you will need to do this workaround.

Intersting challenge though.
__________________
ex x-cart guru
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:32 AM.

   

 
X-Cart forums © 2001-2020