ElPuebloUnido Posted December 17, 2006 Share Posted December 17, 2006 Please Meisterbartsch... few days ago I see your compubuild.php and I love how it works: it's really simple and easy! But I'd like to know if you already end to work on the other changes also because that one is only the admin part. Thanks and compliment for your implementations!!!! Quote Link to comment Share on other sites More sharing options...
infowarcom Posted December 19, 2006 Share Posted December 19, 2006 (edited) i have this error can any one halp me pls  whwn i open  http://localhost/2/compbuild.php  Fatal error: Cannot redeclare tep_show_category() (previously declared in C:\Program Files\xampp\htdocs\2\includes\header.php:175) in C:\Program Files\xampp\htdocs\2\includes\boxes\categories.php on line 59 Edited December 19, 2006 by infowarcom Quote Link to comment Share on other sites More sharing options...
Ozguru Posted December 25, 2006 Share Posted December 25, 2006 I have installed PC Creator pro 2.34 and the program seems to be up and running but when i go to add a product i get this at the bottom of the page  1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') or (product2_id = )) and pd1.language_id =1 and pd2.language_  SELECT product1_id as p1id, pd1.products_name as p1name, catdes.categories_name as p1cat, product2_id as p2id, pd2.products_name as p2name, catdes2.categories_name as p2cat FROM compbuild_dependence as cd INNER JOIN products_description as pd1 on pd1.products_id = cd.product1_id INNER JOIN products_description as pd2 on pd2.products_id = cd.product2_id INNER JOIN products_to_categories as ptc on ptc.products_id = product1_id INNER JOIN categories_description as catdes on catdes.categories_id = ptc.categories_id INNER JOIN products_to_categories as ptc2 on ptc2.products_id = product2_id INNER JOIN categories_description as catdes2 on catdes2.categories_id = ptc2.categories_id WHERE ((product1_id = ) or (product2_id = )) and pd1.language_id =1 and pd2.language_id =1 and catdes.language_id=1 and catdes2.language_id=1  [TEP STOP]  also i get  ERROR_CACHE_DIRECTORY_DOES_NOT_EXIST in a red bar at the top of the page when i enter the build computer in settings section in admin  at the moment i only have top catorgories with no items in them and have easy populate installed but havent used it  i have also removed the 2 other langauges german and spanish and am running english only  Please help  my site as it is is at http://www.axiomcomputers.com   thanks in advance Quote Link to comment Share on other sites More sharing options...
Ozguru Posted December 25, 2006 Share Posted December 25, 2006 I have installed PC Creator pro 2.34 and the program seems to be up and running but when i go to add a product i get this at the bottom of the page 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') or (product2_id = )) and pd1.language_id =1 and pd2.language_  SELECT product1_id as p1id, pd1.products_name as p1name, catdes.categories_name as p1cat, product2_id as p2id, pd2.products_name as p2name, catdes2.categories_name as p2cat FROM compbuild_dependence as cd INNER JOIN products_description as pd1 on pd1.products_id = cd.product1_id INNER JOIN products_description as pd2 on pd2.products_id = cd.product2_id INNER JOIN products_to_categories as ptc on ptc.products_id = product1_id INNER JOIN categories_description as catdes on catdes.categories_id = ptc.categories_id INNER JOIN products_to_categories as ptc2 on ptc2.products_id = product2_id INNER JOIN categories_description as catdes2 on catdes2.categories_id = ptc2.categories_id WHERE ((product1_id = ) or (product2_id = )) and pd1.language_id =1 and pd2.language_id =1 and catdes.language_id=1 and catdes2.language_id=1  [TEP STOP]   Ok i seem to have fixed this problem but still have this error  ERROR_CACHE_DIRECTORY_DOES_NOT_EXIST in a red bar at the top of the page when i enter the build computer in settings section in admin  I have made sure there is a temp & tmp set to 777 but i styill get error  and none of my prices show in the shop let alone in the pc pro creator   Also where do i go to change the size of the font on the catagory ie Cpu motherbord as they are bold and very large even at 1440 x 990 screen size  this is killing me i have installed and uninstalled osc 8 times to reinstall this contib Quote Link to comment Share on other sites More sharing options...
Ozguru Posted December 29, 2006 Share Posted December 29, 2006 Hi all i fixed my money problem by changing the default currency AUD from USD   I am still having trouble with dependanceies & assembly fee  as there isnt really a manual for this can some one write a small doc on it or post here to help a dumb person like me  Im sorry to keep asking for help but i dont know what else to do.  also loking at a few of the images that show the build panel in admin showing dependancies with 939 cpu and 775 cpu mine dosent show up like that do i have the wrong verion   Patricks site looks awesome with i could get the dependacies to work  Thanks all Quote Link to comment Share on other sites More sharing options...
flatul Posted January 1, 2007 Share Posted January 1, 2007 Ok i seem to have fixed this problem  Could you please tell how you fixed it ? Thanks in advance...   regards Quote Link to comment Share on other sites More sharing options...
Ozguru Posted January 1, 2007 Share Posted January 1, 2007 Could you please tell how you fixed it ? Thanks in advance...regards   all i did was go into /includes/language/english.php  around line 39  define('LANGUAGE_CURRENCY', 'USD');   and change to define('LANGUAGE_CURRENCY', 'AUD'); for australia or to your country currency code GBP for uk euro for europe and so on check with xe.com to find out your country currency code   hope this helps Quote Link to comment Share on other sites More sharing options...
chooch Posted February 12, 2007 Share Posted February 12, 2007 I need to make a site for a client who wants to sell custom create computer but there are two contributions in the osC downloads to choose from.  One is the PC Pro Creator and the other is this one: Custom Create computer  Can anyone tell me what are the main differneces between the two? And what are the main pro's and con's of one over the other.  Any tips on which one to choose will be greatly appreciated. Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!  Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?  There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.  CHOOCH Link to comment Share on other sites More sharing options...
cybermaster87 Posted February 19, 2007 Share Posted February 19, 2007 Hi everybody,  at first i want to say that this contribution is very good but it works only on IE.  If i use Firefox i can't choose any product and i get some errors like:  >> uncaught exception: Die Erlaubnis für das Lesen der Eigenschaft HTMLDocument.mainform wurde verweigert (translation: error on reading properties of HTMLDocument.mainform : access denied)  I dont know what i should do to make pc pro running on firefox too because its very necessary for me. :'(  Maybe someone can help me!!?!  thanks :blush:  cybermaster Quote Link to comment Share on other sites More sharing options...
chooch Posted February 21, 2007 Share Posted February 21, 2007 Maybe someone can help me!!?! I am not familiar with the contribution but am waiting for a reply to my post.... I think this thread is not very popular. Â You may well try finding the answer somewhere else - I am going to install both custom contributions just to see how they operate and work out which is the best on to use. Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Â Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? Â There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. Â CHOOCH Link to comment Share on other sites More sharing options...
Ozguru Posted February 21, 2007 Share Posted February 21, 2007 Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?  There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.  CHOOCH  Well said   BUT  Its hard enough to get answers from the leaders of the forums, i have asked a few questions and helped others in this forum. but the biggests request i have seen is for dependancies in the build program ... the forum leader seems to have his version of the contrib working and has said he would let the rest of us know how... but nothing since before 10 month 2006.  why dont the people with the know how ie. the people who make the mods, visit and give updates or just turn around an say sorry we are no longer going to update or continue this mod / contibution because we dont have time or we dont know how or we dont care anymore... this would help a lot of people out there by letting other users know its not gonna be fixed or updated or continued  you ask us to help why dont the forum leaders practice what they preach Quote Link to comment Share on other sites More sharing options...
chooch Posted February 21, 2007 Share Posted February 21, 2007 (edited) Well said BUT  Its hard enough to get answers from the leaders of the forums, i have asked a few questions and helped others in this forum. but the biggests request i have seen is for dependancies in the build program ... the forum leader seems to have his version of the contrib working and has said he would let the rest of us know how... but nothing since before 10 month 2006.  why dont the people with the know how ie. the people who make the mods, visit and give updates or just turn around an say sorry we are no longer going to update or continue this mod / contibution because we dont have time or we dont know how or we dont care anymore... this would help a lot of people out there by letting other users know its not gonna be fixed or updated or continued  you ask us to help why dont the forum leaders practice what they preach  I don't know what you are refering to with regards to me but just to give some clarification, I agree with the comment about the people who add mods to contributions and then don't avail themselves to post requests on the forum.  As for forum leader not practising what they preach, surely that sly comment can't be directed at me because I haven't a clue why you would say that to me? I think you are mistaking me for what you call a 'forum leader'. This part of your post is totally irrelevant: you ask us to help why dont the forum leaders practice what they preach  BTW: I didn't ask for 'help' I asked for 'tips'. I simply didn't have enough time to add two different custom comp contributions on two different stores and then check/test out their usability because I was approached for a job for a client at short notice. I am not holding my breadth for a reply on this thread so have already started testing out the contributions and will go from there.  Who are the forum leaders not practising what they preach, let us all know who or what you mean? Edited February 21, 2007 by chooch Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!  Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?  There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.  CHOOCH Link to comment Share on other sites More sharing options...
chrisbg Posted March 22, 2007 Share Posted March 22, 2007 (edited) Hi, i have a big problem...As you can see on the pic, i can't select anything from the table, and what;s the strange code above? I install code from how to add style to cents currencies and this problem appear, what's wrong, please, HELP me..... Â Edited March 22, 2007 by chrisbg Quote Link to comment Share on other sites More sharing options...
Ozguru Posted March 23, 2007 Share Posted March 23, 2007 (edited) (Ozguru @ Feb 21 2007, 12:39 PM) Well said BUT  Its hard enough to get answers from the leaders of the forums, i have asked a few questions and helped others in this forum. but the biggests request i have seen is for dependancies in the build program ... the forum leader seems to have his version of the contrib working and has said he would let the rest of us know how... but nothing since before 10 month 2006.  why dont the people with the know how ie. the people who make the mods, visit and give updates or just turn around an say sorry we are no longer going to update or continue this mod / contibution because we dont have time or we dont know how or we dont care anymore... this would help a lot of people out there by letting other users know its not gonna be fixed or updated or continued  you ask us to help why dont the forum leaders practice what they preach  I don't know what you are refering to with regards to me but just to give some clarification, I agree with the comment about the people who add mods to contributions and then don't avail themselves to post requests on the forum. As for forum leader not practising what they preach, surely that sly comment can't be directed at me because I haven't a clue why you would say that to me? I think you are mistaking me for what you call a 'forum leader'. This part of your post is totally irrelevant: you ask us to help why dont the forum leaders practice what they preach  BTW: I didn't ask for 'help' I asked for 'tips'. I simply didn't have enough time to add two different custom comp contributions on two different stores and then check/test out their usability because I was approached for a job for a client at short notice. I am not holding my breadth for a reply on this thread so have already started testing out the contributions and will go from there.  Who are the forum leaders not practising what they preach, let us all know who or what you mean?  This post has been edited by chooch: Feb 22 2007, 09:56 AM     Chooch  Sorry mate :'( my comment wasnt directed at you i was just venting i was :angry: at people who say they are going to do something and havent as yet come through, i know that people do mods and upgrades out of the goodness of their hearts, but it gets really frustrating when they say in .nfo's and in forums they are going to do something and they dont.   i publicly appologise to you  i am sorry for making you feel uncomfotable and for hurting your feelings this was not my intention.   Ozguru AKA Bryen Edited March 23, 2007 by Ozguru Quote Link to comment Share on other sites More sharing options...
zmeutz Posted March 23, 2007 Share Posted March 23, 2007 I have installed PC Creator pro 2.34 and the program seems to be up and running but when i go to add a product i get this at the bottom of the page 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') or (product2_id = )) and pd1.language_id =1 and pd2.language_  SELECT product1_id as p1id, pd1.products_name as p1name, catdes.categories_name as p1cat, product2_id as p2id, pd2.products_name as p2name, catdes2.categories_name as p2cat FROM compbuild_dependence as cd INNER JOIN products_description as pd1 on pd1.products_id = cd.product1_id INNER JOIN products_description as pd2 on pd2.products_id = cd.product2_id INNER JOIN products_to_categories as ptc on ptc.products_id = product1_id INNER JOIN categories_description as catdes on catdes.categories_id = ptc.categories_id INNER JOIN products_to_categories as ptc2 on ptc2.products_id = product2_id INNER JOIN categories_description as catdes2 on catdes2.categories_id = ptc2.categories_id WHERE ((product1_id = ) or (product2_id = )) and pd1.language_id =1 and pd2.language_id =1 and catdes.language_id=1 and catdes2.language_id=1  [TEP STOP]  also i get  ERROR_CACHE_DIRECTORY_DOES_NOT_EXIST in a red bar at the top of the page when i enter the build computer in settings section in admin  at the moment i only have top catorgories with no items in them and have easy populate installed but havent used it  i have also removed the 2 other langauges german and spanish and am running english only  Please help  my site as it is is at http://www.axiomcomputers.com thanks in advance  I have the same problem :( can someone tell me how to make this work?? thanks! Quote mess whit the best - die like the rest! Link to comment Share on other sites More sharing options...
chooch Posted March 24, 2007 Share Posted March 24, 2007 (edited) Sorry mate :'( my comment wasnt directed at you i was just venting i was :angry: at people who say they are going to do something and havent as yet come through, i know that people do mods and upgrades out of the goodness of their hearts, but it gets really frustrating when they say in .nfo's and in forums they are going to do something and they dont.i publicly appologise to you No need to apologise, I understand your frustrations. Â Â i am sorry for making you feel uncomfotable and for hurting your feelings this was not my intention. Ozguru AKA Bryen No my friend, I have been on the osC forums for a very long time and my feelings have never been hurt. I have learn't though, patience is important. You have not offended me :thumbsup: Edited March 24, 2007 by chooch Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Â Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? Â There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. Â CHOOCH Link to comment Share on other sites More sharing options...
chooch Posted March 24, 2007 Share Posted March 24, 2007 I have the same problem :( can someone tell me how to make this work?? thanks! Which php version are your running? You do know there is a fix for php5 available incase you are on php5 Quote Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back! Â Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you? Â There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere. Â CHOOCH Link to comment Share on other sites More sharing options...
zmeutz Posted March 24, 2007 Share Posted March 24, 2007 is work only on php5? I use 4.4.5 (Zend: 1.3.0) :( Quote mess whit the best - die like the rest! Link to comment Share on other sites More sharing options...
Bilal81 Posted March 27, 2007 Share Posted March 27, 2007 Please help! After installing ppc-2006-08-24, I get the follow error when i want to add a product.   I'm looking here the whole day for an awnser but i didn't find anything. I have the same problem when I go to catalog to add a new product. Quote Link to comment Share on other sites More sharing options...
kunal247 Posted March 28, 2007 Share Posted March 28, 2007 Any fix available for Prices Inc & Excl VAT as yet? Kunal Is there a working fix avilable now for Prices inc & excl VAT?  Kunal :rolleyes: Quote Link to comment Share on other sites More sharing options...
Guest Posted April 16, 2007 Share Posted April 16, 2007 Is there a working fix avilable now for Prices inc & excl VAT? Kunal :rolleyes: Hi i'm sorry to say that i am not working on this contribution any more because i don't need it anymore. But I can tell you that i tried almost everything to make it work, but no way. My knowledge of PHP is very limited, and of JS almost null, and almost all the code of this contrib is JS. So maybe some1 who knows JS can be able to find a solution, but i couldn't at all. Also another way could be to change the query and get the price apart from the description, but i don't have time enough.  Sorry :'( Quote Link to comment Share on other sites More sharing options...
eudomain Posted April 24, 2007 Share Posted April 24, 2007 i have this error can any one halp me pls whwn i open  http://localhost/2/compbuild.php  Fatal error: Cannot redeclare tep_show_category() (previously declared in C:\Program Files\xampp\htdocs\2\includes\header.php:175) in C:\Program Files\xampp\htdocs\2\includes\boxes\categories.php on line 59  I have same problem, can anyone help please ? my error reads when i open compbuld.php: Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/micro/public_html/catalog/includes/header.php:190) in /home/micro/public_html/catalog/includes/boxes/categories.php on line 13 Quote Link to comment Share on other sites More sharing options...
eudomain Posted April 24, 2007 Share Posted April 24, 2007 i have this error can any one halp me pls whwn i open  http://localhost/2/compbuild.php  Fatal error: Cannot redeclare tep_show_category() (previously declared in C:\Program Files\xampp\htdocs\2\includes\header.php:175) in C:\Program Files\xampp\htdocs\2\includes\boxes\categories.php on line 59  I have same problem, can anyone help please ? my error reads when i open compbuld.php: Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/micro/public_html/catalog/includes/header.php:190) in /home/micro/public_html/catalog/includes/boxes/categories.php on line 13 Quote Link to comment Share on other sites More sharing options...
eudomain Posted April 24, 2007 Share Posted April 24, 2007 I have same problem, can anyone help please ?my error reads when i open compbuld.php: Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/micro/public_html/catalog/includes/header.php:190) in /home/micro/public_html/catalog/includes/boxes/categories.php on line 13 Â I installed the complete os commerce for testing to another directory and the compbuild area works. So i managed to track that this module is not working on my directory where i have a template installed. Can this help out tracking my problem since i need to install this module on the template i purchased not on the default os commerce template? Quote Link to comment Share on other sites More sharing options...
shaytaan Posted April 25, 2007 Share Posted April 25, 2007 I got the builder2.php from a friend which should work with these (cpu, motherboard and PSU) dependence. Please someone look at the script and se how it's working!!  <script language="JavaScript"> var tindex=0; var final_sum=0,sum=0,shipmentprice=0; var fields=27; var price = new Array(); var product = new Array(); var pid = new Array(); var recid = new Array(); var ammount = new Array(); var categ = new Array(); var prods_counter=0; var default_line="";//"<img src='/build/arrow.gif' align='absmiddle' width='17' height='17'>"; var fmTimer; var faded=true; var fadeObj; for (i=0;i<=fields;i++){ price[i] = 0; product[i] = "0"; pid[i] = ""; recid[i] = ""; ammount[i] = 0; categ[i]=""; } //--------------------- Print Field ---------------------------- function print_field(category,indx,row,picname,assemb_id){ categ[indx]=category; document.write ("<tr class=image_border1 onmouseover=\"this.style.backgroundColor='white';\" onmouseout=\"this.style.backgroundColor='';\" height=70>" +"<th onClick=\"oFrame.style.display='none'\" width=120 align=center ><img src='./build/img/"+picname+"'><br><span class=cart_dropdown1>"+category+"</span></th><th>" +"<table style='border-collapse: collapse' bordercolor='#628AC5' border=1>" +"<tr>" +"<th onclick='show_products(event,this,"+indx+","+row+","+assemb_id+")' style='cursor: hand;' width=100%>" +default_line+"</th>" +"<th id=\"productselect"+row+"\" onclick=\"show_products(event,this,"+indx+","+row+","+assemb_id+")\" style='cursor: hand;' >" +"<input type=\"hidden\" id='prod_dep"+row+"' value='0'>" +"<img src='./build/img/scroll.gif' width='20' height='15'></th>" +"<th onClick=\"oFrame.style.display='none'\" valign=middle><input type=\"button\" value=\"info\" style=\"border: #C4B0AB 0px solid; background-color: white; color: #5C5C5C; font-weight: normal\" onclick='show_desc("+indx+")'></th>" +"</tr></table>" +"</th>" +"<th align='right' onClick=\"oFrame.style.display='none'\" ></th>" +"<th align='center' onClick=\"oFrame.style.display='none'\" width=35>" +"<input type='hidden' name='products_id["+indx+"]' value='-1'>" +"<select name='qty["+indx+"]' onchange=\"calc_subtotal(mainform);calc_total(mainform);\" class=\"blaafelter\" size=\"1\" maxlength=\"10\" style=\"width:35px\">"); document.write ("<option value=1 selected>1</option>"); for (i=2;i<=10;i++) document.write ("<option value="+i+">"+i+"</option>"); document.write ("</select></th></tr>"); } //--------------------- Fader ---------------------------- function Fade(){ if (!faded) { faded=true; faderObj.innerHTML=default_line; window.clearTimeout(fmTimer); }else{ faded=false; fmTimer=window.setTimeout("Fade()",2000); } } //--------------------- Fade Row ---------------------------- function fade_row(row){ if (!faded){ faded=true; faderObj.innerHTML=default_line; window.clearTimeout(fmTimer); } var note=""; // switch (row){ // case 2: // if (!recid[1]) note=note1; // break; // case 3: // if (!recid[2]) note=note2; // break; // } if (note!="") { faderObj = document.getElementById("prod_table").rows[row].cells[1].childNodes[0].rows[0].cells[0]; faderObj.innerHTML=default_line+note; Fade(); return false; }else return true; } //--------------------- Show Products ---------------------------- function show_products(evt,e,pindex,row,assemb_id,dep_cat){ if (!dep_cat) dep_cat=0; if (pindex!=tindex){ document.getElementById("oFrame").style.display="none"; tindex=pindex; } if (!fade_row(pindex+1)) return; var dep_cat=document.getElementById("prod_dep"+row).value; sURL="prduct_list.php?dep_cat="+dep_cat+"&assemb_id="+assemb_id+"&row="+pindex+"¤cy="+currency+"&pindex="+pindex; for (i=0;i<recid.length;i++) { sURL+="&idp"+i+"="+recid[i]; } //var sURL="prduct_list.php?assemb_id="+assemb_id+"&row="+pindex+"¤cy="+currency+"&pindex="+pindex+"&dcpu="+recid[row]+"&dmem="+product[pindex]; if (document.getElementById("oFrame").innerHTML==""){ document.getElementById("oFrame").innerHTML="<iframe name='oiFrame' id='oiFrame' height='100%' width=100% border='0' frameborder='0'></iframe>"; } var buffer="<html><head><style>TD,TH,BODY{font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:9pt;}TH{background-color:#86A5D2;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#0086A5D2',EndColorStr='#C0FFFFFF');font-style:italic;border:1px solid Black;cursor:default;}.select_table{BORDER-COLLAPSE:collapse;border:1px ridge;background-color:#F5F5F5;}tr{cursor:hand;}BODY{overflow: auto;margin: 0 0 0 0;background-color: #F5F5F5;}</style>"; buffer+="<table style='BORDER-COLLAPSE: collapse' borderColor='#86A5D2' border='1' width='100%'>"; switch (pindex){ // case 1: // add_product('-1','','','','2'); // sURL+="&select="+product[pindex]+"¤cy="+currency; // oiFrame.document.write(buffer+text_please_wait); // window.open(sURL,"oiFrame"); // break; // case 2: // oiFrame.document.write(buffer+text_please_wait); // window.open(sURL,"oiFrame"); // break; // case 0: // add_product('-1','','','','1'); // add_product('-1','','','','2'); default : sURL+="&select="+product[pindex]+"¤cy="+currency; oiFrame.document.write(buffer+text_please_wait); window.open(sURL,"oiFrame"); if (pindex){ buffer+="<tr onmouseover=\"this.style.backgroundColor='#86A5D2';\" onmouseout=\"this.style.backgroundColor='';\" onclick=\"parent.add_product('','','','"+pindex+"','"+pindex+"');\"><td align='center' colspan=2><b>"+text_deselect_items+"</b></td></tr>"; oiFrame.document.write(buffer+loadRow(pindex)+"</table>"); window.open(sURL,"oiFrame"); } break; } if (document.getElementById("oFrame").style.display=="none") { var categoryid=-1; var aTag; tab=e.parentNode; //TR aTag=tab; var leftpos=0; var toppos=0; do { aTag = aTag.offsetParent; leftpos += aTag.offsetLeft; toppos += aTag.offsetTop; } while(aTag.tagName!="BODY"); var PopupHeight=200; var TotTop=tab.offsetTop+tab.offsetHeight +toppos; document.getElementById("oFrame").style.left =tab.offsetLeft+leftpos-90; // if (evt.clientY+PopupHeight+10>document.body.clientHeight){ // TotTop-=PopupHeight+tab.offsetHeight; // } document.getElementById("oFrame").style.height=PopupHeight; document.getElementById("oFrame").style.top = TotTop; document.getElementById("oFrame").style.width = tab.cells[0].offsetWidth+tab.cells[1].offsetWidth+240; document.getElementById("oFrame").style.display="inline"; } else{ document.getElementById("oFrame").style.display="none"; } } //--------------------- Load Row ---------------------------- function loadRow(indx){ var j; var buffer=""; for (j=0;(l[indx][j]);j++) buffer+=print_line(indx,j); if (!buffer) buffer = ""; return buffer; } //--------------------- Print Line ---------------------------- function print_line(row,line){ var buffer=""; if (l[row][line][1]){ var pdesc2 = l[row][line][1].replace(/:inc:/gi, '"') re2 = new RegExp ('\'', 'gi'); l[row][line][1] = l[row][line][1].replace(re2, ":tag:") buffer+= "<tr onclick=\"parent.add_product('"+l[row][line][0]+"','"+l[row][line][1]+"','"+l[row][line][2]+"','"+l[row][line][3]+"',"+l[row][line][4]+");\" onmouseover=\"this.style.backgroundColor='#86A5D2';\" onmouseout=\"this.style.backgroundColor='';\">" +"<td>"+pdesc2+"</td><td align='right' width=70> "+l[row][line][2]+""+currency+"</td></tr>"; }else{ buffer+=print_title(l[row][line][0]); } return buffer; } //--------------------- Print Title ---------------------------- function print_title(title){ return "<tr><th align='center' colspan='2'>"+title+"</th></tr>"; } //--------------------- Calculate Subtotal ---------------------------- function calc_subtotal(form){ var sum=0 for (i=0;i<=fields;i++){ if (price[i]>0){ // sum=sum+parseFloat(price[i]*(form.elements["qty["+(i-1)+"]"].selectedIndex+1)); // sum=sum+parseFloat(price[i].replace(",",".")*(form.elements["qty["+(i-1)+"]"].selectedIndex+1)); sum=sum+parseFloat(price[i]*(form.elements["qty["+(i-1)+"]"].selectedIndex+1)); } } var lines=form.select1.length var softprice=0; for (i=1;i<lines;i++){ if (form.select1.options(i).selected){ softprice+=parseFloat(form.select1.options(i).price)*parseFloat(form.qty100.selectedIndex+1); } } form.sum.value=formatnumber(sum+softprice); } //--------------------- Calculate Sum ---------------------------- function calc_total(form){ // alert(form.ass.value); // if (form.ass.value==1) { sum=formatnumber(parseFloat(5.00)); } form.totsum.value=currency_left+" "+formatnumber(parseFloat(form.sum.value))+" "+currency_right; } function calc_total_tmp(form){ var sum=0; var final_sum; for (i=0;i<=fields;i++){ if (price[i]>0){ // sum=sum+parseFloat(price[i]*(form.elements["qty["+(i-1)+"]"].selectedIndex+1)); sum=sum+parseFloat(price[i]*(form.elements["qty["+(i-1)+"]"].selectedIndex+1)); } } var lines=form.select1.length var softprice=0; for (i=1;i<lines;i++){ if (form.select1.options(i).selected){ softprice+=parseFloat(form.select1.options(i).price)*parseFloat(form.qty[100].selectedIndex+1); } } sum=formatnumber(sum+softprice); final_sum=sum; form.sum.value=final_sum; form.totsum.value=currency_left+" "+final_sum+" "+currency_right; } //--------------------- Enabel/Disable Payments ----------------------------' function show_payments(form){ if (form.payment_mode.options(form.payment_mode.selectedIndex).value!="CASH"){ form.payments.disabled =false; form.each.disabled =false; }else{ form.payments.options(0).selected = true; form.payments.disabled =true; form.each.disabled = true; } } //--------------------- ValidateForm ---------------------------- function ValidateForm(form){ var err=""; if (!pid[1]) err+="Please select CPU\n"; if (!pid[2]) err+="Please select Mother Board\n"; if (!pid[3]) err+="Please select Memory\n"; if (form.firstname.value=="") err+="No first name was entered\n"; if (form.lastname.value=="") err+="No last name was entered\n"; if (form.city.value=="") err+="No city was entered\n"; if (form.address.value=="") err+="No address was entered\n"; if (form.tel.value=="") err+="No telephone was entered\n"; if (err!=""){ alert(err); return false; } return true; } //--------------------- Form check before submission ---------------------------- function mainform_onsubmit(form,sact,fields) { if (form.sum.value=="0"){ alert ("Der skal vælges mindst et produkt!"); return false; } for (i=0;i<=fields;i++){ ammount[i+1]=form.elements["qty["+i+"]"].selectedIndex+1; } var urltemp="compbuild.php?action=add_products&products_id="; var urltempammount="&product_ammount=" form.product.value=""; form.pid.value=""; form.price.value=""; form.ammount.value=""; form.recid.value=""; for (i=0;i<=fields;i++){ form.product.value+=product[i]+"::"; form.pid.value+=pid[i]+"::"; form.price.value+=price[i]+"::"; form.ammount.value+=ammount[i]+"::"; //alert( recid[i]); form.recid.value+=recid[i]+"::"; if (recid[i]){ urltemp+=recid[i]+","; urltempammount+=ammount[i]+","; } } var lines=form.select1.length for (i=1;i<lines;i++){ if (form.select1.options(i).selected){ form.product.value+=form.select1.options(i).value+";;"; form.price.value+=form.select1.options(i).price; form.pid.value+=form.select1.options(i).pid; form.recid.value+=form.select1.options(i).recid; form.ammount.value+=(form.qty[100].selectedIndex+1)+";;"; } } if (sact==2){ urltemp+=urltempammount; form.action=urltemp; form.target="_self"; form.submit(); }else if (sact==1){ form.action="print.php"; form.target="_blank"; form.submit(); } } //----------------- Show Description --------------- function show_desc(row){ row++; if (recid[row]) window.open ("product_info.php?products_id="+recid[row],'new', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=Yes,re sizable=yes,copyhistory=yes'); } </script> Quote ?,???`???,?? God must love stupid people, he made so many ??,???`???,? 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.