Medoraurora
12-21-2006, 12:38 AM
How do you view / edit products once you have added them to a store? When I go to the "My Account" menu - and go through any of the sub menu folders (or select "edit sections & products"), I can see the names & images for sections I have created, but I can't see any of the individual products I made, neither within each section nor in the main store. They are all there when I view the store as a customer would see it - so I know they are there - but I can find no way to make changes to them now. Is there a function to edit / view products once you have finished adding them?
I've tried using both IE v7 and Firefox v1.5. With Firefox, under the red "Add Products" button and the "View by" drop menu (when viewing my stores / sections), I also get this stuff (instead of seeing products I've added):
var colors_list = new Array(); function updatePrice(prod, num, price_add){ if(!document.getElementsByName('base'+num+'_'+prod)[0]){ return; } if(!price_add){ price_add = 0; } var commission = getCommission(num, prod); var low = commission + parseFloat(document.getElementsByName('base'+num+'_'+prod)[0].value); low = Math.round(low*100); low = low/100; var high = parseFloat(low) + parseFloat(price_add); high = Math.round(high*100); high = high/100; low = addZeros(low); high = addZeros(high); if(high == low){ document.getElementById('range'+num+'_'+prod).innerHTML = "$"+low; }else{ document.getElementById('range'+num+'_'+prod).innerHTML = "$"+low+" to $"+high; } } function getCommission(num, prod){ var commission = parseFloat(document.getElementsByName('price'+num+'_'+prod)[0].value); var test = commission + ""; if(test.substring(test.indexOf("."), test.length).length > 3){ // Too many decimals commission = Math.floor(commission*100); }else{ commission = Math.round(commission*100); } commission = commission/100; if(commission > 50){ document.getElementsByName('price'+num+'_'+prod)[0].value = 50; return 50; }else if (commission < 0){ document.getElementsByName('price'+num+'_'+prod)[0].value = 0; return 0; }else if (!commission){ return 0; }else{ return commission; } } function addZeros(price){ price += ""; var dec_index = price.indexOf("."); if(dec_index != "-1"){ var extra_zero = price.substring(dec_index+1, price.length); if(extra_zero.length == "1"){ price += "0"; }else if (!extra_zero.length){ price += "00"; } }else{ price += ".00"; } return price; } function editProduct(prod){ document.getElementsByName('product_order_'+prod)[0].style.display = 'none'; document.getElementsByName('product_order_'+prod+'_edit')[0].style.display = 'block'; document.getElementsByName('title_'+prod)[0].style.display = 'none'; document.getElementsByName('title_'+prod+'_edit')[0].style.display = 'block'; document.getElementsByName('desc_'+prod)[0].style.display = 'none'; document.getElementsByName('desc_'+prod+'_edit')[0].style.display = 'block'; document.getElementsByName('price_'+prod)[0].style.display = 'none'; document.getElementsByName('price_'+prod+'_edit')[0].style.display = 'block'; var price = document.getElementsByName('price_'+prod); var price_edit = document.getElementsByName('price_'+prod+'_edit'); for(i=0; i< colors_list[productid][groupid].length; x++){ var objColor = document.getElementsByName("colors["+productid+"]["+colors_list[productid][groupid][x]+"]")[0]; if(objColor){ objColor.checked=checked; } } } function selectColorGroupHeader(productid, groupid){ var all_selected = true; for(var x=0; x < colors_list[productid][groupid].length; x++){ var objColor = document.getElementsByName("colors["+productid+"]["+colors_list[productid][groupid][x]+"]")[0]; if(objColor && !objColor.checked){ all_selected = false; break; } } if(all_selected){ document.getElementsByName("colorGroup["+productid+"]["+groupid+"]")[0].checked=true; }else{ document.getElementsByName("colorGroup["+productid+"]["+groupid+"]")[0].checked=false; } } //function hideProducts(){ // document.getElementById('products_display').style.display="none"; // document.getElementById('products_hidden').style.display="block"; // xajax_products_hidden(1); //} //function showProducts(){ // document.getElementById('products_display').style.display="block"; // document.getElementById('products_hidden').style.display="none"; // xajax_products_hidden(0); //}
I've tried using both IE v7 and Firefox v1.5. With Firefox, under the red "Add Products" button and the "View by" drop menu (when viewing my stores / sections), I also get this stuff (instead of seeing products I've added):
var colors_list = new Array(); function updatePrice(prod, num, price_add){ if(!document.getElementsByName('base'+num+'_'+prod)[0]){ return; } if(!price_add){ price_add = 0; } var commission = getCommission(num, prod); var low = commission + parseFloat(document.getElementsByName('base'+num+'_'+prod)[0].value); low = Math.round(low*100); low = low/100; var high = parseFloat(low) + parseFloat(price_add); high = Math.round(high*100); high = high/100; low = addZeros(low); high = addZeros(high); if(high == low){ document.getElementById('range'+num+'_'+prod).innerHTML = "$"+low; }else{ document.getElementById('range'+num+'_'+prod).innerHTML = "$"+low+" to $"+high; } } function getCommission(num, prod){ var commission = parseFloat(document.getElementsByName('price'+num+'_'+prod)[0].value); var test = commission + ""; if(test.substring(test.indexOf("."), test.length).length > 3){ // Too many decimals commission = Math.floor(commission*100); }else{ commission = Math.round(commission*100); } commission = commission/100; if(commission > 50){ document.getElementsByName('price'+num+'_'+prod)[0].value = 50; return 50; }else if (commission < 0){ document.getElementsByName('price'+num+'_'+prod)[0].value = 0; return 0; }else if (!commission){ return 0; }else{ return commission; } } function addZeros(price){ price += ""; var dec_index = price.indexOf("."); if(dec_index != "-1"){ var extra_zero = price.substring(dec_index+1, price.length); if(extra_zero.length == "1"){ price += "0"; }else if (!extra_zero.length){ price += "00"; } }else{ price += ".00"; } return price; } function editProduct(prod){ document.getElementsByName('product_order_'+prod)[0].style.display = 'none'; document.getElementsByName('product_order_'+prod+'_edit')[0].style.display = 'block'; document.getElementsByName('title_'+prod)[0].style.display = 'none'; document.getElementsByName('title_'+prod+'_edit')[0].style.display = 'block'; document.getElementsByName('desc_'+prod)[0].style.display = 'none'; document.getElementsByName('desc_'+prod+'_edit')[0].style.display = 'block'; document.getElementsByName('price_'+prod)[0].style.display = 'none'; document.getElementsByName('price_'+prod+'_edit')[0].style.display = 'block'; var price = document.getElementsByName('price_'+prod); var price_edit = document.getElementsByName('price_'+prod+'_edit'); for(i=0; i< colors_list[productid][groupid].length; x++){ var objColor = document.getElementsByName("colors["+productid+"]["+colors_list[productid][groupid][x]+"]")[0]; if(objColor){ objColor.checked=checked; } } } function selectColorGroupHeader(productid, groupid){ var all_selected = true; for(var x=0; x < colors_list[productid][groupid].length; x++){ var objColor = document.getElementsByName("colors["+productid+"]["+colors_list[productid][groupid][x]+"]")[0]; if(objColor && !objColor.checked){ all_selected = false; break; } } if(all_selected){ document.getElementsByName("colorGroup["+productid+"]["+groupid+"]")[0].checked=true; }else{ document.getElementsByName("colorGroup["+productid+"]["+groupid+"]")[0].checked=false; } } //function hideProducts(){ // document.getElementById('products_display').style.display="none"; // document.getElementById('products_hidden').style.display="block"; // xajax_products_hidden(1); //} //function showProducts(){ // document.getElementById('products_display').style.display="block"; // document.getElementById('products_hidden').style.display="none"; // xajax_products_hidden(0); //}