Jump to content
Sign in to follow this  
Lamrith

0 and - item qty in options still allowing purchase

Recommended Posts

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?

 

options.jpg

Share this post


Link to post
Share on other sites

Posted (edited)

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?

Edited by bsmither

Share this post


Link to post
Share on other sites
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.

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
Posted (edited)

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.

Edited by Lamrith

Share this post


Link to post
Share on other sites

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.)

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...