-2

enter image description here

I have this situation, when showing diferent models that are duplicated. My question is if there is a solution in jquery that if I had Iphone 4 white and Iphone 4 black, this can be merge into other product Iphone 4, and when click this one, it shows the 2 variants, like a "see more" button situation.

Because I will have more brands than Iphone, this can be done like taking the 2 first words like the product and the rest are the variant of it.

I don't want exactly the solution of course but if it can be done.

Thanks.

amibumping
  • 245
  • 1
  • 2
  • 13

1 Answers1

1

You can do it if you look at the user agent strings. This is the roadmap to the solution:

  1. Check the user agent strings of the devices you are using. You can do that by creating a test page where the user agent string of the device you are using is displayed.

  2. Visit that test page with all interesting devices.

  3. See how the user agent strings are varied. Plan your algorithm.

  4. Remove the test page.

  5. Implement your algorithm either in server-side or on client-side. I generally prefer server-side though.

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175