|
Posted by Mark on 09/15/05 18:55
Can someone please help me with the below script? I think it's nearly
correct but there's just something not quite right which won't let it
run.
Thanks in anticipation.
Mark
________________________________________________________________
switch (article_get_field('style')) {
case 'Short':
switch (article_get_field('size')) {
case 'M':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC11M');
break;
case 'L':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC11L');
break;
case 'XL':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC11XL');
break;
case 'XXL':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC11XXL');
break;
break;
case 'Medium':
switch (article_get_field('size')) {
case 'M':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC10M');
break;
case 'L':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC10L');
break;
case 'XL':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC10XL');
break;
case 'XXL':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC10XXL');
break;
break;
case 'Long':
switch (article_get_field('size')) {
case 'M':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC1M');
break;
case 'L':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC1L');
break;
case 'XL':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC1XL');
break;
case 'XXL':
article_set_field('price', 0.00);
article_set_field('item_number', 'HC1XXL');
break;
break;
}
Navigation:
[Reply to this message]
|