| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Idea for Size/Color listing? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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 |
|||||||
#2
|
|||||||
|
|||||||
![]() 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 ![]() |
|||||||
|
|||
X-Cart forums © 2001-2020
|