Jump to content

[FIXED] 0 Stock items can be ordered via ajax order form


Wajdan

Recommended Posts

Hello Wajdan,

 

Nice finding! I managed to fix it for mine, here is the fix:

 

1. Open "order/templates/products.tpl"

2. Replace with:

<br />
<table width="90%" cellspacing="0" cellpadding="0" align="center">
 <tr>
{foreach from=$products item=product key=num}
   <td width="50%"><input type="radio" name="pid" value="{$product.pid}" id="pid{$product.pid}"[b]{if $product.qty eq "0"} disabled{/if}[/b] onclick="loadproductconfig('{$product.pid}')"> <label for="pid{$product.pid}">{$product.name}</label></td>
   {if $num % 2}</tr><tr>{/if}
{/foreach}
 </tr>
</table>

 

What I did basically is add a check if the quantity is 0, and if so, it will disable the radio button from being clicked:

{if $product.qty eq "0"} disabled{/if}

Good luck! :) Hope they patch this up.

Link to comment
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated