Author Topic: Product options on product details page  (Read 2560 times)

Anni

  • Full Member
  • ***
  • Posts: 96
    • View Profile
Product options on product details page
« on: January 22, 2008, 07:59:23 AM »
hi everyone,

I've noticed that product options are displayed in a random manner on the details page, e.g. at one time the order for a color option is red-green-blue, another time it's blue-red-green. so always a different option is pre-selected when you view the product details.

is there a way to sort them or can't that be changed?

regards,

anni

julie

  • Administrator
  • Hero Member
  • *****
  • Posts: 408
    • View Profile
    • KonaKart
Re: Product options on product details page
« Reply #1 on: January 22, 2008, 08:39:21 AM »
Hi,

In the current version they should be ordered by id. If you want to order them diffferently you could do this in the Action Class . They are contained in the selectedProductOptions list of the ProductMgr.

-Julie

Anni

  • Full Member
  • ***
  • Posts: 96
    • View Profile
Re: Product options on product details page
« Reply #2 on: January 22, 2008, 08:49:01 AM »
thanks for the answer :)

just one more question. the action class to modify would be the ShowProductDetailsAction, is that correct?

regards,

anni

julie

  • Administrator
  • Hero Member
  • *****
  • Posts: 408
    • View Profile
    • KonaKart
Re: Product options on product details page
« Reply #3 on: January 22, 2008, 08:52:03 AM »
Yes, that's correct.

Anni

  • Full Member
  • ***
  • Posts: 96
    • View Profile
Re: Product options on product details page
« Reply #4 on: January 22, 2008, 11:12:06 AM »
ok, thanks.

btw. you are correct that the options are sorted by their id but not the option values. I just printed the product options to the console  to get the ids and see the current sort order and got this:

Code: [Select]
* Run: 0 Opt id: 1 Opt name: subscrtiption Opt value: Start with next issue Opt value id: 2
* Run: 1 Opt id: 1 Opt name: subscrtiption Opt value: Start with current issue Opt value id: 1
* Run: 2 Opt id: 2 Opt name: Discount Opt value: Friend of IMMA Opt value id: 7
* Run: 3 Opt id: 2 Opt name: Discount Opt value: VAI member Opt value id: 5
* Run: 4 Opt id: 2 Opt name: Discount Opt value: Friend of RHA Opt value id: 8
* Run: 5 Opt id: 2 Opt name: Discount Opt value: Student Opt value id: 6
* Run: 6 Opt id: 2 Opt name: Discount Opt value: n/a Opt value id: 3

earlier, the option values for option 1 were just the other way round.  ???

regards,

anni