Looking for old forum posts and information? View the old forum archive here ยป
Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

A static copy of our previous forums website is available online for reference. Click here to access the forum archive.

Learn more about...

AspDotNetStorefront
DotFeed

Modify Display Order For Out Of Stock

We are trying to change the manner by which the products within a category are displayed to have all the products that are out of stock at the bottom of the page. We want this to happen automatically and do not want to have to update the display order every time our inventory changes. We also do not want to hide our out of stock items as our customers will think they have been discontinued.

We use Multistore 9.1. I am familiar with modifying XML pages, SQL, and stored procedures. Any help is appreciated!
asked May 1, 2014 in MultiStore by esgrillo (205 points)

2 Answers

0 votes

Hello, are you using the stock GetProducts stored procedure? If so, you could modify the top temporary tables to sort by inventory of the variant (case statement with 0/1 output and sorting by it descending).

Thank you,
Jan
 
Compunix, LLC (Phoenix, AZ)
AspDotNetStorefront Development Partner and Reseller since 2005
------------------------------------------------------------------------------------------------------
 AspDotNetStorefront add-ons and plugins : http://www.ecommercecartmods.com
 Complete Automotive Solution : http://www.autopartsshoppingcart.com
------------------------------------------------------------------------------------------------------
answered May 1, 2014 by jsimacek (6,425 points)
Thank you! Yes, I have the stock GetProducts and the VibeTrib Get Products.  I am looking at the stock one.

I am not that familiar with case So would the statement look like this? Declare new parma Available --

SET @Available = 1 WHEN case pv.inventory>0  ELSE 0

Where would you place it in the procedure? Right before the Create Table DisplayOrder or Insert Table DisplayOrder statements

I would expand out on the displayorder temp table, or better for performance, I would probably just update the insert @productfilter select statement to add an initial order by clause for this... (do your case/when in the order by with DESC if 1 is in stock)

Thank you,
Jan
 
Compunix, LLC (Phoenix, AZ)
AspDotNetStorefront Development Partner and Reseller since 2005
------------------------------------------------------------------------------------------------------
 AspDotNetStorefront add-ons and plugins : http://www.ecommercecartmods.com
 Complete Automotive Solution : http://www.autopartsshoppingcart.com
------------------------------------------------------------------------------------------------------
0 votes
Thank you for your help.  I was able to get this to work.
answered May 6, 2014 by esgrillo (205 points)
...