bbtil Posted January 30, 2018 Share Posted January 30, 2018 Hi, I've recently run into an issue where I set the product options matrix to a certain amount and the shopping cart is allowing items to be sold into the negatives. The option that says allow out of stock purchases is not selected. Any suggestions? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 30, 2018 Share Posted January 30, 2018 Please check the "Use Stock Level" checkboxes in the Options Matrix table. Quote Link to comment Share on other sites More sharing options...
bbtil Posted January 30, 2018 Author Share Posted January 30, 2018 Those were checked and that is where the negative numbers were showing. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 30, 2018 Share Posted January 30, 2018 Just to clarify: You are saying the store will allow a customer to add a 'zero or negative stock level' product to the basket, proceed through checkout, and pay for that item? Or you are saying that the store "implies" one can Add to Basket a 'zero or negative stock level' product to the basket? If this is just the Add to Basket button indicator, then there have been issues when that product has an Options Matrix. The current version of the Foundation skin makes an AJAX call to CubeCart verifying the stock level of the "just now" chosen combination of options. Only then is the stock level revealed for that combination. Quote Link to comment Share on other sites More sharing options...
bbtil Posted January 30, 2018 Author Share Posted January 30, 2018 (edited) They are able to purchase items that are at a zero level then take it into the negatives. We over sold an item the other day to -3 before I caught it. Â I'm using the Mican layout. Edited January 30, 2018 by bbtil Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 30, 2018 Share Posted January 30, 2018 I see this as a problem with the core code. The skin does not determine if an out-of-stock item can or cannot be sold. The skin only displays what CubeCart tells it to display. Please verify the exact version of CubeCart you are using, and whether there are any plugin modules or code snippets in use. (Not gateways or shipping modules.) Quote Link to comment Share on other sites More sharing options...
bbtil Posted January 30, 2018 Author Share Posted January 30, 2018 Mican CubeCart Ltd 1.0.2  CubeCart Version 6.1.10 Only extensions are shipping and payment. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2018 Share Posted January 31, 2018 There are several places where CubeCart checks for stock levels throughout the shopping experience. All "should" check for the enabled/disabled state of the store setting "Allow out of stock purchases". Let's try this: In admin, Store Settings, Layout tab, "Allow users to change front-end skin", set to Yes (Logged in admins only). On the Stock tab, "Show stock levels", check to enable, and "Main stock level as matrix stock level summary", check to enable. Using a programmer's text editor, make an edit to /skins/foundation/templates/main.php by adding {debug} at the very end. On the storefront, you should now see a drop-down selector at the bottom-right. Choose Foundation. Your browser will want to throw a popup. Let it. (You may need to dismiss this popup and refresh the page to get a fresh popup.) This the template engine debug console. Visit a product page that you know has zero or negative stock Scroll to where $CONFIG is in the left pane. Then look for 'stock_level' (should be "1") and 'basket_out_of_stock_purchase' (should be "0") keys in the right pane. Then scroll to almost the bottom and find $PRODUCT in the left pane. Then find 'stock_level' (will show quantity available) and 'use_stock_level' (should be "1") in the right pane. Do all these settings agree? Quote Link to comment Share on other sites More sharing options...
bbtil Posted January 31, 2018 Author Share Posted January 31, 2018 Everything but that last one was correct. the $products 'use_stock_level' was at 0. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2018 Share Posted January 31, 2018 That might be ok, as each Option Matrix combo has a "Use Stock Level" checkbox. This key/value is not given to the skin. In the latest version sof Foundation, an AJAX request is made and the result contains the stock level. However, there is always a check on stock levels whether at the main product level, or, if an option matrix combo exists, at that level. I do not recall any other reports of this happening. You say you found $product in the left pane. When viewing a product page, it should be $PRODUCT. Please verify. In admin, bring the product up for editing where you said $products 'use_stock_level' was at 0. On the General tab, note whether Use Stock Level is disabled. This would agree with what you found in the debug console. Check the box and Save. Try to replicate purchasing an out-of-stock item. Quote Link to comment Share on other sites More sharing options...
bbtil Posted January 31, 2018 Author Share Posted January 31, 2018 It says $PRODUCTS Should I do that even if the product has matrix options? Quote Link to comment Share on other sites More sharing options...
bbtil Posted January 31, 2018 Author Share Posted January 31, 2018 This is the product we're having the issue with https://shocktechusa.com/45-grip-grames/gunfighter.html There is supposed to be a black and clear option but both have different quantities available. if I have some of one and none of the other it still shows both options and allows the other to be purchased. on the top level product page it won't let me uncheck the stock levels and it shows only one amount for the two products. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2018 Share Posted January 31, 2018 I see only the Clear option. Quote Link to comment Share on other sites More sharing options...
bbtil Posted January 31, 2018 Author Share Posted January 31, 2018 sorry i forgot to mention i had to disable the black option because when you add 2 to the clear it still shows black as an option. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2018 Share Posted January 31, 2018 Which options are combined in the Options Matrix table? I understand you have Finish, but are the other two included in the table? Is the Finish option(s) loaded from a Set? And, no, generally CubeCart does not, at this point, indicate which options are in/out of stock. However, this plugin (https://www.cubecart.com/extensions/plugins/absolute-matrix-option-prices-price-list-hide-out-of-stock-matrix-options) puts the Options Matrix table on the View Product page and enforces in/out of stock purchasing capability. Â Quote Link to comment Share on other sites More sharing options...
bbtil Posted January 31, 2018 Author Share Posted January 31, 2018 Yes, the color options are in a set. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2018 Share Posted January 31, 2018 I've made very few tests with options from a set, so that is where I will focus my explorations. Quote Link to comment Share on other sites More sharing options...
bbtil Posted February 1, 2018 Author Share Posted February 1, 2018 ok thank you. do you have any recommendations for an shipping mod that is product specific? We have items that typically don't weigh a lot but are high dollar and need to be insured. We want to factor that in automatically, any thoughts? 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.