Guest Posted October 19, 2002 Posted October 19, 2002 This is what I am looking to do... I want to create a field for each product that has a couple of variables that relate to shipping stock ships: Same day in 24 Hours in 3 days in 5 days Out of Stock Back Ordered It is my belief that the manufacturer function will do this effectivly however I use my manufacturer for manufacturers. So what I am thinking would be perfect would be to; Copy the Manufacturer DB table and rename it to shipping_stock. Then to copy the manufacturer PHP pages and rename them to shipping_stock. Modify the PHP pages to change "Manufacturer" to "Ships In:" Also add a column in the product_info so that is displays both the Manufacturer and the new Ships In column This is the best solution that I can come up with and my experience with PHP & MySQL is pretty limited. I can usually figure things out if given enough time but what I am wondering is how is the best way to do this.. I can probably modify all my PHP pretty easily without any help but how do I go about entering the new fields into the DB OBTW I do NOT use MyPHPadmin. for security reason our DB server is isolated from the Internet and I have to do all my modifications right on the server with the MySQL tools provided. Any help on this subject would be awesome and I know that if any body in the world can help me they would be HERE in these forums!! TIA Shawn Quote
Guest Posted October 19, 2002 Posted October 19, 2002 You could also use the stock to do that $prod_quantity = tep_get_products_stock($reviews_array[$i]['products_id']); switch ($prod_quantity) { case 0: echo ' <a href="shipping.php">'. tep_image_button('rd.gif').'</a> '; break; default: echo ' <a href="shipping.php">'. tep_image_button('gr.gif').'</a> '; } i use that to show a image on my reviews page but you could set the case 0 part to someting like case 0: echo 'Out of Stock '; break; case 1000: echo ' in 5 days'; break; case 2000: echo 'in 3 days '; break; case 2000: echo 'in 24 Hours'; break; default: echo 'Same day' its a cheap way to do it but it works so if you set a products stock that you can deliver in 5 days to 1000 it will echo the text in 5 days important for doing this is to switch of the Subtract stock in admin Quote
Guest Posted October 19, 2002 Posted October 19, 2002 That look great!!! This might sound silly but which PHP page is it I need to Modify with this code in order to get his to werk.. product_info?? I like the way it shows up on your site all though I cant read german :lol: Quote
Guest Posted October 19, 2002 Posted October 19, 2002 I must be pretty thick, :oops: I am having trouble figuring out where to input this code.. the code is self is pretty explainatory but where do I stick it?? {hahah no funny comments :lol: } TIA Shawn Quote
Guest Posted October 20, 2002 Posted October 20, 2002 NM I got it.. See enough time and EVEN I can figure it out!! Thanx Shawn BTW the code you posted must be from an earlier snapshot cuz it would not werk for me but by using your example I was able to figure out wich variables and format to use!! :lol: Werks Great!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.