Ggib Posted March 7, 2015 Share Posted March 7, 2015 Please can you explain how we can see our actual stock levels on the site. We can see the total number of products listed and within each listed product we can obviously see our stock levels but is there anywhere to see the total stocks at a glance rather than having to do the maths? Any help would be appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted March 8, 2015 Share Posted March 8, 2015 Hi I am assuming that you are talking about total stock levels on the admin side across all products (not clear from your question if you mean fro t end or back end) and if so, then no but I cannot understand why you would ever need to know how many total products you have in stock ? It would be possible to write a simple sql query to calculate this if you really do want this figure - it would be a bit more complicated if you use stock levels on product options though Ian Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 8, 2015 Share Posted March 8, 2015 For tax purposes I download the Google export and let Excel do the math. Quote Link to comment Share on other sites More sharing options...
Ggib Posted March 8, 2015 Author Share Posted March 8, 2015 I am talking about on the admin side (ie backend). If for example I have 6 products available with different stock levels available in each (for example, 3,5,4,6,2 & 0) then my total stock portfolio would be 20 but my total number of products would be 6. On the admin side you can see a total product level but not a total stock level which seems surprising seeing as the only mathematical calculation needed within the site would be to add up the stock numbers within all the products that actually contain stock omitting any with no stock. Is there really no where this is displayed at all on the admin side? Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted March 8, 2015 Share Posted March 8, 2015 I am talking about on the admin side (ie backend). If for example I have 6 products available with different stock levels available in each (for example, 3,5,4,6,2 & 0) then my total stock portfolio would be 20 but my total number of products would be 6. OK although I still cant see any real reason why this figure would be useful Is there really no where this is displayed at all on the admin side? No there isnt and as never come across this as a requirement from any other site either via clients or any one on here it is t something that is in big demand. However, several solutions already offered on here which is exporting inventory and calculating via Excel or simply using MySQL to calculate Ian Quote Link to comment Share on other sites More sharing options...
Ggib Posted March 8, 2015 Author Share Posted March 8, 2015 Why wouldn't you want to know? Surely that would be like having a shop but not really knowing what is actually left on the shelves? Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted March 8, 2015 Share Posted March 8, 2015 On a per product basis yes of course but why would you want to know the total of all products added together. You have also been offered two different ways that this can be achieved anyway so if it is what you want to do, then you have a solution Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 8, 2015 Share Posted March 8, 2015 For whatever reason you need to know the aggregate count of your shippable inventory, I will have some small edits for you to make. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 8, 2015 Share Posted March 8, 2015 In the file /admin/skins/default/templates/dashboard.index.php, near line 227 (CC6b7):Find: <legend>{$LANG.dashboard.title_inventory_data}</legend> <dl> <dt>{$LANG.dashboard.inv_customers}</dt> <dd>{$COUNT.customers}</dd> <dt>{$LANG.dashboard.inv_products}</dt> <dd>{$COUNT.products}</dd> Add after: <dt>Aggregate Inventory</dt> <dd>{$COUNT.inventory}</dd> In the file /admin/sources/dashboard.index.inc.php, near line 281:Find: $GLOBALS['main']->addTabControl($lang['dashboard']['title_store_overview'], 'advanced'); $count = array( 'products' => (int)$GLOBALS['db']->count('CubeCart_inventory', 'product_id'), 'orders' => (int)$GLOBALS['db']->count('CubeCart_order_summary', 'cart_order_id'), 'customers' => (int)$GLOBALS['db']->count('CubeCart_customer', 'customer_id'), ); Add after: $inventory_stock_levels['inventory'] = $GLOBALS['db']->select('CubeCart_inventory', array('product_id', 'stock_level')); $inventory_stock_levels['matrix'] = $GLOBALS['db']->select('CubeCart_option_matrix', array('DISTINCT' => 'product_id', 'SUM' => 'stock_level')); foreach ($inventory_stock_levels['inventory'] as $result_record) $count['inventory'][$result_record['product_id']] = $result_record['stock_level']; unset($result_record); foreach ($inventory_stock_levels['matrix'] as $result_record) $count['inventory'][$result_record['product_id']] = $result_record['SUM_stock_level']; unset($result_record); $count['inventory'] = array_sum($count['inventory']); This will get the main stock levels and options stock levels. For each product, it's main stock level will be used unless there is an options matrix table for the product. If there is an options matrix table, the sum total of stock levels amongst all option variants will be used - replacing the main stock level count for that product. You will see this value in admin, Dashboard, Store Overview tab. Quote Link to comment Share on other sites More sharing options...
Ggib Posted March 8, 2015 Author Share Posted March 8, 2015 Thanks bsmither - I knew you'd come up trumps - again! Very much appreciated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.