Skip to content

Commit

Permalink
new search functionality for next version
Browse files Browse the repository at this point in the history
  • Loading branch information
KenWilliamson committed Aug 7, 2022
1 parent 29c5d01 commit 1f99727
Show file tree
Hide file tree
Showing 17 changed files with 2,520 additions and 1,732 deletions.
2 changes: 1 addition & 1 deletion contentsrv/testFiles/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"index","title":"the best book ever","subject":"","author":"ken","createDate":"2022-08-04T15:44:41.829288863-04:00","modifiedDate":"0001-01-01T00:00:00Z","hits":0,"metaAuthorName":"ken","metaDesc":"shopping cart index","metaKeyWords":"","metaRobotKeyWords":"","text":"c29tZSBib29rIHRleHQ=","TextHTML":"","archived":false,"visible":true,"UseModifiedDate":false,"blogPost":false}
{"name":"index","title":"the best book ever","subject":"","author":"ken","createDate":"2022-08-07T15:06:08.566221075-04:00","modifiedDate":"0001-01-01T00:00:00Z","hits":0,"metaAuthorName":"ken","metaDesc":"shopping cart index","metaKeyWords":"","metaRobotKeyWords":"","text":"c29tZSBib29rIHRleHQ=","TextHTML":"","archived":false,"visible":true,"UseModifiedDate":false,"blogPost":false}
2 changes: 1 addition & 1 deletion contentsrv/testFiles/product.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"product","title":"the best book ever","subject":"","author":"ken","createDate":"2022-08-04T15:44:41.847409097-04:00","modifiedDate":"0001-01-01T00:00:00Z","hits":0,"metaAuthorName":"ken","metaDesc":"shopping cart index","metaKeyWords":"","metaRobotKeyWords":"","text":"c29tZSBib29rIHRleHQ=","TextHTML":"","archived":false,"visible":true,"UseModifiedDate":false,"blogPost":false}
{"name":"product","title":"the best book ever","subject":"","author":"ken","createDate":"2022-08-07T15:06:08.638907355-04:00","modifiedDate":"0001-01-01T00:00:00Z","hits":0,"metaAuthorName":"ken","metaDesc":"shopping cart index","metaKeyWords":"","metaRobotKeyWords":"","text":"c29tZSBib29rIHRleHQ=","TextHTML":"","archived":false,"visible":true,"UseModifiedDate":false,"blogPost":false}
2 changes: 1 addition & 1 deletion contentsrv/testFiles/productList.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"productList","title":"the best book ever","subject":"","author":"ken","createDate":"2022-08-04T15:44:41.833786584-04:00","modifiedDate":"0001-01-01T00:00:00Z","hits":0,"metaAuthorName":"ken","metaDesc":"shopping cart index","metaKeyWords":"","metaRobotKeyWords":"","text":"c29tZSBib29rIHRleHQ=","TextHTML":"","archived":false,"visible":true,"UseModifiedDate":false,"blogPost":false}
{"name":"productList","title":"the best book ever","subject":"","author":"ken","createDate":"2022-08-07T15:06:08.569997862-04:00","modifiedDate":"0001-01-01T00:00:00Z","hits":0,"metaAuthorName":"ken","metaDesc":"shopping cart index","metaKeyWords":"","metaRobotKeyWords":"","text":"c29tZSBib29rIHRleHQ=","TextHTML":"","archived":false,"visible":true,"UseModifiedDate":false,"blogPost":false}
2 changes: 1 addition & 1 deletion data/templateStore/darkmodern.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"darkmodern","active":true,"screenShot":""}
{"name":"darkmodern","active":false,"screenShot":""}
2 changes: 1 addition & 1 deletion data/templateStore/modern.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"modern","active":false,"screenShot":""}
{"name":"modern","active":true,"screenShot":""}
2,986 changes: 1,493 additions & 1,493 deletions handlers/coverage.out

Large diffs are not rendered by default.

14 changes: 2 additions & 12 deletions handlers/customerProductHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package handlers

import (
"container/list"
"fmt"
"net/http"
"strconv"
"strings"
Expand Down Expand Up @@ -464,24 +463,15 @@ func (h *Six910Handler) ProductSearchByDescAttributes(w http.ResponseWriter, r *
var acsplstart int64
var acsplend int64

fmt.Println("Search: ", csrplsearch)
fmt.Println("Gender: ", gender)
//fmt.Println("Search: ", csrplsearch)
//fmt.Println("Gender: ", gender)

if csrplsearch == "" {
acsplvars := mux.Vars(r)
csrplsearch = acsplvars["search"]
acsplststr := acsplvars["start"]
acsplendstr := acsplvars["end"]

// color = acsplvars["color"]
// size = acsplvars["size"]
// gender = acsplvars["gender"]

//add addition params for gender color and size
//and do productSearch to temp product list and remove products that
//don't meet new parameters like : male size 12, color black
//assign new product list to sppl

acsplstart, _ = strconv.ParseInt(acsplststr, 10, 64)
acsplend, _ = strconv.ParseInt(acsplendstr, 10, 64)
}
Expand Down
8 changes: 4 additions & 4 deletions handlers/testsitemap/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<urlset xmlns="http://www.google.com/schemas/sitemap/0.9">
<url>
<loc>http://www.six910.com</loc>
<lastmod>2022-08-04</lastmod>
<lastmod>2022-08-07</lastmod>
<changefreq>daily</changefreq>
<priority>1</priority>
</url>
<url>
<loc>http://www.six910.com/viewProduct/5</loc>
<lastmod>2022-08-04</lastmod>
<lastmod>2022-08-07</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.six910.com/viewProduct/53</loc>
<lastmod>2022-08-04</lastmod>
<lastmod>2022-08-07</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.six910.com/viewProduct/55</loc>
<lastmod>2022-08-04</lastmod>
<lastmod>2022-08-07</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
Expand Down
Loading

0 comments on commit 1f99727

Please sign in to comment.