Lamrith Posted April 8, 2019 Share Posted April 8, 2019 A few items I carry I have setup options for in regards to color / txt on them. I have set them up as a single item with options and have use stock lvl selected for each option on the options page. I just had a situation were it let me sell an option that I do not have in stock. I have tried changing various settings in the item and just cannot get it to stop allowing sale of an option that is out of stock. What do I do so it does not do this in the future? Link to comment Share on other sites More sharing options...
bsmither Posted April 8, 2019 Share Posted April 8, 2019 Please verify if what you see is just CubeCart showing the item on a View Product page and that there is an active Add to Cart (Buy) button. If the particular option is out of stock, when you click Add to Cart, CubeCart should report back that this option is out of stock. Were you able to actually go through the checkout process and purchase the item? In admin, Store Settings, Stock tab, is "Allow out-of-stock purchases" checked? Link to comment Share on other sites More sharing options...
Lamrith Posted April 8, 2019 Author Share Posted April 8, 2019 39 minutes ago, bsmither said: Please verify if what you see is just CubeCart showing the item on a View Product page and that there is an active Add to Cart (Buy) button. If the particular option is out of stock, when you click Add to Cart, CubeCart should report back that this option is out of stock. Were you able to actually go through the checkout process and purchase the item? In admin, Store Settings, Stock tab, is "Allow out-of-stock purchases" checked? BSmither, The picture attached the bottom part is a live screenshot of the red option selected and allowing add to cart even though in the item detail (top half of image) it shows -1. I am able to add to cart with no error message. Yes it did allow purchase of the item as my customer lastnight placed an order when it had qty 0, which is why it now has Qty:-1 https://www.pelletpeddler.com/cps-handle.html I do not have allow out of stock selected, and verified by another item (no options) is out of stock and it does not allow adding to stock. https://www.pelletpeddler.com/lumberjack-alder-100.html To me it just seems like the site is ignoring the quantities on the options tab for the item. I am hoping it is a simple fix, if not I may have to split it into 4 items to make sure it works properly. Link to comment Share on other sites More sharing options...
bsmither Posted April 8, 2019 Share Posted April 8, 2019 I was not able to reproduce this using a local installation (using CC622 and eTone skin). When I tried to add a product to the cart when an option in the Options Matrix said it had zero stock, I got a warning banner saying: "Sorry but the chosen product option combination is out of stock or the last of the stock is already in your basket." Do you have any plugins installed that may affect how product stock levels are treated? Link to comment Share on other sites More sharing options...
Lamrith Posted April 8, 2019 Author Share Posted April 8, 2019 Interesting. I just edited my other item that I have options for and they also let me add and buy though there is 0 quantity. Now I am not sure what is going on. Single items with no options is working correctly. Any chance you could check the link I gave and see if the site lets you add the red handle to cart? Only plug-ins I have installed are: The two All-in-one shipping versions you helped me with Paypal Print Order form. I tried removing the add-ons and refreshed the site and it still lets me add to cart and start checkout. Link to comment Share on other sites More sharing options...
bsmither Posted April 8, 2019 Share Posted April 8, 2019 I have checked your site and the behavior is as you describe. The skin POSTs the correct information, so I think we can eliminate eTone as a possible cause. (ASIDE: In all of the templates originally written for CC5 - that includes the eTone template, there is a coding error. Please check for the presence of $OPT in two places and, if present, make the edit. In content.product.php, find: <p> <label for="option_{$option.option_id}" class="return">{$option.option_name}{if $option.price} ({$option.symbol}{$option.price}){/if}{if $option.required} *{/if}</label> {if $option.type == '1'} <input type="text" name="productOptions[{$option.option_id}][{$OPT.assign_id}]" id="option_{$option.option_id}" class="textbox {if $option.required}required{/if}" /> {elseif $option.type == '2'} <textarea name="productOptions[{$option.option_id}][{$OPT.assign_id}]" id="option_{$option.option_id}" class="textbox {if $option.required}required{/if}"></textarea> {/if} </p> Change to: <p> <label for="option_{$option.option_id}" class="return">{$option.option_name}{if $option.price} ({$option.symbol}{$option.price}){/if}{if $option.required} *{/if}</label> {if $option.type == '1'} <input type="text" name="productOptions[{$option.option_id}][{$option.assign_id}]" id="option_{$option.option_id}" class="textbox {if $option.required}required{/if}" /> {elseif $option.type == '2'} <textarea name="productOptions[{$option.option_id}][{$option.assign_id}]" id="option_{$option.option_id}" class="textbox {if $option.required}required{/if}"></textarea> {/if} </p> This doesn't fix what we are discussing.) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.