Guest Manic056 Posted September 13, 2007 Share Posted September 13, 2007 Anyone fancy having a go at lending a hand with this one? www.manicglow.com - all mod conflicitons have finally been resolved, although now when you attempt to buy an item that is out of stock, or a product option that is out of stock, a blank error appears on screen, I was hoping to fill this with a message such as "Out of Stock, please attempt another product selection that has items avaliable." Quote Link to comment Share on other sites More sharing options...
Guest Posted September 13, 2007 Share Posted September 13, 2007 You might want to get the latest version of my custom add to cart messages (its less buggy) but as for your checkstock javascript look in the javsacript you put here for else if (stockLevel == 0) { alert(""); return false; and type a message between "" function checkStock() { var stockInfo = { '47' : [ 12, "" ], '49' : [ 0, "" ] };var e = []; e[0] = document.getElementsByName('productOptions[]'); e[1] = document.getElementsByName('productOptions_5'); e[2] = document.getElementsByName('productOptions_5[]'); var a = gv(e); var index = getIndex(a); var stockLevel = -1; if(stockInfo[index] != undefined) { stockLevel = stockInfo[index][0]; } else if(index == '') { stockLevel = 0; } if (stockLevel > 0) { return true; } else if (stockLevel == 0) { alert(""); return false; } else { alert(""); return false; } } Quote Link to comment Share on other sites More sharing options...
Guest Manic056 Posted September 26, 2007 Share Posted September 26, 2007 else if (stockLevel == 0) { alert(""); return false; and type a message between "" Cheers, I'll have a look now. Sorry, just went to check it, what file should I be looking in here? I can't find the area you are talking about. Quote Link to comment Share on other sites More sharing options...
Guest Manic056 Posted September 28, 2007 Share Posted September 28, 2007 Erm, anyone? Question in post above. Still having some problems with this. Quote Link to comment Share on other sites More sharing options...
Guest webicon Posted September 28, 2007 Share Posted September 28, 2007 Try in styleTemplates/content/viewprod.tpl... Quote Link to comment Share on other sites More sharing options...
Guest Manic056 Posted September 28, 2007 Share Posted September 28, 2007 Try in styleTemplates/content/viewprod.tpl... Theres nothing of the sort there, I've got this: <!-- BEGIN: view_prod --> <!-- start mod: Stock Levels for Product Options --> <!-- by Estelle and DanV - http://cubecart.expandingbrain.com --> {STOCKOPTION_SCRIPT} <!-- end mod: Stock Levels for Product Options --> <!-- BEGIN: prod_true --><div class="boxContentd"> <strong>{LANG_DIR_LOC}</strong> {CURRENT_DIR} <form action="{CURRENT_URL}" method="post" name="addtobasket" target="_self"> <p class="txtContentTitle"><strong>{TXT_PRODTITLE}</strong></p> <div class="boxContentb"> <div><img src="{IMG_SRC}" alt="{TXT_PRODTITLE}" border="0" title="{TXT_PRODTITLE}" />{TXT_OUTOFSTOCK}{SALE_PRICE}</div> <!-- BEGIN: more_images --> <div style="text-align: center;"><a href="java script:openPopUp('extra/prodImages.php?productId={PRODUCT_ID}', 'images', 548, 455, 0);" class="txtDefault">{LANG_MORE_IMAGES}</a></div> <!-- END: more_images --> </div> </div> <p> <strong>{LANG_PRODINFO}</strong> <br /> {TXT_DESCRIPTION} </p> <div class="boxContentc"> <!-- BEGIN: prod_opts --> <div style="float: left; position: realtive; width: 270px; text-align; right;"> <strong>{TXT_PROD_OPTIONS}</strong> <table border="0" cellspacing="0" cellpadding="3" align="right"> <!-- BEGIN: repeat_options --> <tr><td><strong>{VAL_OPTS_NAME}</strong> </td><td><select name="productOptions[]" onChange="{JS_UPDATE_PRICE} {JS_UPDATE_STOCK_LEVEL}"><!-- BEGIN: repeat_values --><option value="{VAL_ASSIGN_ID}">{VAL_VALUE_NAME}<!-- BEGIN: repeat_price -->{VAL_OPT_SIGN}{VAL_OPT_PRICE}) <!-- END: repeat_price --> </option> <!-- END: repeat_values --> </select> </td> </tr> <!-- END: repeat_options --> </table></div> <!-- END: prod_opts --> <p> <strong>{LANG_PRICE}</strong> {TXT_PRICE} <span class="txtSale">{TXT_SALE_PRICE}</span> </p> <ul> <li class="bulletLrg"><a href="index.php?act=taf&productId={PRODUCT_ID}" target="_self" class="txtDefault">{LANG_TELLFRIEND}</a></li> </ul> <br /> <strong>{LANG_PRODCODE}</strong><br /> <span id="prodCode">{TXT_PRODCODE}</span> <div id="stock"> <span id="inStock">{TXT_INSTOCK}</span><span id="outOfStock" style="font-size: 12px; font-weight: bold; color: #FF0000;"></span> <!-- BEGIN: buy_btn --> <div>{LANG_QUAN} <input name="quan" type="text" value="1" size="2" class="textbox" style="text-align:center;" /><br /><br/> <a href="java script:{JS_VERIFY_STOCK} addtocart('addtobasket','{TXT_PRODTITLE}');" class="txtButton" style="line-height: 20px";>{BTN_ADDBASKET}</a> <!-- END: buy_btn --> </div></div> <div></div> <input type="hidden" name="add" value="{PRODUCT_ID}" /> </form> <div id="question" style="display:none; cursor: default;padding:20px"> <p>You have added {TXT_PRODTITLE} what would you like to do next?<p> <input type="button" id="stay" value="Keep Shopping" /> <input type="button" id="cart" value="Checkout" /> </div> <!-- END: prod_true --> <!-- BEGIN: prod_false --> <p>{LANG_PRODUCT_EXPIRED}</p> <!-- END: prod_false --> </div> <!-- END: view_prod --> Quote Link to comment Share on other sites More sharing options...
Guest webicon Posted September 29, 2007 Share Posted September 29, 2007 sorry - was just a guess because I could see the script in the source code on the product page but not on the index page. Best email the mod author to find out where they have placed the script. Quote Link to comment Share on other sites More sharing options...
Guest Manic056 Posted September 30, 2007 Share Posted September 30, 2007 sorry - was just a guess because I could see the script in the source code on the product page but not on the index page. Best email the mod author to find out where they have placed the script. Good idea, he uses the other cubecart forums. Better head on over. Quote Link to comment Share on other sites More sharing options...
Guest Manic056 Posted October 2, 2007 Share Posted October 2, 2007 OK I sent a mail to Anthony and he said he might be able to help sometime next week, although anyone who could help now would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
burgensteen Posted October 2, 2007 Share Posted October 2, 2007 Just look in the mod instructions for the else if statement as described above to find which file its in (assuming you have the instructions for the mod !!!) Quote Link to comment Share on other sites More sharing options...
Guest Manic056 Posted October 5, 2007 Share Posted October 5, 2007 http://www.cubecartforums.org/index.php?au...mp;showfile=123 This is the file, I can't seem to find anything that has to do with an empty quote. Is there any particular code from files that I could post here that could help anyone to help me solve this? Cheers. Antony. Quote Link to comment Share on other sites More sharing options...
Guest Manic056 Posted October 12, 2007 Share Posted October 12, 2007 Sorry, just renewing the thread. Don't want it to die, need to get this fixed. 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.