Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

shaytaan

Pioneers
  • Posts

    175
  • Joined

  • Last visited

Everything posted by shaytaan

  1. Realy usefull add-on, but should the update procedure be manually by copying the categories one more time and delete the old one?
  2. Hello Chris, First thanks alot for this fabulous contribution :thumbsup: I have just one question, is it possible to add php codes inside div? I tried to add something like this, but the php scripts are totally ignored <div class="subcats"> <table width="785" height="300" border="0" cellspacing="0" cellpadding="0" class="index_bg1" > <tr> <td width="360" rowspan="2" valign="top" style="padding-left:40;"> <?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS, 'categories_id=413', NONSSL) . '"><img src="images/design/forside_intro/laptop.png" alt="TOMTOM ONE XLT EUROPE" name="TOMTOM ONE XLT EUROPE" border="0" id="TOMTOM ONE XLT EUROPE"></a>'; ?> </td> <td width="425" height="210" valign="top" style="padding-top:30; padding-right:35;"> <div class="main40">Laptops on sale</div> <div class="main15" style="padding-top:10;"> dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text </div> <div class="newPrice" style="padding-top:20;"> Some other dummy text dummy text</div></td> </tr> <tr> <td height="90" valign="top" style="padding-top:30; padding-right:35;" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS, 'categories_id=413', NONSSL) . '">' . tep_image_button('show_new.gif' ) . '</a></p>'; ?></td> </tr> </table> </div> Regards Adam
  3. Hi Christian, First I'd like to thank you for this very nice contribution. well done :thumbsup: And as "KJ Miller" also mentioned we would like to send a simple/osc standard order confirmation when order is made at "checkout_process.php" and send the PDF invoice after updating the order status to deleverd. This way there won't be any extra delay at "checkout_process.php" and no legal issue about sending the invoice before the order confirmation And one more request/question. How to add an invoice date that should be = "order status date" Thanks Adam
  4. he he.. sorry it shows like that because of the copy and paste on the forum
  5. I don't understand, it's all the same :blink:
  6. 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+"&currency="+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+"&currency="+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]+"&currency="+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]+"&currency="+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>
  7. I want to save my sitemaps to a category (not root) I created a category called sitemaps and set the chmod to 777 In file sitemap.class.php I changed line 526 from this $this->savepath = DIR_FS_CATALOG; to this $this->savepath = DIR_FS_CATALOG . 'sitemaps'; Now it make the xml file inside the sitemaps category My question is "Do I need to change other files (gss.xsl, sitemaps.index.php) too?" thanks for help and this fantastic contribution
  8. Hello Jack, What is the best configuration on Text Control page and Fill Tags? What is the best configuration for each page to not have many repeatation on google? HTTA: HTDA: HTKA: HTCA: Fill products meta description with Products Description with how many characters? I had 14000 hits on my site: but now I have 260 hits and others are repeatation :( thanks alot
  9. First, thanks alot for this wonderfull contribution, well done :thumbsup: I have a little request for the author or anyone else with PHP skills. I want to make it this way: If stock is only 0 then show the preorder message and make checkout possible, If stock is -1 or less then don't checkout By this way I can show the status of 0 stock to ready for order from my vendor and if it's -1 or less then product isn't ordreable from my vendor. Thanks alot
  10. Thanks alot for your help nate, I tried, but my skills with js is not that high yet :sweating: Is anyone in the house who can solve this, please B)
  11. Hi I have only styles for hors. menu in my stylesheet Here is a screenshot of what I mean ;) Adam
  12. Yes, you should be able to make those types of style adjustments by the stylesheet.. It tried my best but can't make it... Please an example ;)
  13. Sorry wrong section :) thought it was for ccc
  14. Talking of Dynamenu.. If you use dynamenu horizotal menu then you have to commet out line 305 (window.onload = loadHandler; ) in layersmenu.js to make onload work for custom computer creator
  15. Thanks for your time, but it's not showing anything up :(
  16. Well done :thumbsup: very usefull contribution for ads or info/picture for categories :) Actualy we can add anything inside that if statement :) Is it possible to make it work for manufacturers and subcategories too? I made something like this but it's not working for manufacturers <?php $lewandert_query = tep_db_query("select c.manufacturers_id from " . TABLE_MANUFACTURERS . " c, " . TABLE_MANUFACTURERS_INFO . " cd where c.manufacturers_id = '" . (int)$current_manufacturers_id . "' and cd.manufacturers_id = '" . (int)$current_manufacturers_id . "' and cd.manufacturers_id = '" . (int)$manufacturers_id . "'"); $lewandert = tep_db_fetch_array($lewandert_query); ?> <?php if ($lewandert['manufacturers_id'] == '9') picture/text/info { ?> ?> thanks
  17. Hi Is there any way to keep the style of horizitem while hovering the horizsubmenu? thanks
  18. You have to put the css codes in your stylesheet.css to make it work! THis is the standard style codes, put it in your stylesheet.css /* $Id: dynamenu_for_osc_styles.txt,v 1.00 2006/05/07 20:04:02 nate_02631 Exp $ Dynamenu for osCommerce CSS Definitions osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License Below are styles to be included in your catalog stylesheet (stylesheet.css) for use with Dynamenu for osCommerce. All the CSS declarations for various menu styles are included below. You need only include the style for the type of menu you plan to use in your store template (of course feel free to paste them all in if experimenting). The plain and DHTML menus also work with a set of templates found in the /includes/functions/dynamenu/templates folder, but in just about all cases modifying the styles below should net you the results you want. */ /*-------------------------------------*/ /* Horizontal Drop-Down Menu Style */ /*-------------------------------------*/ .horbar { /* Color of main horizontal menubar and border */ color: black; background-color: #e6e7e6; border: 1px outset #525252; } .horizitem { /* Behaviour of main horizontal menu items, leave as is for proper operation */ float: left; white-space: nowrap; } .horizitem a { /* Font style, size of submenu items */ font-family: Verdana, Arial, sans-serif; font-size: 12px; text-decoration: none; position: relative; display: block; } .horizitem a:link, .horizitem a:visited { /* Font style & color of main menu items */ color: #000000; text-decoration: none; } .horizitem a:hover { /* Font style & color, background menu color of main menu item when hovered over */ color: #ffffff; background-color: #21459c; text-decoration: none; } .horizitem a:active { /* Font style & color, background menu color of main menu item when clicked */ color: #ffff00; background-color: #666666; text-decoration: none; } .horizsubmenu { /* Behaviour of sub-menu items - leave as is for proper operation of submenus */ position: absolute; left: 0; top: 0; visibility: hidden; } .horizsubframe { /* Color of submenu item and border */ background-color: #e6e7e6; border: 2px outset #fdfefd; position: relative; display: block; } .horizsubitem { /* Behaviour of sub-menu items - leave as is for proper operation of submenus */ text-align: left; white-space: nowrap; } .horizsubitem a { /* Font style, size of submenu items */ font-family: Verdana, Arial, sans-serif; font-size: 12px; text-decoration: none; position: relative; display: block; } .horizsubitem a:link, .horizsubitem a:visited { /* Font color, style of submenu items */ color: #000000; font-size: 12px; text-decoration: none; } .horizsubitem a:hover { /* Font color, style, background submenu color of submenu item when hovered over */ color: #ffffff; background-color: #21459c; text-decoration: none; } .horizsubitem a:active { /* Font color, style, background submenu color of submenu item when clicked */ color: #ffff00; background-color: #666666; text-decoration: none; } .horizsubitem .horizfwdarr, .horizitem .horizfwdarr { /* Positioning of right arrow for submenus */ position: absolute; top: 5px; right: 8px; } .dmselected { /* Style override for selected category tree */ background-color: #ccc; font-weight: bold; } .horbar .dmselected { /* Style override for selected root category */ background-color: #999; } /*---------------------------------*/ /* Vertical Fly-Out Menu Style */ /*---------------------------------*/ .verbar { /* Color of main vertical menubar and border */ color: black; background-color: #e6e7e6; border: 1px outset #fdfefd; } .vertitem { /* Behaviour of main vertical menu items, leave as is for proper operation */ text-align: left; white-space: nowrap; } .vertitem a { /* Font style, size of main menu items */ font-family: Verdana, Arial, sans-serif; font-size: 12px; text-decoration: none; position: relative; display: block; } .vertitem a:link, .vertitem a:visited { /* Default font style & color of main menu items */ color: #000000; text-decoration: none; } .vertitem a:hover { /* Font style & color, background menu color of main menu item when hovered over */ color: #ffffff; background-color: #21449c; text-decoration: none; } .vertitem a:active { /* Font style & color, background menu color of main menu item when clicked */ color: #ffff00; background-color: #666666; text-decoration: none; } .vertsubmenu { /* Behaviour of sub-menu - leave as is for proper operation of submenus */ position: absolute; left: 0; top: 0; visibility: hidden; } .vertsubframe { /* Color of submenu item and border */ background-color: #e6e7e6; border: 2px outset #fdfefd; position: relative; display: block; } .vertsubitem { /* Behaviour of sub-menu - leave as is for proper operation of submenus */ text-align: left; white-space: nowrap; } .vertsubitem a { /* Font style, size of submenu items */ font-family: Verdana, Arial, sans-serif; font-size: 12px; text-decoration: none; position: relative; display: block; } .vertsubitem a:link, .vertsubitem a:visited { /* Default font style & color of submenu items */ color: #000000; text-decoration: none; } .vertsubitem a:hover { /* Font style & color, background submenu color of submenu item when hovered over */ color: #ffffff; background-color: #21449c; text-decoration: none; } .vertsubitem a:active { /* Font style & color, background submenu color of submenu item when clicked */ color: #ffff00; background-color: #666666; text-decoration: none; } .vertsubitem .vertfwdarr, .vertitem .vertfwdarr { /* Positioning of right arrow for submenus */ position: absolute; top: 5px; right: 8px; } .dmselected { /* Style override for selected category tree */ background-color: #ccc; font-weight: bold; } .verbar .dmselected { /* Style override for selected root category */ background-color: #999; } /*---------------------------*/ /* Tree and Plain Menu Style */ /*---------------------------*/ .treemenudiv { /* Behaviour of tree/plain menu item - leave as is for proper performance */ display: block; white-space: nowrap; } .phplmbodytable { /* Class of table cells containing plain menus */ } .phplmnormal { /* Font size & color of unlinked menu items */ color: #000000; font-size: 13px; text-decoration: none; } a.phplm:link, a.phplm:visited { /* Font color, style of linked & visited menu items */ color: #003300; font-size: 13px; text-decoration: none; } a.phplm:hover { /* Font color, style of menu items when hovered over */ color: #841212; background-color: #ccc; font-size: 13px; text-decoration: none; } a.phplm:active { /* Font size & color of menu items when clicked */ color: #ff0000; font-size: 13px; text-decoration: none; } .dmselected { /* Style overide for selected category tree */ background-color: #ccc; font-weight: bold; }
  19. One question: Is there a way to upload a unique picture for every category and for every system in ccc? Right now it says Please Choose Below and there are category names and desc. but I want a picture too. And there is one standard picture for the all system :( I want a unique picture for every system I have seen some stores with ccc who did this, anyone wanna contribute this, please :)
  20. He he he.... Thanks ALOT :thumbsup: it's working :) no need to touch those update files :lol: Now I'll start my engines and start designing :sweating:
  21. What did you for solving the problem with "not adding to cart"?
  22. Is here anyone who solved the problem with "ccc not adding to shopping cart" yet?
  23. I wrote this LONG time ago and NO ONE replied :blush: http://www.oscommerce.com/forums/index.php?showtopic=224081
×
×
  • Create New...