{"id":5047,"date":"2014-03-30T18:23:33","date_gmt":"2014-03-30T18:23:33","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/implementing-several-inventories-on-the-same-catalog-collection-of-common-programming-errors\/"},"modified":"2014-03-30T18:23:33","modified_gmt":"2014-03-30T18:23:33","slug":"implementing-several-inventories-on-the-same-catalog-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/implementing-several-inventories-on-the-same-catalog-collection-of-common-programming-errors\/","title":{"rendered":"Implementing several Inventories on the same Catalog-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn Greetings,Here&#8217;s a tricky one.\u00a0In my system, orders can be shipped from several different locations: the main warehouse holds the &#8220;heavy rotation&#8221; stock,\u00a0and another warehouse handles the\u00a0rest of the products. One specific SKU can be available at both locations at one time. To make a long story short:\u00a0if a SKU is available in the main warehouse, then you can get it in express delivery, if not and if it is available in the second warehouse, then you can get it in standard delivery, if not then it&#8217;s out of stock. So basically, the total available quantity of an SKU is the sum of both inventories.Since you can&#8217;t have several Inventory Catalogs based on the same Catalog, we have to implement this another way.According to your experience, what would be the best implementation ?I would build 2 virtual catalogs, one for each warehouse, that would only be used to attach the Inventory Catalog. Quite disturbing, and raises other issues, such as rebuilding the virtual catalogs everytime the main catalog is updated.Any thoughts appreciated!Thanks for your help.<\/p>\n<p>-Fabrice.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn1 Correct. Virtual catalogs are better then above ideas, i agree.<\/p>\n<p>By the way: Beware to rebuild the VCs, otherwise you cannot see the changes made in your base catalog.<\/p>\n<p>If you have to rebuild your catalogs frequently, then using VCs will decrease your runtime performance.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn2<\/p>\n<p>As an unsupported solution:\u00a0<\/p>\n<p>\u00a0\u00a0 \u00a0 \u00a0 \u00a0Inventory data is kept in only single table at productcatalog database.<\/p>\n<p>You may create two custom tables keeping the inventory information for each warehouse.<\/p>\n<p>You may create a view combining these two custom tables, then the view will show these catalogs as commerceServer<\/p>\n<p>inventory table.<\/p>\n<p>for triggers<\/p>\n<p>http:\/\/msdn.microsoft.com\/en-us\/library\/aa258254(SQL.80).aspx<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn3 Thanks for your (quick) replies.<\/p>\n<p>I know I can implement my own Inventory system, I was really looking for a more &#8220;standard&#8221; solution using the Commerce Server features only &#8211; if possible, of course. Implementing virtual catalogs in order to hold\u00a0different inventory informations seems to make sense and is a\u00a0more &#8220;Commerce Server&#8221; approach to me.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn4 Correct. Virtual catalogs are better then above ideas, i agree.<\/p>\n<p>By the way: Beware to rebuild the VCs, otherwise you cannot see the changes made in your base catalog.<\/p>\n<p>If you have to rebuild your catalogs frequently, then using VCs will decrease your runtime performance.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn5<\/p>\n<p>Alen,<\/p>\n<p>What do you mean by one method being supported and othe being unsupported? A custom call to an outside inventory system is supported while the other method you mentioned is not. Can you please explain, as it is the same subject which I&#8217;m dealing with right now.<\/p>\n<p>thanks,<\/p>\n<p>Eddie<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>msdn Greetings,Here&#8217;s a tricky one.\u00a0In my system, orders can be shipped from several different locations: the main warehouse holds the &#8220;heavy rotation&#8221; stock,\u00a0and another warehouse handles the\u00a0rest of the products. One specific SKU can be available at both locations at one time. To make a long story short:\u00a0if a SKU is available in the main [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5047","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5047"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5047\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}