ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Using ProductCart
  New Posts New Posts RSS Feed - product sold out
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

product sold out

 Post Reply Post Reply
Author
Message
erregi View Drop Down
Newbie
Newbie


Joined: 29-September-2011
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote erregi Quote  Post ReplyReply Direct Link To This Post Topic: product sold out
    Posted: 05-July-2012 at 7:00am
good morning,
it is possible to configure the product so that when all the sub-products (apparel installed add-on) are stored at zero (0) the product is not shown in the shop?
thanks
 


Edited by erregi - 05-July-2012 at 7:01am
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 05-July-2012 at 7:26am
Hi,
   Yes, except that's potentially got a high processing overhead which I suspect would have a negative impact on site speed. It's probably better to monitor products that are low on stock on the sub-products and then set them unavailable when that happens. Next question - how - no automatic method is available at the moment, but there is alerting on low stock levels available. I'm certain a better method would be possible, but it's not available at the moment & not all stores would want it.   
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 05-July-2012 at 1:34pm
With all due respect to Hamish, I don't see why this should potentially add high processing overhead or introduce any appreciable negative impact on site speed.

In essence, when inventory is adjusted downward, simply query for all sub-products of the parent where inventory is greater than 0; if no records are returned, then set the parent product as inactive. Very quick & simple, even if a parent has a large number of sub-products. If it's typical to have large numbers of products in an order, then, yeah, the milliseconds will start to add up, but would be very minor in comparison to everything else that's being processed.

The issue as I see it is that there are several events/places in the code base where this could occur, especially if there are payment methods that don't set an order as processed & paid when placed. Further, should this be handled in the control panel and order import wizard as well?

It also begs the question of whether the parent product should be set back to active on the fly if stock is added to sub-products through either the control panel or import wizard.
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 05-July-2012 at 2:17pm
Hi Sean,
   I'm thinking of the category pages. Say a category page will show 40 products. If these are all Apparel products to decide if the product is displayed the sql is normally pretty simple, basically grabbing the next 40 products where stock level is > 0 (presuming hiding out of stock products is set). At the moment the parent product for Apparel products does not use the stock level field and cannot be set to out of stock (or perhaps it's ignored, I don't recall). If the field is not used then 40 * the total number of subproducts need to be interrogated and then potentially more if any apparel products are found to be out of stock. The only sensible way round this that occurs to me is (if they are not in use at all) utilise the stock settings of the parent product. The field could be set during order completion by checking all the sub-products to see if they are out of stock once the order is taken into account. As and when stock is added then the stock status of the parent product could be reset. As you say, quite a few places in the code will need updating.
    
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 05-July-2012 at 3:46pm
Hi Hamish,

My thinking as to how to handle "the product is not shown in the shop" was to set the parent product as inactive on the fly when doing the update on inventory -- so, checking inventory on category pages, say, wouldn't be an issue as inactive products are already weeded out of the results. So, to get the desired result here, inventory itself wouldn't be part of the equation except for at the moments/events when inventory is adjusted. Handling it this way wouldn't add any extra load, save for a little extra work on say orderComplete.asp, etc.
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 05-July-2012 at 4:59pm
Great minds ..... :-)  I just think the effort to achieve it is significant due to the number of places/files that will need code changes.
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 05-July-2012 at 5:08pm
Hi Sean, Actually the Inactive flag is not the best field to use IMHO as you won't be able to tell if a product is set inactive due to stock, or due to the store admin wanting it inactive! The stock level field is probably the field to go for, but it would still need a fair amount of research to investigate the impact of using that. For example, Google Product feeds, Quickbooks add-on etc. In the end it's probably cleanest and easiest to add a separate field - still quite a lot of work involved I suspect though & we have not had a lot of demand for this AFAIK, although for some stores I can see the value.       
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 05-July-2012 at 6:48pm
Originally posted by Hamish Hamish wrote:

Hi Sean, Actually the Inactive flag is not the best field to use IMHO as you won't be able to tell if a product is set inactive due to stock, or due to the store admin wanting it inactive!

This could be mitigated against via the Product Notes field.

Another approach could be to flag the parent product as Not for Sale, but then if the desired result was to not show sold out products at all in the store catalog, this would add a let of editing to category pages, search results & special pages (featured, special, new arrivals, recently reviewed).

Perhaps another approach, rather than essentially hiding the parent item in the store catalog, could be our Notify Me (when back in stock) add-on: http://wiki.earlyimpact.com/widgets/thirdparty/notifyme

There are definitely pros & cons to any approach here.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.046 seconds.