top of page

Filter my Phones

CLOSE.png

Filter

Find

Best-Price

12345

CODE
DATABASE

DATABASE

CLOSE.png
001.png

CODE

CLOSE.png

import wixData from 'wix-data';


 

$w.onReady(function () {

    

    $w('#STAG1').onChange(()=>{

        let selectedTags = $w("#STAG1").value

        hide_all_Stags()

        console.log(selectedTags)

        console.log(selectedTags.length)

        

        for (var i = 0; i < selectedTags.length; i++) {

            console.log(i)

            if (selectedTags[i] === "Sony")         {$w("#selectionTags2").show(), console.log("Sony found in the Array")} else {$w("#selectionTags2").hide()}

            

            if (selectedTags[i] === "Samsung")      {$w("#selectionTags3").show(), console.log("Samsung found in the Array")} else {$w("#selectionTags3").hide()}

            if (selectedTags[i] === "LG")           {$w("#selectionTags4").show(), console.log("LG found in the Array")} else {$w("#selectionTags4").hide()}

            console.log(selectedTags[i])

        //.......

        //.......

        //.......

        //.......

        //.......

        //.......

        }

    })

})


 

function hide_all_Stags (parameter) {

    console.log("All tag-menus hided")

    {$w("#selectionTags2").hide;}

    {$w("#selectionTags3").hide;}

    {$w("#selectionTags4").hide;}

}

 

export function dropdown1_change(event) {$w('#BTNfind').label = "Find" + $w('#dropdown1').value}

export function BTNfind_click(event) {start_FilterProzess($w('#dropdown1').value)}


 

export function STAG1_change(event) {

    let selectedTags = $w("#STAG1").value

    console.log(selectedTags)

    let filter = wixData.filter();

    if (selectedTags) {

        filter = filter.hasSome("tags", selectedTags);

        console.log(selectedTags.length)

    }

    $w('#dataset1').setFilter(filter);

}

 

function start_FilterProzess (VALUE) {

 

    // FIRST-PROCESS to FIND ----> "Best-Price"

    if (VALUE === "Best Price"){console.log("Best-Price Search-Process activated !")

        $w("#dataset1").onReady( () => {

            $w("#dataset1").getItems(0, $w("#dataset1").getTotalCount())

            .then( (result) => {

                let items = result.items;

                let totalCount = result.totalCount;

                console.log (items)

                console.log(totalCount)

 

                let bestPrice = 1000

                for (var i = 0; i < totalCount; i++) {

                    if (items[i].price < bestPrice) {bestPrice=items[i].price}

                }

                console.log("bestPrice = " + bestPrice)

                $w('#GRPbestprice').show("FadeIn")

                $w('#TXTprice').text = bestPrice.toString()

            } )

            .catch( (err) => {

                let errMsg = err.message;

                let errCode = err.code;

            } );

        } );

    }

 

    // SECOND-PROCESS to FIND ----> "Newest-Model"

 

    if (VALUE === "Newest Model"){console.log("Newest-Model Search-Process activated !")}

}

google-pixel-4-7-600x460.jpg

Motorola

Memory

128GB

Processor

Price

199.99

GO
google-pixel-4-7-600x460.jpg

Sony

Memory

128GB

Processor

Price

249.99

GO
google-pixel-4-7-600x460.jpg

Google

Pixel-4

Memory

64GB

Processor

Price

555

GO
google-pixel-4-7-600x460.jpg

HTC

Memory

128GB

Processor

Price

329.99

GO
google-pixel-4-7-600x460.jpg

LG

G7-ThinQ

Memory

512GB

Processor

Price

333

GO
google-pixel-4-7-600x460.jpg

Huawai

Memory

64GB

Processor

Price

289.99

GO
google-pixel-4-7-600x460.jpg

Xiaomi


PNGWave
Xiaomi Mi 8 4G

Memory

256GB

Processor

Snap-Dragon

Price

222

GO
google-pixel-4-7-600x460.jpg

Apple

Memory

128GB

Processor

Price

650

GO
google-pixel-4-7-600x460.jpg

Ericsson

Memory

256GB

Processor

Price

249.99

GO
google-pixel-4-7-600x460.jpg

Nokia

Memory

64GB

Processor

Price

189.99

GO
google-pixel-4-7-600x460.jpg

Samsung

S8

Memory

64GB

Processor

Exynoss-8895

Price

399

GO

Comment-Box

CLOSE.png

Version-1.0

Under_Construction.png

Leave a comment. . .

Arrow.png

General-Settings

ON                 OFF

Show Text-Length

ON                 OFF

max. Text-Length

ON                 OFF

Show Key-Press

ON                 OFF

Show Key-Code

ON                 OFF

Show Total-Count

Character-limit

Load default settings
Save
lestherg-esilverconnect 2:52:59 AM
8/20/2022
s18376 1:07:58 AM

asdas

1/20/2022
s18376 1:03:31 AM

asdas

1/20/2022
arthurvalatin 00:15:21

he he heeeeeeeeeee!

30/12/2020
arthurvalatin 00:15:03

undefinedha ha haaaaaaaaaaa!undefined

30/12/2020
arthurvalatin 00:14:48

My little joke!

30/12/2020
arthurvalatin 00:14:14

really real

30/12/2020
o0oelys 17:55:55

real

23/09/2020
russian-dima 18:49:20

123231

2.9.2020
russian-dima 18:49:17

213213

2.9.2020
russian-dima 17:56:10

123123123

2.9.2020
russian-dima 18:48:04
31.8.2020
russian-dima 18:46:47
31.8.2020
russian-dima 18:46:10

Here you can see my link to googhttp://www.google.de target=_self>www.google.dele.......

31.8.2020
russian-dima 18:45:34

Here you can see a LINK ---> myLinktoGoogle

31.8.2020
russian-dima 14:19:38

rrrrrrrrrr

31.8.2020
russian-dima 14:18:28

qeeeqweqweqwe

31.8.2020
russian-dima 14:01:12

awddawdawd

31.8.2020
russian-dima 13:58:53

23123213

31.8.2020
juanfelipeamt 7:46:31 PM

I tried to change my picture. :)

8/25/2020
juanfelipeamt 7:43:57 PM

Hellooooo

8/25/2020
mr-money-man 13:41:23

As you can see, i changed my PIC (of the test-user --> mr-money-man)

25.8.2020
mr-money-man 13:40:45

Hello!

25.8.2020
russian-dima 18:59:25

You are still not a member of my site? So it is time to change it xDDDDDD

24.8.2020
russian-dima 18:58:02

If you want to write a comment, than you have first to log-in!

24.8.2020
russian-dima 17:58:34

New logo? ^^

22.8.2020
russian-dima 17:58:16

You again xD

22.8.2020
arthurvalatin 16:19:33

Hi

21/08/2020
mr-money-man 00:30:40

As you can see in this version, i tried to implement more functions. You will fi
nd the first ones, when you go into sthe OPTIONS-MENU.

8.8.2020
mr-money-man 00:29:32

It is much more comfortable. ^^

8.8.2020
Page 1 of 2
Design
Settings
About
CLOSE.png
Leave a comment, or start a chat.

Post-Comment

- - -

Pressed-Key

- - -

Key-Code

Text-Length

- - -

max. Text-Length

- - -

Number of Comments

- - -

designed & developed by russian-dima

Write a comment
bottom of page