changing the sort of product attrbutes

ludwig

No avatar

2005-05-31 13:39

Hello: for my contactlense-shop I need a list for the dioptrien-choice from
-0,25 to +10,00. I tried with product attribute, but it sort -10,00 behind the -1,x and not behind -9,75 and the+2 to -2 and not behind +1,75. Do you know a solution to sort it correct?

wizzud

No avatar

2005-05-31 18:39

Unfortunately no, not at the moment.
The quickest solution I can think of is to prefix your options with a letter so that your attributes become, for example,

A -0,25
B 0,00
C +0,25
D +0,50
E +0,75
F +1,00

etc, or

a) -0,25
b) 0,00
c) +0,25
d) +0,50
e) +0,75
f) +1,00

wizzud

No avatar

2005-05-31 18:40

I haven't tried the second one so no guarantees it will work!

ludwig

No avatar

2005-05-31 19:51

Thanx for your tipps.
I have changed from , to .
So I can list from -10 to +10 in a correct order. with komma it doesn't work.
Ok better I could list from -0.25 to +10 , maybe in later versions but for the moment it's alright.

ludwig

No avatar

2005-06-07 16:52

hello wizzud,
I have notice today another problem with my numbers as attribute.
If I choose maybe dioptre -1 it discount 1 from the price. If I choose +5 it sum 5 to the price. But the price must be for all the same. On the next page where the adressform comes the price change again and is there ok. Can you help?

ludwig

No avatar

2005-06-15 11:21

If I want to list the numbers 10° to 180° or SPH 10 to SPH 180 it
will sort the 180 behind the 10 and not behind 170. It just works when you take only 10 til 180 without letters. So the work with parameters is not so good.
Maybe I-m nerving a little bit and my english is not so good,
Allow me a last question. Can I await for better parameter-sort in a future version of product attibutes?

wizzud

No avatar

2005-06-15 17:09

You could try packing the number with leading spaces to make it up to 3 characters.
eg.
SPH<space><space>10
SPH<space>180
SPH<space>170
SPH<space>space><space>1

results in
SPH 1
SPH 10
SPH 170
SPH 180

A 'better' parameter sort depends on the requirements of each individual person, and would require a custom-built sort function since the native PHP functions obviously fall short of expectations. So don't hold your breath!

ludwig

No avatar

2005-06-15 22:12

cool: the space"trick" works. I can sort all my parameters like I want. And I learned a new english idiom :-)

One little wish for later versions: At this time it appears only the attributes in the basket. It would be fine when the group appears too:

Like this example: Color:blue, size:L

Back to top
about us | contact