Controlling order of products on pages

46 views
Skip to first unread message

Dan Baughman

unread,
Oct 17, 2017, 9:41:24 AM10/17/17
to Slatwall Commerce
Hey group,

Just curious what solutions people are using to control the order of products on pages.  I think I saw something associated with this in version 5, so when the admin part of that gets to a working state, I'll be happy to check that out.   For now I'm weighing my options for implementing the ability for a client to control the order of products on pages which are driven by the smart lists.  I guess one approach might be to have a sort attribute to the product, but it kinda makes it difficult to reorder as you have to edit each product and change a sort value, though isn't completely unworkable.

Dan

Chris Kent

unread,
Oct 17, 2017, 9:55:42 AM10/17/17
to Slatwall Commerce
Hi Dan,

If you look at the line 201-208 for the product-list view https://github.com/ten24/slatwall/blob/master/public/views/templates/slatwall-productlisting.cfm#L201-L208 you can see how easy it is to create front-end modifiers to the product smartlist to change the order. 

You are not limited to these orders, you could use
  • 'orderBy=createdDateTime|DESC' for latest products
  • 'orderBy=calculatedQATS|DESC' for products with the highest quantity available to sell
  • ...

These are processed as smartlist.addOrder(...) when the page loads.

Filters can also be applied in a similar way.

Chris.

Dan Baughman

unread,
Oct 17, 2017, 10:14:26 AM10/17/17
to Slatwall Commerce
Thank you, I do see those.

In this case I'm interested in applying an arbitrary order specified by the client- and moreover I'd like to extend the ability to the client for them to specify that order without contacting me.  Even better would be the ability to specify that per page, but I don't think I need that.

You can imagine a "sort order" attribute applied to a product.  My only beef with that is you have to go into each product and edit it to control the sort order - versus just looking at a list and setting them all at once (1,2,3,4.etc).  Which I guess isn't that big of a deal if they don't change that often.

Sumit Verma

unread,
Dec 1, 2017, 8:00:51 PM12/1/17
to SlatwallEcommerce
If you are on version 5+, from content edit screen of product listing page, you can define manual sorting. Then on your front-end template you can change the sorting by sortorder field (in ProductListingPage entity). 


Sumit Verma
Partner / Vice President | ten24, LLC
office: 877.886.5806 x 103 | mobile: 617.290.8214
www.ten24web.com | www.linkedin.com/in/sverma | twitter: blogonria

--
You received this message because you are subscribed to the Google Groups "Slatwall Commerce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slatwallecommerce+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Baughman

unread,
Dec 3, 2017, 12:32:45 AM12/3/17
to slatwall...@googlegroups.com
Hi, 

That looked amazing unfortunately I was just never able to sort through all the errors in slatwall 5 to use it in a production environment. Not to knock it - I'll be happy when I get them figured out or someone else does.

--
You received this message because you are subscribed to a topic in the Google Groups "Slatwall Commerce" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/slatwallecommerce/73rLxRea6Ws/unsubscribe.
To unsubscribe from this group and all its topics, send an email to slatwallecommerce+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages