R: Webshop grid on JSClient

Andrea Zen a.zen at athesiavr.it
Fri Oct 23 04:40:57 EDT 2020


Hello, Omnis support gave me a workaround solution, here it is:
------------------
All you need is a list that contains the picture in different columns. So for example if you want to display 4 columns you would need to formulate the SQL in a way that returns the result set into 4 columns. Then you can have 4 picture objects in your complex grid.

Here is example SQL that demonstrates such a SQL using a simple person server table but I am sure it will work with picture columns too:

SELECT
persons.person_id,
     persons.person_name as name1,
     persons2.person_name as name2,
     persons3.person_name as name3,
     persons4.person_name as name4,

mod(persons4.person_id,4)
FROM
     public.persons,
     public.persons AS persons3,
     public.persons AS persons2,
     public.persons AS persons4
WHERE
     persons2.person_id=persons.person_id+1
     AND persons3.person_id=persons.person_id+2
     AND persons4.person_id=persons.person_id+3
AND mod(persons4.person_id,4)=0
order by persons.person_id

Note, the person_id must be in a consecutive order and none of the values should be missing. Otherwise it won't work.

So that way you will receive a 4 column list for the persons name.
------------------

Andrea Zen

Da: Andrea Zen
Inviato: giovedì 22 ottobre 2020 10:19
A: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Oggetto: Webshop grid on JSClient

Hello, I have to develop a kind of webshop app for one of our customers.
Their request is to see the list of items as a NxM grid of pictures...similar to what you see on Amazon when you check your wishlist in grid mode.
It seems there isn't a built-in JS component suitable for that...the complex grid seems the more flexible one but it works on a 1 line/1 row basis so it's no good.

Any idea how to solve? Maybe an external (possibly free) third party Javascript component?

Andrea Zen



More information about the omnisdev-en mailing list