JennaR Posted December 30, 2005 Share Posted December 30, 2005 Hi There! I've used QTpro successfully in a couple of osC stores before, but now I'm confused. I have a product with 3 different attributes (size, model and color) but only the first dropdown menu is working - the second and the third ones are empty. (With one or two attributes everything works fine.) When I look at the source code I can see the "stk"-array (? - sorry I'm not a programmer, I'm not sure if that's an array or what...) is empty: <script LANGUAGE="JavaScript"><!-- var stk={}; var txt3={25:'Pitk?hihainen',24:'Lyhythihainen'}; var txt2={10:'Kerma',17:'Karpalo'}; function i1(frm) { frm['id[3]'].length=1; frm['id[2]'].length=1; for (opt in stk[frm['id[1]'].value]) { frm['id[3]'].options[frm['id[3]'].length]=new Option(txt3[opt],opt); } } function i3(frm) { frm['id[2]'].length=1; for (opt in stk[frm['id[1]'].value][frm['id[3]'].value]) { frm['id[2]'].options[frm['id[2]'].length]=new Option(txt2[opt],opt); } } i1(document.cart_quantity); function chksel() { var ok=true; if (this['id[1]'].value==0) ok=false; if (this['id[3]'].value==0) ok=false; if (this['id[2]'].value==0) ok=false; if (!ok) alert('Valitse tuotteen ominaisuudet ennen lis??mist? ostoskoriin.'); return ok; } document.cart_quantity.onsubmit=chksel; //--></SCRIPT> In my other stores with exaclty the same pad-files (but with some differencies in other files) there is everything you need: <script LANGUAGE="JavaScript"><!-- var stk={119:{15:{157:1,57:1},16:{157:1,115:1}},121:{15:{157:1,115:1},16:{157:1,115: 1}}}; var txt4={15:'1',16:'2'}; var txt2={157:'vaaleanpunainen',115:'musta/leopardi',57:'Indio rubiininpunainen'}; function i8(frm) { frm['id[4]'].length=1; etc. And I've checked that in the product_stock -table there is all the needed combinations, like this: 1-14,2-10,3-24 or 1-14,2-17,3-24 and so on... There is at least one or two products in almost every possible combinations so outsold products are not the reason either. I have tried to solve this problem about two workingdays now, without any luck. So I'm quite desperate already. I don't assume that anyone could fix this for me, but if there is some adorable person who could show me the way... Where I should look next? What can I do to find the problem? I'd really appriciate any help or suggestions! Jenna Quote Link to comment Share on other sites More sharing options...
JennaR Posted December 30, 2005 Author Share Posted December 30, 2005 Sorry, I thought I wrote this under OTPro -topic but I seemed to be wrong. And I can't move this to the right place anymore - sorry :huh: ... Jenna 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.