6 Replies - 2418 Views - Last Post: 14 September 2012 - 10:28 AM Rate Topic: -----

#1 musicgrain1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-September 11

Update my Opencart 1.4.9.1 products automatically with ASP, PHP, MYSQL

Posted 14 September 2012 - 05:10 AM

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Login - NAME OF COMPANY</title>
<link href="/Content/Style/main.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="/Scripts/jquery-1.4.1.js"></script>
<script type="text/javascript" src="/Scripts/jquery.cycle.all.min.js"></script>
<script type="text/javascript">
// IE6 fix for drop down menu
navHover = function() {
	var lis = document.getElementById("main-nav-list").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);

$(document).ready(function(){$('#UserName').focus();});


</script>
 </head>
<body>
<div class="container">

    <!-- start header -->

  <!-- start header -->
  <div class="header">
    <div class="logo"><a href="/Account/logon"><img src="../../images/SLC_logo.png" alt="Smart Living Company" width="238" height="80" /></a></div>
    <div class="store-contact">
      <div class="contact-info font10"><img src="/images/contact_slc_button.png" alt="contact smart living company now" width="101" height="30" /><span>Ask
          how you can get $100 in Merchandise ABSOLUTELY FREE!</span>
        <div class="phone font28">1-800-000-0000</div>
      </div>
      <img src="/images/contact_slc.jpg" alt="contact smart living company" width="80" height="80" /></div>
  </div>    
  <!-- end header -->
  
  <!-- end header -->
  <!-- start main nav top -->
  <div class="main-nav">
    <ul id="main-nav-list">
	<li><a href="LogOn">Home</a></li>     
      <li><a href="howyoumakemoney">How You Make Money</a>
        <ul class="nav-list">
          <li><a href="howyoumakemoney">How it Works</a></li>
          <li><a href="waystomakemoney">Ways to Make Money</a></li>
          <li><a href="internetmarketing">Internet Marketing</a></li>
          <li><a href="catalogs">Catalogs</a></li>
          <li><a href="fundraising">Fundraising</a></li>
          <li><a href="wholesaling">Wholesaling</a></li>
          <li><a href="subwholesaling">Sub-Wholesaling</a></li>
          <li><a href="hostaparty">Host a Party</a></li>
          <li><a href="farmersfleamarketswapmeet">Farmers Market</a></li>
          <li><a href="directmail">Direct Mail</a></li>
        </ul>
      </li>
      <li><a href="products">Products Offered</a>
        <ul class="nav-list">
          <li><a href="homedecor">Home Decor</a></li>
          <li><a href="kitchendecor">Kitchen Decor</a></li>
          <li><a href="lighting">Lighting</a></li>
          <li><a href="outdoorliving">Outdoor Living</a></li>
        </ul>
      </li>
      <li><a href="profitpotential">Profit Potential</a></li>
      <li><a href="companyprofile">About Us</a>
        <ul class="nav-list">
          <li><a href="companyprofile">Company Profile</a></li>
          <li><a href="faq">FAQ</a></li>
          <li><a href="membershiprules">Membership Rules</a></li>
          <li><a href="privacypolicy">Privacy Policy</a></li>
          <li><a href="termsofuse">Terms of Use</a></li>
          <li><a href="sitemap">Site Map</a></li>
        </ul>
      </li>
      <li><a href="successstories">Success Stories</a></li>
      <li class="get-started-link"><a href="getstarted">Get Started</a></li>
      <li class="login"><a href="Login">Member Login</a></li>      
    </ul>
  </div>
  <!-- end main nav  -->
  <!-- start main body content -->


The only way I saw to start the code was try to have the login script here, login when it starts and then move to the next part where it enters the code into MYSQL with PHP.
                   <!--******** Login Box START *****************-->
  <p><br /><br /></p>
    <div id="" align="center" class="footer" style="width: 300px; margin:5% auto;background-color: #E6E6E6">
        <form action="LogOn" method="post" name="Login" id="Login" >
        <div></div>

		    <table  width="90%" align="center" border="0" >
            <tbody>
			    <tr>
				    <td >
					    <div align="center"><b>Member Number:</b></div>
				    </td>
				    <td >
					    <div style="text-align:left;display: table; width: 0.75in; HEIGHT: 20px" ><input id="UserName" maxlength="8" name="UserName" size="12" style="width:100px;" tabindex="1" type="text" value="" width="0.75in" />
                         </div>    
				    </td>
			    </tr>
			    <tr>			    
			        <td style="height:15px;"></td>
			    </tr>			    
			    <tr>
				    <td >
					    <div align="center"><b>Password:</b></div>
				    </td>
				    <td >
					    <div   style="text-align:left; display: table; width: 0.75in; height: 20px" ><input id="Password" maxlength="6" name="Password" size="12" style="width:100px;" tabindex="2" type="password" width="0.75in" />
                     </div> 
				    </td>
			    </tr>
			    <tr>
			        <td style="height:20px;"></td>
			    </tr>			    
			    <tr>
			       <td><div align="left" style="text-align:center; font: 8pt arial;"><u>
                     <a href="/Account/ForgotPassword">Forget Password?</a></u>
                     </div> 
                     </td><td></td>
			    </tr>
			    <tr>
			        <td><div align="left" style="text-align:center; font: 8pt arial;">
                     <u><a href="/Account/NewMemberLogin">New Member Sign-Up</a></u> 
                    </div>
                    </td>
			        <td colspan="2"><div style="text-align:center;display: table; width: 0px; HEIGHT: 35px; ">
                     <input id="loginSubBtn" align="middle" name="Submit" src="/images/btn_login.gif"  
                      type="image" value="LogIn" onclick="Javascript:this.form.submit();" /></div>
                      </td>
			    </tr>
			    <tr><td><div>
                     <input id="RememberMe" name="RememberMe" style="display:none;" type="checkbox" value="true" /><input name="RememberMe" type="hidden" value="false" />
                     <input type="hidden" name="returnUrl" value="/Product/ProductSearchResult?keyWord=Birdhouse&pageSize=15&pageIndex=2" />
                     </div>
			    </td><td></td></tr>
			    </tbody>  
             </table>
         </form>

         
    </div>
                 <!--******** Login Box END *****************-->      
    <p><br /></p>                 
</div>
<!-- end main container -->


<!-- Deploy Footer -->
<div class="footer">
  <div class="footer-wrap">
    <div class="newsletter-optin">
      <p>FREE newsletter of Our Top Selling Products</p>
      <form action="/Account/Freeinfo" method="post" name="emailform" id="emailform" >
        <label for="email">Enter your e-mail address:</label>
        <input type="text" value="" id="email" name="email" placeholder="enter your email address" />
        <input type="submit" value="Sign Up" name="submit" />
      </form> 
    </div>
    <div class="footer-links">
        <ul>
            <li><a href="/Account/membershiprules">Membership Rules</a> : </li>
	        <li><a href="/Account/privacypolicy">Privacy Policy</a> : </li>
	        <li><a href="/Account/termsofuse">Terms of Use</a> : </li>
	        <li><a href="/Account/contactslc">Contact Us</a> : </li>
	        <li><a href="/Account/sitemap">Site Map</a></li>
        </ul>
        <div class="copyright">
            <p class="copy font10">&copy;Copyright Smart Living Company, 2012</p> 
                <label style="margin-left:30px">1D</label>
        </div>
    </div>
  </div>
  <div class="social-icons">
            <ul>
                <li>
                    <a href="http://www.facebook.com/SmartLivingCompany" title="Smart Living Company Facebook Page">
                        <img src="/images/facebook-icon.png" alt="Find us on Facebook" />
                    </a>    
                </li>
                <li>
                    <a href="http://www.twitter.com/smartlivingco" title="Smart Living Company Twitter Page">
                        <img src="/images/twitter-icon.png" alt="Find us on Twitter" />
                    </a>
                </li>
                <li>
                    <a href="http://www.youtube.com/user/smartlivingcompany" title="Smart Living Company Youtube Channel">
                        <img src="/images/youtube-icon.png" alt="Find us on YouTube" />
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
 
<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-30592954-1']);   _gaq.push(['_trackPageview']);   (function() {    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);  })();</script></body>
</html>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="X-UA-Compatible" content="ie=7" />
<link href="/Content/Style/Front.css" rel="stylesheet" type="text/css" />
<link href="/Content/Style/ProductStyle.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery.js" type="text/javascript"></script>
<script src="/Scripts/jquery.bgiframe.js" type="text/javascript"></script>
<style type="text/css">
          #nav li a{ outline:none; text-align:center;line-height:25px;}
     </style>
     

    <title>Inventory Reports</title>

	<title>NAME OF COMPANY</title>
<script type=text/javascript >

	function menuFix() {        
		var sfEls = document.getElementById("nav").getElementsByTagName("li");
		for (var i = 0; i < sfEls.length; i++) {
			sfEls[i].onmouseover = function() {				
				this.className += (this.className.length > 0 ? " " : "") + "sfhover";
			}
			sfEls[i].onmousedown = function() {
				this.className += (this.className.length > 0 ? " " : "") + "sfhover";
			}
			sfEls[i].onmouseup = function() {
				this.className += (this.className.length > 0 ? " " : "") + "sfhover";
			}
			sfEls[i].onmouseout = function() {
				this.className = this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
			}
		}
	}

	window.onload = function() {
		menuFix();
		ShowErrorMsg();
	}

	function ShowErrorMsg() {
		if ($('#errMsg').length > 0) {
			if ($('#errMsg').html() != "")
				alert($('#errMsg').html());
		}
	}

</script>


</head>
<body>
 
<table width=960 style="border:1px solid #CCCCCC" align="center" cellpadding=0 cellspacing=0 >

<!-- ????  -->
<tr>
	<td width=959 height=117 >		
		<table width=959 height=117 cellpadding=0 cellspacing=0 border=0>
            <!-- login, shopping cart  -->
			

<tr style="background-color:#B8B8B8;height:26px" >
		<td>
			<table  width=959 height=26 cellpadding=0 cellspacing=0 border=0 style="text-align:center" >
				<tr>
					<td width=290 style="font-family:Arial Narrow;font-size:small;color:White;">                
					  
        Welcome <b>LAST, FIRST</b>!
        [ <a href="/Account/LogOff">Log Off</a> ]

					</td>
					<td width=125 style="font-family:Arial Narrow;font-size:small; font-weight:bold; color:Black;">                
					  <b>Member No. MEMBER#</b>
					</td>
					<td width=40 >                
					   <a href="/Basket/GetBasketList"><img src="../../Content/Images/Front/cart.JPG" alt="" width=36 height=26 border=0 /></a>
					</td>
					<td width=120 align="left">                
					   
Your cart is empty

					</td>
					<td width=80 >                
					   <a href="/MemberResource/FraudAlert" style="color:Red;text-decoration:underline;font-weight:bold">FRAUD ALERT</a>
					</td>
					<td width=130 style="color:White">                
					   <B>PRODUCT SEARCH</B>
					</td>
					
					<td style="color:White; margin-left:-15px;" > 
					<form method="post" action="/Product/SearchProducts" >  
				                
					     <input type="text" id="Text1" class="searchtextbox" name="txtSearch" maxlength="20" size="15" value="" />                      
				        <input type="image" name="btnSearch" id="Image1" class="searchbtn"  src="../../Content/Images/Front/searchbtn.png" />
				     </form></td>
				</tr>
			</table>
		</td>
	</tr>
     <tr style="background-color:#FFFFFF;">
			<td>
			    <table border="0" cellpadding="0" cellspacing="0" width="959px">
                    <tr style="height:44px;">
                        <td style="text-align:left"><a href="/Product/home">
                            <img src="../../Content/Images/Front/SLC_S.JPG" alt="" border=0 /></a></td>
                        <td>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                               <tr >
                                  <td style="font-family:Times New Roman,Times,serif;height:20px;width:600px; background-color:#FFFFFF;color:#FFFFFF;font-weight: bold;font-size:large;text-align: left;"></td>
                               </tr>                               
                            </table>
                        </td>
                    </tr>
                </table>
			</td>
		</tr>
            <!-- menu  -->
	    <tr>
		    <td valign="top" style="background-color:#FFFFFF"> 
		    
                <ul id="nav" style="width:959px;">
                    <li style="width: 70px;"><a href="/Product/Home" style="line-height:15px;"><br />HOME</a></li>
                    <li style="width: 110px;"><a href="#" style="line-height:15px;"><br />MERCHANDISE</a>
                         <ul>
                            <li><a href="/Product/MerchandiseInfo">Merch Info</a></li>
                            <li><a href="/Product/SpecialtyKits">Kits</a></li>
                        </ul>
                    </li>
                    <li style="width: 100px;"><a href="#" style="line-height:15px;">EVENTS &<br />PROMOTIONS</a>
                        
  <ul>
     
    <li><a href="/Product/SpecialtyKits">Specialty Kits</a></li>
  </ul>



                    </li>  
                    <li style="width: 90px;"><a href="/SuccessCentral/Index" style="line-height:15px;">SUCCESS <br />CENTRAL</a>
                        <ul>
                            <li><a href="#">Webinars</a></li>
                        </ul>
                    </li>
                    <li style="width: 80px;"><a href="/SellingTools/SellingTools" style="line-height:15px;">SELLING <br />TOOLS</a>
                        <ul>
                            <!--li><a href="/Product/DealMethod?typeid=47">New Fall Catalogs</a></li-->
                            <li><a href="/SellingTools/SupplyItemContent?sn=Catalogs">Catalogs</a></li>
                            <li><a href="/SellingTools/SellingTools">Supply Items</a></li><!-- /SellingTools/SupplyItems -->
                            <li><a href="/SellingTools/FantasticFlyers">Fantastic Flyers</a></li>
                            <li><a href="/SellingTools/MemberReports">Member Reports</a></li>
                            <li><a href="../../LINK/LINK Pricelist.pdf" target="_blank">Print Pricelist</a></li>
                            <li><a href="../../LINK/LINK Wholesale Pricelist.pdf" target="_blank">Print Wholesale Pricelist</a></li>
                            <li><a href="/SellingTools/PicturesAndText">Pictures and Text</a></li>
                            <li><a href="/SellingTools/SupplyItemContent?sn=Gift Cards">Gift Cards</a></li>
                        </ul>
                    </li>
                    <li style="width: 140px;"><a href="#" style="line-height:15px;">MEMBER <br />RESOURCE CENTER</a>
                        <ul>
                            <!--li><a href="/MemberResource/LegalNotices">Legal Notices</a></li-->
                            <!--<li><a href="/MemberResource/MonthlyNewsletter">Specialty Wholesaler</a></li>-->                            
                            <!--li><a href="/MemberResource/MarketingMethods">Marketing Methods</a></li-->
                            <li><a href="/MemberResource/Levels">Super Seller Program</a></li>
                            <!--li><a href="/MemberResource/YourOwnWebsite">Your Own Website</a></li-->
                            <li><a href="/MemberResource/FAQS">FAQS</a></li>
                            <li><a href="/MemberResource/FraudAlert">Fraud Alert</a></li>
                            <!--li><a href="/SuccessCentral/Index">Success Central</a></li-->
                        </ul>
                    </li>
                    <li style="width: 125px;"><a href="#" style="line-height:15px;">ACCOUNT <br />INFORMATION</a>
                        <ul>
                            <li><a href="/Shopper/MemberInfo">Your User Profile</a></li>
                            <li><a href="/Shopper/Preferences">Your Preferences</a></li>
                            <li><a href="/Shopper/OrderHistory">Your Order History</a></li>
                            <li><a href="/Shopper/AddressBook">Business Center</a></li>
                            <li><a href="/Shopper/AcccountActivity">Account Activity</a></li>
                            <li><a href="/Shopper/EditShopperInfo">Address Change</a></li>
                            <li><a href="/Shopper/PasswordChange">Password Change</a></li>
                        </ul>
                    </li>
                    <li  style="width: 130px;"><a href="/Basket/GetBasketList" style="line-height:15px;"><br />SHOPPING CART</a>
                        <ul>
                            <li><a href="/Basket/GetBasketList">PRODUCTS CURRENTLY IN CART</a></li>
                            <li><a href="/Shopper/OrderHistory">PREVIOUS ORDERS</a></li>
                        </ul>
                    </li>
                    <li style="width: 100px;"><a href="/Product/ContactUs" style="line-height:15px;"><br />CONTACT US</a></li>
                    
                </ul>
          </td>
     </tr>


		</table>
	</td>
</tr>

<!-- ????  -->
<tr>
	<td width=959 >
		<table cellpadding=0 cellspacing=0 style="border:1px solid #CCCCCC">
			  <tr>
				 <td width=959 height=20 ></td>
			  </tr>
			  <tr>				 
				  <!-- ??  -->
				  <td  style="text-align:center;vertical-align:top">
					             

<table border="0" cellpadding="0" cellspacing="0" width="959px;">
    <tr>
        <td valign="top" width="210">
             <table border="0" cellpadding="0" cellspacing="0" style="text-align:left;">
                 <tr>
                    <td>
                        
<script type="text/javascript" language="javascript" src="../../Scripts/jquery.js"></script>
<link href="../../Content/Style/leftnav.css"rel="stylesheet" type="text/css" />

<script type="text/javascript">

    $(document).ready(function() {

        $("#firstpane p.menu_head").click(function() {
            $(".menu_head").removeClass("menuActive");

            if ($(this).next().css("display") == "none") {
                $(this).css({ backgroundImage: "url(../../Content/Images/SellingTools/down.png)" }).next("div.menu_body").slideDown(300).siblings("div.menu_body").slideUp("slow");
                $(this).addClass("menuActive");
            }
            else if ($(this).next()) {
                $(this).addClass("menuActive");
            }
            else {
                $(this).css({ backgroundImage: "url(../../Content/Images/SellingTools/down.png)" }).next("div.menu_body").slideUp(300).siblings("div.menu_body").slideUp("slow");
                $(this).removeClass("menuActive");
                $(this).css({ backgroundImage: "none" });
            }

            $(this).siblings().css({ backgroundImage: "none" });

        });


        $('#memberreports').triggerHandler('click');
    });
</script>

   <div id="productsnav">
       	  <img src="../../Content/Images/Front/tree1.JPG" width="210" height="24" alt="Browse By Category" />
          <div id="firstpane" class="menu_list" style="z-index:0;">
               <p id="memberreports" class="menu_head"><a href="/SellingTools/MemberReports">Member Reports</a></p>
               <div class="menu_body" style="line-height:20px;">
                   
                    <a href="/SellingTools/MemberReports" class="onstate" >Inventory Reports</a>
                    <a href="/SellingTools/OutOfStock">Out of Stock</a>
                    <a href="/SellingTools/DiscontinuedItems">Discontinued Items</a>
                    <a href="/SellingTools/MakePriceLists">Make Price List</a>
                   
               </div>
          </div>
    </div>
 
                    </td>
                 </tr> 
             </table>   
        </td>
         <td width="10" height="460" style="text-align: center; vertical-align: top">
              <img src="../../Content/Images/Front/spliter.JPG" alt="" width="3" height="460" border="0" />
         </td>
        <td width="735" valign="top">
              <table border="0" cellpadding="0" cellspacing="0" width="735" align="center">
                       <tr valign="top" style="background-color: #CCCCCC; height: 21px;">
                          <td style="font-family: Calibri; font-size: 14px; font-weight: bold;text-align: left; text-indent:60px;">
                                 Inventory Reports
                           </td>
                       </tr>
                       <tr>
                           <td valign="top" height="300px;" align="center">
                               <table border="0" cellpadding="10" cellspacing="0" width="735" style="text-align:left;">
                                  <tr>
                                       <td colspan="5" style="text-align: left;">
                                           <p>Check the availability and pricing of any item<br />
                                            Enter the item numbers in the boxes below, and click the Submit button. You may search for up to 30 Items at a time.</p>
                                       </td>
                                  </tr>
                                  <form action="/SellingTools/SubmitInventoryReports" method="post">
                                                   <tr style="background-color:#EBEBEB" valign="top">


This is the part of the code that I need it to grab the code and enter it in to the MYSQL.
                                       
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>

                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                             </tr> 
                                         
                                                   <tr style="background-color:#EBEBEB" valign="top">
                                              
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                             </tr> 
                                          
                                                   <tr> 
                                              
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                             </tr> 
                                          
                                                   <tr> 
                                              
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                             </tr> 
                                         
                                                   <tr style="background-color:#EBEBEB" valign="top">
                                              
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                             </tr> 
                                         
                                                   <tr style="background-color:#EBEBEB" valign="top">
                                              
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                         
                                         <td style="height:20px" align="center"> 
                                           <input type="text" name="txtpfid" style=" width:120px; height:12px;" />
                                         </td>
                                         
                                         
                                             </tr> 
                                         
                                    <tr>
                                         <td align="right" colspan="5" >
                                             <input type="submit" style="background-image: url(../../Content/Images/SellingTools/submit.png);
                                        cursor: pointer; width: 103px; height: 26px; border: 0;" value="" />
                                         </td>
                                    </tr>
                                    </form>
                             </table>
                           </td>
                       </tr>
                       <tr>
                            <td height="20">
                            </td>
                       </tr>
               </table>
        </td>
    </tr>
</table>
    


					 
				  </td>
			  </tr>
		</table>
	</td>
</tr>

<!-- ?????  -->
<tr>
	<td width=959 height=65>		
        <table border=0 cellpadding=0 cellspacing=0 width=960 height=65>
			<tr>
				<td><a href="/Product/ContactUs" target="_blank">
				<img src="../../Content/Images/Front/callUs.JPG" alt="" width=196 height=65 border=0 /></a></td>
				<td><a href="http://server.iad.liveperson.net/hc/27712815/?cmd=file&file=visitorWantsToChat&site=27712815&byhref=1&imageUrl=http://server.iad.liveperson.net/hcp/Gallery/ChatButton-Gallery/English/Small/1a" target="_blank">
				<img src="../../Content/Images/Front/needHelp.JPG" alt="" border=0 width=272 height=65 /></a></td>
				<td><a href="https://server.iad.liveperson.net/hc/21119773/?cmd=file&file=visitorWantsToChat&site=21119773&byhref=1" target="_blank">
				<img src="../../Content/Images/Front/technicalQuestions.JPG" border=0 alt="" width=268 height=65 /></a></td>
				<td><a href="http://www.twitter.com/successcentral" target="_blank">
				<img src="../../Content/Images/Front/GetInsideInfo.JPG" border=0 alt="" width=224 height=65 /></a></td>
			</tr>
		</table> 
	</td>
</tr>


<!-- ???????  -->
<tr>
	<td width=959 height=65 style="text-align:center;vertical-align:top">
		  
     <table width=959 height=65 >
			<tr>
				<td>	
					<a href="/Product/Home">home</a> | 
					<a href="/Product/MerchandiseInfo">merchandise</a> | 
					<a href="#">events and promotions</a> |
					<a href="/SuccessCentral">success central</a> | 
					<a href="/SellingTools/SellingTools">selling tools</a> | 					
					<!--
					<a href="/MemberResource/Center">member resource center</a> | 
					<a href="/Shopper/AccountFAQ">account information</a> | -->
					<a href="/Basket/GetBasketList">shopping cart</a> | 
					<a href="/Product/ContactUs">contact us</a>
				</td>
			</tr>
			<tr>
			    <td>
			             <a href="/MemberResource/Rules">NAME OF COMPANY Standard Membership Rules</a>|
                         <a href="/MemberResource/PrivacyPolicy">Privacy Policy</a>|
                         <a href="/MemberResource/TeamOfUs">Terms of Use</a>
                         &nbsp;&nbsp;&nbsp;
                         <label style="margin-left:30px">1D</label>
			    </td>
			</tr>
			<tr>
				<td style="font-family:Arial Baltic;font-size:x-small;">
                           &copy1996-2012 NAME OF COMPANY® 
                           <br />
                            All rights reserved. 
				</td>
			</tr>
		</table>
		
	</td>
</tr>
</table>


<!-- Embedded WhosOn: Insert the script below at the point on your page where you want the Click To Chat link to appear --> 
<script type='text/javascript' src='https://whoson.NAME OF COMPANY.com:8443/include.js?domain=www.NAME OF COMPANY.com'></script>
<script type='text/javascript' >
sWOResponse='';
if(sWOTrackPage)sWOTrackPage();
</script>
<!-- End of embedded WhosOn -->
<script type="text/javascript">
  var _opt = _opt || [];
  _opt.push([ 'view', 'R92PCIUS' ]);
  (function() {
    var scr = document.createElement('script'); scr.type = 'text/javascript'; scr.async = true;
    scr.src = '//service.optify.net/opt-v2.js';
    var other = document.getElementsByTagName('script')[0]; other.parentNode.insertBefore(scr, other);
  })();
</script>  
</body>
</html>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="X-UA-Compatible" content="ie=7" />
<link href="/Content/Style/Front.css" rel="stylesheet" type="text/css" />
<link href="/Content/Style/ProductStyle.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery.js" type="text/javascript"></script>
<script src="/Scripts/jquery.bgiframe.js" type="text/javascript"></script>
<style type="text/css">
          #nav li a{ outline:none; text-align:center;line-height:25px;}
     </style>
     

    <title>Inventory Reports</title>

	<title>Smart Living Company</title>
<script type=text/javascript >

	function menuFix() {        
		var sfEls = document.getElementById("nav").getElementsByTagName("li");
		for (var i = 0; i < sfEls.length; i++) {
			sfEls[i].onmouseover = function() {				
				this.className += (this.className.length > 0 ? " " : "") + "sfhover";
			}
			sfEls[i].onmousedown = function() {
				this.className += (this.className.length > 0 ? " " : "") + "sfhover";
			}
			sfEls[i].onmouseup = function() {
				this.className += (this.className.length > 0 ? " " : "") + "sfhover";
			}
			sfEls[i].onmouseout = function() {
				this.className = this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
			}
		}
	}

	window.onload = function() {
		menuFix();
		ShowErrorMsg();
	}

	function ShowErrorMsg() {
		if ($('#errMsg').length > 0) {
			if ($('#errMsg').html() != "")
				alert($('#errMsg').html());
		}
	}

</script>


</head>
<body>
 
<table width=960 style="border:1px solid #CCCCCC" align="center" cellpadding=0 cellspacing=0 >

<!-- ????  -->
<tr>
	<td width=959 height=117 >		
		<table width=959 height=117 cellpadding=0 cellspacing=0 border=0>
            <!-- login, shopping cart  -->
			

<tr style="background-color:#B8B8B8;height:26px" >
		<td>
			<table  width=959 height=26 cellpadding=0 cellspacing=0 border=0 style="text-align:center" >
				<tr>
					<td width=290 style="font-family:Arial Narrow;font-size:small;color:White;">                
					  
        Welcome <b>LAST, FIRST</b>!
        [ <a href="/Account/LogOff">Log Off</a> ]

					</td>
					<td width=125 style="font-family:Arial Narrow;font-size:small; font-weight:bold; color:Black;">                
					  <b>Member No. MEMBER#</b>
					</td>
					<td width=40 >                
					   <a href="/Basket/GetBasketList"><img src="../../Content/Images/Front/cart.JPG" alt="" width=36 height=26 border=0 /></a>
					</td>
					<td width=120 align="left">                
					   
Your cart is empty

					</td>
					<td width=80 >                
					   <a href="/MemberResource/FraudAlert" style="color:Red;text-decoration:underline;font-weight:bold">FRAUD ALERT</a>
					</td>
					<td width=130 style="color:White">                
					   <B>PRODUCT SEARCH</B>
					</td>
					
					<td style="color:White; margin-left:-15px;" > 
					<form method="post" action="/Product/SearchProducts" >  
				                
					     <input type="text" id="Text1" class="searchtextbox" name="txtSearch" maxlength="20" size="15" value="" />                      
				        <input type="image" name="btnSearch" id="Image1" class="searchbtn"  src="../../Content/Images/Front/searchbtn.png" />
				     </form></td>
				</tr>
			</table>
		</td>
	</tr>
     <tr style="background-color:#FFFFFF;">
			<td>
			    <table border="0" cellpadding="0" cellspacing="0" width="959px">
                    <tr style="height:44px;">
                        <td style="text-align:left"><a href="/Product/home">
                            <img src="../../Content/Images/Front/SLC_S.JPG" alt="" border=0 /></a></td>
                        <td>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                               <tr >
                                  <td style="font-family:Times New Roman,Times,serif;height:20px;width:600px; background-color:#FFFFFF;color:#FFFFFF;font-weight: bold;font-size:large;text-align: left;"></td>
                               </tr>                               
                            </table>
                        </td>
                    </tr>
                </table>
			</td>
		</tr>
            <!-- menu  -->
	    <tr>
		    <td valign="top" style="background-color:#FFFFFF"> 
		    
                <ul id="nav" style="width:959px;">
                    <li style="width: 70px;"><a href="/Product/Home" style="line-height:15px;"><br />HOME</a></li>
                    <li style="width: 110px;"><a href="#" style="line-height:15px;"><br />MERCHANDISE</a>
                         <ul>
                            <li><a href="/Product/MerchandiseInfo">Merch Info</a></li>
                            <li><a href="/Product/SpecialtyKits">Kits</a></li>
                        </ul>
                    </li>
                    <li style="width: 100px;"><a href="#" style="line-height:15px;">EVENTS &<br />PROMOTIONS</a>
                        
  <ul>
     
    <li><a href="/Product/SpecialtyKits">Specialty Kits</a></li>
  </ul>



                    </li>  
                    <li style="width: 90px;"><a href="/SuccessCentral/Index" style="line-height:15px;">SUCCESS <br />CENTRAL</a>
                        <ul>
                            <li><a href="#">Webinars</a></li>
                        </ul>
                    </li>
                    <li style="width: 80px;"><a href="/SellingTools/SellingTools" style="line-height:15px;">SELLING <br />TOOLS</a>
                        <ul>
                            <!--li><a href="/Product/DealMethod?typeid=47">New Fall Catalogs</a></li-->
                            <li><a href="/SellingTools/SupplyItemContent?sn=Catalogs">Catalogs</a></li>
                            <li><a href="/SellingTools/SellingTools">Supply Items</a></li><!-- /SellingTools/SupplyItems -->
                            <li><a href="/SellingTools/FantasticFlyers">Fantastic Flyers</a></li>
                            <li><a href="/SellingTools/MemberReports">Member Reports</a></li>
                            <li><a href="../../LINK/LINK Pricelist.pdf" target="_blank">Print Pricelist</a></li>
                            <li><a href="../../LINK/LINK Wholesale Pricelist.pdf" target="_blank">Print Wholesale Pricelist</a></li>
                            <li><a href="/SellingTools/PicturesAndText">Pictures and Text</a></li>
                            <li><a href="/SellingTools/SupplyItemContent?sn=Gift Cards">Gift Cards</a></li>
                        </ul>
                    </li>
                    <li style="width: 140px;"><a href="#" style="line-height:15px;">MEMBER <br />RESOURCE CENTER</a>
                        <ul>
                            <!--li><a href="/MemberResource/LegalNotices">Legal Notices</a></li-->
                            <!--<li><a href="/MemberResource/MonthlyNewsletter">Specialty Wholesaler</a></li>-->                            
                            <!--li><a href="/MemberResource/MarketingMethods">Marketing Methods</a></li-->
                            <li><a href="/MemberResource/Levels">Super Seller Program</a></li>
                            <!--li><a href="/MemberResource/YourOwnWebsite">Your Own Website</a></li-->
                            <li><a href="/MemberResource/FAQS">FAQS</a></li>
                            <li><a href="/MemberResource/FraudAlert">Fraud Alert</a></li>
                            <!--li><a href="/SuccessCentral/Index">Success Central</a></li-->
                        </ul>
                    </li>
                    <li style="width: 125px;"><a href="#" style="line-height:15px;">ACCOUNT <br />INFORMATION</a>
                        <ul>
                            <li><a href="/Shopper/MemberInfo">Your User Profile</a></li>
                            <li><a href="/Shopper/Preferences">Your Preferences</a></li>
                            <li><a href="/Shopper/OrderHistory">Your Order History</a></li>
                            <li><a href="/Shopper/AddressBook">Business Center</a></li>
                            <li><a href="/Shopper/AcccountActivity">Account Activity</a></li>
                            <li><a href="/Shopper/EditShopperInfo">Address Change</a></li>
                            <li><a href="/Shopper/PasswordChange">Password Change</a></li>
                        </ul>
                    </li>
                    <li  style="width: 130px;"><a href="/Basket/GetBasketList" style="line-height:15px;"><br />SHOPPING CART</a>
                        <ul>
                            <li><a href="/Basket/GetBasketList">PRODUCTS CURRENTLY IN CART</a></li>
                            <li><a href="/Shopper/OrderHistory">PREVIOUS ORDERS</a></li>
                        </ul>
                    </li>
                    <li style="width: 100px;"><a href="/Product/ContactUs" style="line-height:15px;"><br />CONTACT US</a></li>
                    
                </ul>
          </td>
     </tr>


		</table>
	</td>
</tr>

<!-- ????  -->
<tr>
	<td width=959 >
		<table cellpadding=0 cellspacing=0 style="border:1px solid #CCCCCC">
			  <tr>
				 <td width=959 height=20 ></td>
			  </tr>
			  <tr>				 
				  <!-- ??  -->
				  <td  style="text-align:center;vertical-align:top">
					  
<script src="/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
   <script type="text/javascript">
       function SubmitItem1(pfid) {
        if (pfid != null && pfid != "") {
            $.ajax({
                type: "POST",
                url: "/SellingTools/AddProductItemToBasket",
                data: "pfid=" + pfid,
                dataType: "json",
                success: function(str) {
                   if (str.length > 0 && str != "")
                        alert(str);
                },
                error: function(d) {
                    alert("Submit error.");
                }
            });
        }
    }
   </script> 
   
<table border="0" cellpadding="0" cellspacing="0" width="959" align="center">
   <tr valign="top" style="height: 30px;">
      <td style="font-family: Calibri; font-size: 18px; font-weight: bold;text-align: center;">
             INVENTORY REPORT (BY ITEM NUMBER)
       </td>
   </tr>
    <tr>
       <td valign="top" height="15px;"></td>
   </tr>
   <tr>
       <td valign="top" height="450px;">
           <center>
           <table border="0" cellpadding="5" cellspacing="0" width="900px" style="text-align:center; border:solid 1px #CCCCCC; " >
               <tr style="background-color: #e8eef4;">
                <th>
                    Item#
                </th>
                <th>
                    Description
                </th>
                <th>
                    White Price
                </th>
                <th>
                    Open House Price
                </th>
                <th>
                   Yellow Price
                </th>
                <th>
                   Sugg. Retail Price
                </th>
                <th>
                    Unit of Sale
                </th>
                <th>
                    In Stock*
                </th>
                <th>
                    ETA Date
                </th>
                <th>
                    Disc
                </th>
            </tr>
              
                      <tr>
                    
                           <td>
                               <a href="#" style="color:Red; text-decoration:underline;" onclick="SubmitItem1('38276');">38276</a>
                           </td>
                            <td>
                               #38276 Wedding Chapel Birdhouse
                           </td>
                            <td>
                               $7.30
                           </td>
                           <td>
                               $11.70
                           </td>
                           <td>
                               $10.20
                           </td>
                           <td>
                               $19.95
                           </td>
                            <td>
                              1 EA
                           </td>


This is the part of the code I haven't got to, that inputs the data into the MYSQL Database for Opencart. The data is in this form once you put a product number in and hit summit. I want to grab the part that says "In Stock*" and grab the 3 different types of info. "Yes" "NO" or "# left if below 100 quantity". I wanted it to be used in a "If Else" clause where Yes=10 No=0 and #=0.

This the place that has the variables. Once the code is "If Else" I was going to input the number into the quantity part of the database in Opencart 1.4.9.1 everytime someone either clicks on one item on home page and updates them one at a time and doesn't use to much bandwidth or it updates all at once. Thank you for helping me solve this problem.

                            <td>
                               Yes
                           </td>

                            <td>
                               &nbsp;
                           </td>
                            <td>
                               
                                 N
                              
                           </td>
                       </tr>
                  
            </table>
            <table border="0" cellpadding="0" cellspacing="0" width="900px" style="text-align:center;">
                <tr>
                    <td height="15px">
                    </td>
               </tr>
               <tr>
                   <td height="20px;" align="center">
                       * The actual number is displayed only when the inventory level is under 100. 
                   </td>
               </tr>
               <tr>
                    <td height="15px">
                    </td>
               </tr>
               <tr>
                   <td height="20px;" align="center">
                       To add any of the above items to your basket, just click on the item number and it will add the item to your shopping cart.<br />
                       If you have more than one item, just hit "Back" on your browser and continue adding items until you are finished. 
                   </td>
               </tr>
            </table>
           </center>
       </td>
   </tr>  
   <tr>
        <td height="20">
        </td>
   </tr>
</table>


					 
				  </td>
			  </tr>
		</table>
	</td>
</tr>

<!-- ?????  -->
<tr>
	<td width=959 height=65>		
        <table border=0 cellpadding=0 cellspacing=0 width=960 height=65>
			<tr>
				<td><a href="/Product/ContactUs" target="_blank">
				<img src="../../Content/Images/Front/callUs.JPG" alt="" width=196 height=65 border=0 /></a></td>
				<td><a href="http://server.iad.liveperson.net/hc/27712815/?cmd=file&file=visitorWantsToChat&site=27712815&byhref=1&imageUrl=http://server.iad.liveperson.net/hcp/Gallery/ChatButton-Gallery/English/Small/1a" target="_blank">
				<img src="../../Content/Images/Front/needHelp.JPG" alt="" border=0 width=272 height=65 /></a></td>
				<td><a href="https://server.iad.liveperson.net/hc/21119773/?cmd=file&file=visitorWantsToChat&site=21119773&byhref=1" target="_blank">
				<img src="../../Content/Images/Front/technicalQuestions.JPG" border=0 alt="" width=268 height=65 /></a></td>
				<td><a href="http://www.twitter.com/successcentral" target="_blank">
				<img src="../../Content/Images/Front/GetInsideInfo.JPG" border=0 alt="" width=224 height=65 /></a></td>
			</tr>
		</table> 
	</td>
</tr>


<!-- ???????  -->
<tr>
	<td width=959 height=65 style="text-align:center;vertical-align:top">
		  
     <table width=959 height=65 >
			<tr>
				<td>	
					<a href="/Product/Home">home</a> | 
					<a href="/Product/MerchandiseInfo">merchandise</a> | 
					<a href="#">events and promotions</a> |
					<a href="/SuccessCentral">success central</a> | 
					<a href="/SellingTools/SellingTools">selling tools</a> | 					
					<!--
					<a href="/MemberResource/Center">member resource center</a> | 
					<a href="/Shopper/AccountFAQ">account information</a> | -->
					<a href="/Basket/GetBasketList">shopping cart</a> | 
					<a href="/Product/ContactUs">contact us</a>
				</td>
			</tr>
			<tr>
			    <td>
			             <a href="/MemberResource/Rules">Smart Living Company Standard Membership Rules</a>|
                         <a href="/MemberResource/PrivacyPolicy">Privacy Policy</a>|
                         <a href="/MemberResource/TeamOfUs">Terms of Use</a>
                         &nbsp;&nbsp;&nbsp;
                         <label style="margin-left:30px">1D</label>
			    </td>
			</tr>
			<tr>
				<td style="font-family:Arial Baltic;font-size:x-small;">
                           &copy1996-2012 Smart Living Company® 
                           <br />
                            All rights reserved. 
				</td>
			</tr>
		</table>
		
	</td>
</tr>
</table>


<!-- Embedded WhosOn: Insert the script below at the point on your page where you want the Click To Chat link to appear --> 
<script type='text/javascript' src='https://whoson.NAME OF COMPANY.com:8443/include.js?domain=www.NAME OF COMPANY.com'></script>
<script type='text/javascript' >
sWOResponse='';
if(sWOTrackPage)sWOTrackPage();
</script>
<!-- End of embedded WhosOn -->
<script type="text/javascript">
  var _opt = _opt || [];
  _opt.push([ 'view', 'R92PCIUS' ]);
  (function() {
    var scr = document.createElement('script'); scr.type = 'text/javascript'; scr.async = true;
    scr.src = '//service.optify.net/opt-v2.js';
    var other = document.getElementsByTagName('script')[0]; other.parentNode.insertBefore(scr, other);
  })();
</script>  
</body>
</html>


This post has been edited by Atli: 14 September 2012 - 05:34 AM
Reason for edit:: Fixed the tags. Please use the Preview button before posting, to make sure your post looks right!


Is This A Good Question/Topic? 0
  • +

Replies To: Update my Opencart 1.4.9.1 products automatically with ASP, PHP, MYSQL

#2 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 3077
  • Posts: 10,786
  • Joined: 08-August 08

Re: Update my Opencart 1.4.9.1 products automatically with ASP, PHP, MYSQL

Posted 14 September 2012 - 05:57 AM

You've got HTML, Javascript, CSS, and (I'm assuming — couldn't find it at a glance) PHP mixed together and you're having problems? I'm shocked. Of course, your problems are made worse by using tables for formatting. Honestly, I can't bear to read through that code. Spend some time organizing it into discrete sets of code placed into their proper (.html, .js, .css, & .php) files.
Was This Post Helpful? 0
  • +
  • -

#3 musicgrain1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-September 11

Re: Update my Opencart 1.4.9.1 products automatically with ASP, PHP, MYSQL

Posted 14 September 2012 - 06:11 AM

View PostCTphpnwb, on 14 September 2012 - 05:57 AM, said:

You've got HTML, Javascript, CSS, and (I'm assuming — couldn't find it at a glance) PHP mixed together and you're having problems? I'm shocked. Of course, your problems are made worse by using tables for formatting. Honestly, I can't bear to read through that code. Spend some time organizing it into discrete sets of code placed into their proper (.html, .js, .css, & .php) files.


Quote

The code is of course not my design, but of that of a company that made it that way and I just need to use the one form field and an If Else state ment to update my products. I've asked my smartest friend that knows PHP and he could help me because of a girlfriend and kids. POINT! I'm not sure how to put it together exactly.


<!--******** Login Box START *****************-->
  <p><br /><br /></p>
    <div id="" align="center" class="footer" style="width: 300px; margin:5% auto;background-color: #E6E6E6">
        <form action="LogOn" method="post" name="Login" id="Login" >
        <div></div>

		    <table  width="90%" align="center" border="0" >
            <tbody>
			    <tr>
				    <td >
					    <div align="center"><b>Member Number:</b></div>
				    </td>
				    <td >
					    <div style="text-align:left;display: table; width: 0.75in; HEIGHT: 20px" ><input id="UserName" maxlength="8" name="UserName" size="12" style="width:100px;" tabindex="1" type="text" value="" width="0.75in" />
                         </div>    
				    </td>
			    </tr>
			    <tr>			    
			        <td style="height:15px;"></td>
			    </tr>			    
			    <tr>
				    <td >
					    <div align="center"><b>Password:</b></div>
				    </td>
				    <td >
					    <div   style="text-align:left; display: table; width: 0.75in; height: 20px" ><input id="Password" maxlength="6" name="Password" size="12" style="width:100px;" tabindex="2" type="password" width="0.75in" />
                     </div> 
				    </td>
			    </tr>
			    <tr>
			        <td style="height:20px;"></td>
			    </tr>			    
			    <tr>
			       <td><div align="left" style="text-align:center; font: 8pt arial;"><u>
                     <a href="/Account/ForgotPassword">Forget Password?</a></u>
                     </div> 
                     </td><td></td>
			    </tr>
			    <tr>
			        <td><div align="left" style="text-align:center; font: 8pt arial;">
                     <u><a href="/Account/NewMemberLogin">New Member Sign-Up</a></u> 
                    </div>
                    </td>
			        <td colspan="2"><div style="text-align:center;display: table; width: 0px; HEIGHT: 35px; ">
                     <input id="loginSubBtn" align="middle" name="Submit" src="/images/btn_login.gif"  
                      type="image" value="LogIn" onclick="Javascript:this.form.submit();" /></div>
                      </td>
			    </tr>
			    <tr><td><div>



                     <input id="RememberMe" name="RememberMe" style="display:none;" type="checkbox" value="true" /><input name="RememberMe" type="hidden" value="false" />
                     <input type="hidden" name="returnUrl" value="/Product/ProductSearchResult?keyWord=Birdhouse&pageSize=15&pageIndex=2" />
                     </div>
			    </td><td></td></tr>
			    </tbody>  
             </table>
         </form>

         
    </div>
                 <!--******** Login Box END *****************-->      
    <p><br /></p>



<form action="/SellingTools/SubmitInventoryReports" method="post">
<input type="text" name="txtpfid" style=" width:120px; height:12px;" value=""/>
</form>


[quote]
This is the part of the code I haven't got to, that inputs the data into the MYSQL Database for Opencart. The data is in this form once you put a product number in and hit summit. I want to grab the part that says "In Stock*" and grab the 3 different types of info. "Yes" "NO" or "# left if below 100 quantity". I wanted it to be used in a "If Else" clause where Yes=10 No=0 and #=0.
[/quote]

                <td>
                #38276 Wedding Chapel Birdhouse
                </td>

                <th>
                    In Stock*
                </th>

                <td>
                    Yes
                </td>


Was This Post Helpful? 0
  • +
  • -

#4 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 3077
  • Posts: 10,786
  • Joined: 08-August 08

Re: Update my Opencart 1.4.9.1 products automatically with ASP, PHP, MYSQL

Posted 14 September 2012 - 07:55 AM

  • This forum is for helping people write their own code.
  • By choosing to use some one else's code you assume responsibility for it. It's your job to make it readable.
  • PHP is server side and HTML is client side. The part of the code you're asking about is not server side. It cannot input anything into any database. It can only submit data to the server, which will then run a PHP script which can access the database.

Was This Post Helpful? 2
  • +
  • -

#5 musicgrain1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-September 11

Re: Update my Opencart 1.4.9.1 products automatically with ASP, PHP, MYSQL

Posted 14 September 2012 - 09:11 AM

View PostCTphpnwb, on 14 September 2012 - 07:55 AM, said:

  • This forum is for helping people write their own code.
  • By choosing to use some one else's code you assume responsibility for it. It's your job to make it readable.
  • PHP is server side and HTML is client side. The part of the code you're asking about is not server side. It cannot input anything into any database. It can only submit data to the server, which will then run a PHP script which can access the database.


Quote

I've been moiling it over in my head how to use it to benefit me. This is the only code I have to work with, I'd try something else if I knew what how to mold it right. I can't get to server side to grab data. Its all like this on client side.

Was This Post Helpful? 0
  • +
  • -

#6 musicgrain1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-September 11

Re: Update my Opencart 1.4.9.1 products automatically with ASP, PHP, MYSQL

Posted 14 September 2012 - 09:17 AM

View Postmusicgrain1, on 14 September 2012 - 09:11 AM, said:

View PostCTphpnwb, on 14 September 2012 - 07:55 AM, said:

  • This forum is for helping people write their own code.
  • By choosing to use some one else's code you assume responsibility for it. It's your job to make it readable.
  • PHP is server side and HTML is client side. The part of the code you're asking about is not server side. It cannot input anything into any database. It can only submit data to the server, which will then run a PHP script which can access the database.


Quote

I've been moiling it over in my head how to use it to benefit me. This is the only code I have to work with, I'd try something else if I knew what how to mold it right. I can't get to server side to grab data. Its all like this on client side.


Quote

I'm just trying to do inventory control for over 7000 products and its a pain in the butt to have to do it for that many items. I'm not being lazy and trying to get out of something I started, just want to make it more simpler and add automation to the process. Also I'm trying my best to understand the freaking code to the best of my arability, I'm not mad or nothing just frustrated.

Was This Post Helpful? 0
  • +
  • -

#7 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 3077
  • Posts: 10,786
  • Joined: 08-August 08

Re: Update my Opencart 1.4.9.1 products automatically with ASP, PHP, MYSQL

Posted 14 September 2012 - 10:28 AM

If I were going to write this code it would make little to no difference to me if there were two items or seven thousand because they'd all be treated the same way. My code would look nothing like what you've posted though.

Here's something you can start with:
<?php
class inventory {
	protected $id;
	protected $price;
	protected $quantity_ordered;
	protected $quantity_in_stock;
	
	function get_item($i, $pdo) {
		// write this function!
	}
}

$dsn = "mysql:host=localhost;dbname=test";
$username = "root"; 
$password = "root";
$options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);

$PDO = new PDO($dsn, $username, $password, $options);

$items = array();
$items[0] = new inventory();
$items[0]->get_item($_POST['itemID'],$PDO);


Let's see what you can do from there.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1