Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 02-08-2017 15:43:36

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Product Sort order

Question on the Product Sort Order for default displays within a category.
If product A has a value of 1 and product B has a value of 0 shouldn't product B display before Product A? Apologies if that sounds like a an 8th grade math problem. I am doing this and still have product A listed before B.

Also assuming this is how I get the display to work. What would be the sql command to change all the values of a product within a category to a value of 0/1?

Thanks

Offline

 

#2 02-08-2017 19:36:24

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Product Sort order

Yes, 0 before 1.  No stupid questions, only stupid answers.  I imagine you've selected to sort by name or price in your product listings.  To view according to sort order, select the default sort option when viewing a product list.


Nick Hendler

Offline

 

#3 02-09-2017 15:45:07

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Product Sort order

I realized I had changed my ECOM-Prod default from the default to ASC. Quick followup - I would like to set the

Product Sort Order value = 0 for * Products in xCat. Is this how I would write this? sql skills are a little rusty.

Offline

 

#4 02-09-2017 15:55:19

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Product Sort order

Would also be helpful if Product is in xcat add to to xcat2

Last edited by coatzel21 (02-09-2017 15:55:35)

Offline

 

#5 02-10-2017 08:59:01

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Product Sort order

I would like to set the Product Sort Order value = 0 for * Products in xCat

UPDATE ecom_prod SET sortorder=0 WHERE xcat LIKE '%categoryidhere%'

Would also be helpful if Product is in xcat add to to xcat2

UPDATE ecom_prod SET xcat2=xcat

or combining the two:

UPDATE ecom_prod SET sortorder=0, xcat2=xcat WHERE xcat LIKE '%categoryidhere%'


Nick Hendler

Offline

 

#6 02-10-2017 09:20:53

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Product Sort order

thanks Nick!

Offline

 

#7 02-10-2017 09:57:48

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Product Sort order

A little knowledge of SQL goes a long way.  Get your feet wet with it, but don't destroy anything smile


Nick Hendler

Offline

 

#8 02-10-2017 23:35:01

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Product Sort order

First one worked great to set sort order to 0.

I couldn't get the second one working. Also just to clarify. Looking to take All products assgined to xcat A and give those products the additional assignment xcat B.
Hope you get a change to see this. Working on a big project this weekend.

Last edited by coatzel21 (02-11-2017 13:10:54)

Offline

 

#9 02-13-2017 10:01:23

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Product Sort order

I misunderstood.  Here you are:

UPDATE ecom_prod SET xcat=CONCAT(xcat,', NEWCATEGORYID') WHERE xcat LIKE '%MATCHCATEGORYID%' AND xcat NOT LIKE '%NEWCATEGORYID%'


Nick Hendler

Offline

 

Board footer