#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Ireland
    Posts
    20
    Rep Power
    0

    Calculating total price


    Hi, I have a page that i have all the values displaying for baseprice, quantity, colour. but i don't know how to calculate the total price. attached is the relevant code i have but obv my totalprice calculation is wrong. any help much appreciated. thanks.

    PHP Code:
    <table cellpadding="6" cellspacing="0"> 
    <tr> 
    <td width="160">Base Price:</td> 
    <td name="price" id="baseprice"><?php echo $row_products['product_price']; ?></td> 
    </tr> <tr> 
    <td width="160">Size Variation:</td> 
    <td name="sizeprice" id="sizeprice"></td> 
    </tr> <tr>
    <td> <select name="size" class="small" id ="size" onChange="changePrice()"> 
    <option value="25.00">12 size</option> 
    <option value="30.00">14 size(+30.00 per unit)</option> <option value="40.00">18 size(+40.00 per unit)</option> <option value="45.00">20 size(+45.00 per unit)</option> <option value="80.00">28 size(+80.00 per unit)</option> </select> 
    </td>
    <td></td>
    </tr> <tr> 
    <td width="160">Colour Variation:</td> 
    <td name="colourprice" id="colourprice"></td> 
    </tr> <tr>
    <td> <select name="colour" class="small" id ="colour" onChange="changeColour()"> 
    <option value="">Please Select...</option> 
    <?php do { ?>
    <option value="<?php echo $row_colours['variation_price']?>"><?php echo $row_colours['colour_name']?> (+<?php echo $row_colours['variation_price']?>)</option> 
    <?php 
    while (
    $row_colours mysql_fetch_assoc($colours)); 
    $rows mysql_num_rows($colours); 
    if(
    $rows 0) { mysql_data_seek($colours0); 
    $row_colours mysql_fetch_assoc($colours); } 
    ?> 
    </select> 
    </td>
    <td></td>
    </tr> <tr> 
    <td width="160">Qty:</td> 
    <td name="qtyprice" id="qtyprice"></td> 
    </tr> <tr>
    <td> <select name="qty" class="small" id ="qty" onChange="changeQty()"> 
    <option value="">Please Select...</option> 
    <?php do { ?> 
    <option value="<?php echo $row_quantity['product_price']?>"><?php echo $row_quantity['product_qty']?></option> 
    <?php 
    while (
    $row_quantity mysql_fetch_assoc($quantity)); 
    $rows mysql_num_rows($quantity); 
    if(
    $rows 0) { mysql_data_seek($quantity0); 
    $row_quantity mysql_fetch_assoc($quantity); 
    ?> 
    </select> 
    </td>
    <td></td>
    </tr> <tr> 
    <td width="160" height="50">
    <div align="center"><strong>Total Price:</strong></div></td>
    <td name="totalprice" id="totalprice"><div align="center"> 
    <?php $totalprice=$row_products['product_price'] + $sizeprice $colourprice $qtyprice?> 
    <?php echo $totalprice?> 
    </div>
    </td> 
    </tr> 
    </table> 

    <script> function changePrice() { document.getElementById('sizeprice').innerHTML=document.getElementById('size').value; } 

    function changeColour() { document.getElementById('colourprice').innerHTML=document.getElementById('colour').value; } 

    function changeQty() { document.getElementById('qtyprice').innerHTML=document.getElementById('qty').value; } 
    </script>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Dec 2004
    Posts
    3,002
    Rep Power
    376
    well for each row you calculate the qty * price +( qty * sizeprice) + (qty + colourprice) and can i just say this is an awful lot of complication. seriously no one has different prices based on colour/size anymore.

    not sure where the issue is?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Ireland
    Posts
    20
    Rep Power
    0
    thank you for your input but some people do need colour and size variation prices, this is not a clothing company or standard products, we sell promotional materials where every product can have a different size, colour, print option, different amount of colours in printing option, basically everything is customizable and has different variations in prices.

    and i can't have everything multiplied by qty, i need the (baseprice + sizeprice + colourprice) * qty

    the issue is that i don't know how to do it, its the actual syntax, how to get the variables from the option boxes above to the calculation, do i need to declare them somewhere? keeping in mind that these options will then need to be passed to the cart page after

    thanks,

    karen
  6. #4
  7. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    This kind of crazy spaghetti code is going to come back to bite you. It's nearly impossible to read or debug any of this.

    You seem to be calculating the price in...javascript? And putting these prices into a table cell or something. Then wanting to pull the data OUT of that cell and use it again for more calculations.

    You should know right off the bat that JS calculations should not be used for a shopping cart. Anyone with any skill can go in and change all of these numbers. if you're only using this for display purposes it's fine, but if your business relies on these calculations you've done it wrong and need to stop right now.

    Wherever your script is which calculates sizeprice, also have it push the total. You're using PHP variables when you expect javascript ones, some of the variables are table cells, and there's a SQL query which exists somewhere outside of this code.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Ireland
    Posts
    20
    Rep Power
    0
    the javascript is only to change the dropdown boxes and display the price of the equivalent choice.

    all prices are stored in mysql. i want the totalprice to be calculated in php so that it can be used to continue on to the next page, so far i haven't done any calculations, the totalprice one that i put in was just to show what i needed. I don't know how to do it which is why i asked for help. if there is a way of displaying the relevant price after user makes choice using php i would much prefer to use it
  10. #6
  11. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    You're not using while loops correctly either, most of your rows won't ever exist.

    Where does the query happen? Why is there a loop if you're only doing this...once? What is this page supposed to be? How many items, what are the drop downs...this whole thing is impossible to understand.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Ireland
    Posts
    20
    Rep Power
    0
    thanks for quick response, as you've probably guessed i'm only starting out on my php endevours, i didn't include all of the code as i thought that it wasn't needed, below is the code for the whole page. the base price, qty price and colour price are pulled from a db.

    any suggestions u can offer to clean this up a little would be much appreciated. but for now i really just need to get the total price to add up

    PHP Code:

    <?php require_once('../Connections/adlantic.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function 
    GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
    {
      
    $theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

      
    $theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

      switch (
    $theType) {
        case 
    "text":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;    
        case 
    "long":
        case 
    "int":
          
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case 
    "double":
          
    $theValue = ($theValue != "") ? "'" doubleval($theValue) . "'" "NULL";
          break;
        case 
    "date":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;
        case 
    "defined":
          
    $theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
          break;
      }
      return 
    $theValue;
    }
    }

    mysql_select_db($database_adlantic$adlantic);
    $query_category "SELECT * FROM categories WHERE display = 'Y' ORDER BY cat_display_order ASC";
    $category mysql_query($query_category$adlantic) or die(mysql_error());
    $row_category mysql_fetch_assoc($category);
    $totalRows_category mysql_num_rows($category);

    $colname_products "-1";
    if (isset(
    $_GET['recordID'])) {
      
    $colname_products $_GET['recordID'];
    }
    mysql_select_db($database_adlantic$adlantic);
    $query_products sprintf("SELECT * FROM products WHERE product_code = %s"GetSQLValueString($colname_products"text"));
    $products mysql_query($query_products$adlantic) or die(mysql_error());
    $row_products mysql_fetch_assoc($products);
    $totalRows_products mysql_num_rows($products);

    $colname_pricing "-1";
    if (isset(
    $_GET['recordID'])) {
      
    $colname_pricing $_GET['recordID'];
    }
    mysql_select_db($database_adlantic$adlantic);
    $query_pricing sprintf("SELECT * FROM prices WHERE product_code = %s"GetSQLValueString($colname_pricing"text"));
    $pricing mysql_query($query_pricing$adlantic) or die(mysql_error());
    $row_pricing mysql_fetch_assoc($pricing);
    $totalRows_pricing mysql_num_rows($pricing);

    $colname_quantity "-1";
    if (isset(
    $_GET['recordID'])) {
      
    $colname_quantity $_GET['recordID'];
    }
    mysql_select_db($database_adlantic$adlantic);
    $query_quantity sprintf("SELECT * FROM prices WHERE product_code = %s"GetSQLValueString($colname_quantity"text"));
    $quantity mysql_query($query_quantity$adlantic) or die(mysql_error());
    $row_quantity mysql_fetch_assoc($quantity);
    $totalRows_quantity mysql_num_rows($quantity);

    $colname_colours "-1";
    if (isset(
    $_GET['recordID'])) {
      
    $colname_colours $_GET['recordID'];
    }
    mysql_select_db($database_adlantic$adlantic);
    $query_colours sprintf("SELECT * FROM colour_variation WHERE product_code = %s"GetSQLValueString($colname_colours"text"));
    $colours mysql_query($query_colours$adlantic) or die(mysql_error());
    $row_colours mysql_fetch_assoc($colours);
    $totalRows_colours mysql_num_rows($colours);
    ?>
    <!DOCTYPE html>
    <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
    <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
    <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
    <!--[if (gte IE 9)|!(IE)]><!--><html dir="ltr" lang="en"> <!--<![endif]-->
    <head>
        
        <!-- Basic Page Needs
      ================================================== -->
        <base href="http://localhost/adlantic/newtemplate/" />
        <meta charset="utf-8">
        <title>The Perfect Hope</title>
                    <link href="images/data/cart.png" rel="icon" />
                <link href="product_product.php?recordID=<?php echo $row_products['product_code']; ?>" rel="canonical" />
        
        <!-- Mobile Specific Metas
      ================================================== -->
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <?php include("cssjs.php"?>
        
        <!-- Custom Css
        ================================================== -->
        <link rel="stylesheet" id="active-bg" href="theme/adlantic/css/bg/soft_wallpaper.css">

    <style type="text/css">
    div.featured ul li { min-height: 320px!important;}
    div.latest ul li { min-height: 320px!important;}
    div.special ul li { min-height: 320px!important;}
    #products_grid ul.product_show li { min-height: 320px!important;}
    #products_grid_4_cols ul.product_show li { min-height: 320px!important;}
    div.related ul li { min-height: 320px!important;}
    ul.customListStyle li {
            margin: 0;
        padding:6px 0 6px 20px;
        color:#444;
        background: url('theme/adlantic/images/icons/arrow_right.png') no-repeat left center;
    }
    </style>    
        
        
        <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-41482001-1']);
      _gaq.push(['_setDomainName', 'adlantic.ie']);
      _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>    

    </head>
    <body>

    <?php include("header.php"?>

    <div class="container">
            <div class="sixteen columns">
                <div id="notification"></div>
            </div>
    </div><!--end container--><div class="container">
        <div class="sixteen columns">
            <div id="pageName">
                <div class="name_tag">
                    <p>
        <a href="index.php">Home</a> :: 
        <a href="product_category.php?recordID=<?php echo $row_products['category']; ?>"><?php echo $row_products['category']; ?></a> :: 
      <a href="product_category.php?recordID=<?php echo $row_products['sub_category']; ?>"><?php echo $row_products['sub_category']; ?></a> :: 
    <a href="product_product?recordID=<?php echo $row_products['product_code']; ?>"><?php echo $row_products['product_name']; ?></a>
                  </p>
                  <div class="shapLeft"></div>
                    <div class="shapRight"></div>
                </div>
            </div><!--end pageName-->
        </div>
    </div><!-- container -->

    <!-- strat the main content area -->
    <div class="container">
            <div id="pr_style" class="sixteen columns">
                            
    <div class="ten columns alpha">
                <div class="product_img clearfix">
                    <ul id="etalage">
                                    <li>
                        <a href="theme/adlantic/images/products/<?php echo $row_products['product_image_big1']; ?>" title="<?php echo $row_products['image_caption_1']; ?>">
                        <img class="etalage_thumb_image" src="theme/adlantic/images/products/thumbs/<?php echo $row_products['product_thumb_1']; ?>" title="<?php echo $row_products['image_caption_1']; ?>" alt="<?php echo $row_products['image_caption_1']; ?>">
                        <img class="etalage_source_image" src="theme/adlantic/images/products/<?php echo $row_products['product_image_big1']; ?>" title="<?php echo $row_products['image_caption_1']; ?>" alt="<?php echo $row_products['image_caption_1']; ?>">
                        </a>
                    </li>
                    <li>
                        <a href="theme/adlantic/images/products/<?php echo $row_products['product_image_big2']; ?>" title="<?php echo $row_products['image_caption_2']; ?>">
                        <img class="etalage_thumb_image" src="theme/adlantic/images/products/thumbs/<?php echo $row_products['product_thumb_2']; ?>" title="<?php echo $row_products['image_caption_2']; ?>" alt="<?php echo $row_products['image_caption_2']; ?>">
                        <img class="etalage_source_image" src="theme/adlantic/images/products/<?php echo $row_products['product_image_big2']; ?>" title="<?php echo $row_products['image_caption_2']; ?>" alt="<?php echo $row_products['image_caption_2']; ?>">
                        </a>
                    </li>
                    <li>
                        <a href="theme/adlantic/images/products/<?php echo $row_products['product_image_big3']; ?>" title="<?php echo $row_products['image_caption_3']; ?>">
                        <img class="etalage_thumb_image" src="theme/adlantic/images/products/thumbs/<?php echo $row_products['product_thumb_3']; ?>" title="<?php echo $row_products['image_caption_3']; ?>" alt="<?php echo $row_products['image_caption_3']; ?>">
                        <img class="etalage_source_image" src="theme/adlantic/images/products/<?php echo $row_products['product_image_big3']; ?>" title="<?php echo $row_products['image_caption_3']; ?>" alt="<?php echo $row_products['image_caption_3']; ?>">
                        </a>
                    </li>
                    <li>
                        <a href="theme/adlantic/images/products/<?php echo $row_products['product_image_big4']; ?>" title="<?php echo $row_products['image_caption_4']; ?>">
                        <img class="etalage_thumb_image" src="theme/adlantic/images/products/thumbs/<?php echo $row_products['product_thumb_4']; ?>" title="<?php echo $row_products['image_caption_4']; ?>" alt="<?php echo $row_products['image_caption_4']; ?>">
                        <img class="etalage_source_image" src="theme/adlantic/images/products/<?php echo $row_products['product_image_big4']; ?>" title="<?php echo $row_products['image_caption_4']; ?>" alt="<?php echo $row_products['image_caption_4']; ?>">
                        </a>
                    </li>
                    <li>
                        <a href="theme/adlantic/images/products/<?php echo $row_products['product_image_big5']; ?>" title="<?php echo $row_products['image_caption_5']; ?>">
                        <img class="etalage_thumb_image" src="theme/adlantic/images/products/thumbs/<?php echo $row_products['product_thumb_5']; ?>" title="<?php echo $row_products['image_caption_5']; ?>" alt="<?php echo $row_products['image_caption_5']; ?>">
                        <img class="etalage_source_image" src="theme/adlantic/images/products/<?php echo $row_products['product_image_big5']; ?>" title="<?php echo $row_products['image_caption_5']; ?>" alt="<?php echo $row_products['image_caption_5']; ?>">
                        </a>
                    </li>
                    <li>
                        <a href="theme/adlantic/images/products/<?php echo $row_products['product_image_big6']; ?>" title="<?php echo $row_products['image_caption_6']; ?>">
                        <img class="etalage_thumb_image" src="theme/adlantic/images/products/thumbs/<?php echo $row_products['product_thumb_6']; ?>" title="<?php echo $row_products['image_caption_6']; ?>" alt="<?php echo $row_products['image_caption_6']; ?>">
                        <img class="etalage_source_image" src="theme/adlantic/images/products/<?php echo $row_products['product_image_big6']; ?>" title="<?php echo $row_products['image_caption_6']; ?>" alt="<?php echo $row_products['image_caption_6']; ?>">
                        </a>
                    </li>
                    
                  </ul>
                    
                    <div id="hidden"><div id="zoom"></div></div>
                </div><!--end product_img-->
                
                <!--start product tab here-->
                            <div class="product_tabs">
    <div id="tabs">
                        <ul class="tabNav clearfix">
                        <li><a class="currentTab" href="#pricing">Pricing</a></li>
                          <li><a href="#options">Options</a></li>
                             <li><a href="#quote">Get Quote</a></li>
    </ul>
                        <div id="tabContentOuter">

                            <div id="pricing" class="tabContent"> 
                            <table>
                             <tr><td align="center">Quantity</td><td>Price per unit</td></tr>
                              <?php do { ?>
                              <tr>
                                <td width="150"><center><?php echo $row_pricing['product_qty']; ?></center></td>
                                <td align="center"><?php echo $row_pricing['product_price']; ?></td>
                              </tr>
                              
                                <?php } while ($row_pricing mysql_fetch_assoc($pricing)); ?>
                            </table>
                            
                            
            </div>        
            <div id="options" class="tabContent"> 
                          <h6>Available Colours</h6>
                          <table>
                             <tr><td align="center">Colour</td><td>Price variation</td></tr>
                              <?php do { ?>
                              <tr>
                                <td width="150"><center><?php echo $row_colours['colour_name']; ?></center></td>
                                <td align="center"><?php echo $row_colours['variation_price']; ?></td>
                              </tr>
                                <?php } while ($row_colours mysql_fetch_assoc($colours)); ?>
                  </table>
                  <br /><br />
                  <h6>Available Sizes</h6>
                          <table>
                             <tr><td align="center">Sizes</td><td>Price variation</td></tr>
                              <?php do { ?>
                              <tr>
                                <td width="150"><center><?php echo $row_colours['colour_name']; ?></center></td>
                                <td align="center"><?php echo $row_colours['variation_price']; ?></td>
                              </tr>
                                <?php } while ($row_colours mysql_fetch_assoc($colours)); ?>
                  </table>
            </div>        


    <div id="quote" class="tabContent"> 
    <table cellpadding="6" cellspacing="0">
    <tr>
    <td width="160">Base Price:</td>
    <td width="60">&nbsp;</td>
    <td name="price" id="baseprice"><div align="right"><?php echo $row_products['base_price']; ?></div></td>
    </tr>
    <tr>
    <td width="160">Size Variation:</td>
    <td></td>
    <td name="sizeprice" id="sizeprice"><div align="right"></div></td>
    </tr>
    <tr><td>
    <select name="size" id ="size" onChange="changePrice()">
    <option value="25.00">12 size</option>
    <option value="30.00">14 size(+30.00 per unit)</option>
    <option value="40.00">18 size(+40.00 per unit)</option>
    <option value="45.00">20 size(+45.00 per unit)</option>
    <option value="80.00">28 size(+80.00 per unit)</option>
    </select>
    </td>
      <td></td>
      <td><div align="right"></div></td></tr>
    <tr>
    <td width="160">Colour Variation:</td>
    <td></td>
    <td name="colourprice" id="colourprice"><div align="right"></div></td>
    </tr>
    <tr><td>
    <select name="colour" id ="colour" onChange="changeColour()">
      <option value="">Please Select...</option>
      <?php
    do {  
    ?><option value="<?php echo $row_colours['variation_price']; ?>"><?php echo $row_colours['colour_name']; ?></option>
      <?php
    } while ($row_colours mysql_fetch_assoc($colours));
      
    $rows mysql_num_rows($colours);
      if(
    $rows 0) {
          
    mysql_data_seek($colours0);
          
    $row_colours mysql_fetch_assoc($colours);
      }
    ?>
    </select>
    </td>
      <td></td>
      <td><div align="right"></div></td></tr>

    <tr>
    <td width="160">Qty:</td>
    <td></td>
    <td name="qtyprice" id="qtyprice"><div align="right"></div></td>
    </tr>
    <tr><td>
    <select name="qty" id ="qty" onChange="changeQty()">
      <option value="">Please Select...</option>
      <?php
    do {  
    ?>
      <option value="<?php echo $row_quantity['product_price']?>"><?php echo $row_quantity['product_qty']?></option>
      <?php
    } while ($row_quantity mysql_fetch_assoc($quantity));
      
    $rows mysql_num_rows($quantity);
      if(
    $rows 0) {
          
    mysql_data_seek($quantity0);
          
    $row_quantity mysql_fetch_assoc($quantity);
      }
    ?>
    </select>
    </td>
      <td></td>
      <td><div align="right"></div></td></tr>
      
      <tr>
    <td width="160">Print Option:</td>
    <td></td>
    <td name="printprice" id="printprice"><div align="right"></div></td>
    </tr>
    <tr><td>
    <select name="print" id ="print" onChange="changePrint()">
      <option value="">Please Select...</option>
    </select>



    </td>
      <td></td>
      <td><div align="right"></div></td></tr>

      
    <tr>
    <td width="160" height="50"><div align="center"><strong>Total Price:</strong></div></td>
    <td>&nbsp;</td>
    <td name="totalprice" id="totalprice">
      <div align="right">
      <?php 
    $totalprice
    =$row_products['base_price'] + $sizeprice $colourprice $qtyprice
    ?>
        
      <?php echo $totalprice?>  </div></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td><ul class="pro_buttons">
                                <li><a id="button-cart" class="red_btn" >Convert to Order</a></li>
                            </ul>
        </td>
    </tr>
    </table>
    <script>
        function changePrice() {
            document.getElementById('sizeprice').innerHTML=document.getElementById('size').value;
        }

        function changeColour() {
            document.getElementById('colourprice').innerHTML=document.getElementById('colour').value;
        }
        
        function changeQty() {
            document.getElementById('qtyprice').innerHTML=document.getElementById('qty').value;
        }
    </script></div>
    </div><!--end tabContentOuter-->
    </div><!--end tabs-->
                    
    </div><!--end product_tabs-->
                        </div><!--end ten-->

            <div class="six columns omega">
                <div class="product_desc">
                    
                                                    <div class="pro_desc_conent">
                        <h6><?php echo $row_products['product_name']; ?></h6>
                    </div>
                    <div class="pro_desc_conent">
                        <h5>Starting from : 
                      <?php echo $row_products['product_price']; ?>                                                            </h5>
                        
                  </div>
                                                    <div class="pro_desc_conent">
                        <div class="pro_desc_list">
                        <ul>
                <li><strong>Product Code:</strong> <?php echo $row_products['product_code']; ?></li>
                <li><strong>Brand:</strong> <?php echo $row_products['supplier']; ?></li>
                <li><strong>Min Quantity:</strong> <?php echo $row_products['start_qty']; ?></li>
                        </ul>
                        </div><!--end pro_desc_list-->
                        
                                
                        
    <div class="options inputs clearfix">
                                                      
            <input type="hidden" name="product_id" size="2" value="<?php echo $row_products['product_code']; ?>" />
                        <strong>Description :</strong><br />
                            <?php echo $row_products['product_description']; ?>
                             

                        </div><!--end inputs-->
                    </div>

                </div><!--end product_desc-->
                
                                        <div class="make_review">
                    <div class="reviewform">    
                        <h6>Available Print Options</h6>

    1st colour set up fee  29.95 includes 1 colour imprint.  Please ask us about other imprint options or imprint in more colours.<br /><br />
    <p>
                                  <?php if($row_products['print_option_one'] == "1"){ 
    echo
    "<strong>Embroidery</strong>:<br />Embroidery can be easily placed on t-shirts, polo-shirts, sweatshirts, jackets, caps, bags, or most any kind of fabric.<br />To create your design: We accept all graphics formats, such as, JPEG, TIFF, BMP, PDF,EPS. "
    ?>
                      </p>
                              <p>
                                  <?php if($row_products['print_option_two'] == "1"){ 
    echo
    "<strong>Screen </strong>: <br />option two tis is a test to see if will work"
    ?>
                                  <br />
                                  <?php if($row_products['print_option_three'] == "1"){ 
    echo
    "<strong>Pad </strong>:<br /> option three tis is a test to see if will work"
    ?>
                                  <br />
                                  <?php if($row_products['print_option_four'] == "1"){ 
    echo
    "<strong>Digital Transfer </strong>:<br /> four tis is a test to see if will work"
    ?>
                                  <br />
                                  <?php if($row_products['print_option_five'] == "1"){ 
    echo
    "<strong>Laser Engraving </strong>:<br /> five tis is a test to see if will work"
    ?>
                                  <br />
                                  <?php if($row_products['print_option_six'] == "1"){ 
    echo
    "<strong>Deboss / Emboss / Hot Foil </strong>:<br /> six tis is a test to see if will work"
    ?>
                                  <br />
                                  <?php if($row_products['print_option_seven'] == "1"){ 
    echo
    "<strong>seven </strong>:<br />tis is a test to see if will work"
    ?>
                                  <br />
                      </p>
                              <?php if($row_products['print_option_eight'] == "1"){ 
    echo
    "<strong>eight </strong>:<br />tis is a test to see if will work"
    ?>
                        
                    </div><!--end div-->
                </div>
    </div><!--end six-->
                </div><!--end sixteen-->
        
        
        
                    
                
    </div><!--end container-->
    <!-- end the main content area -->
    <script type="text/javascript"><!--
    $('#button-cart').bind('click', function() {
        $.ajax({
            url: 'index.php?route=checkout/cart/add',
            type: 'post',
            data: $('.pro_desc_conent input[type=\'text\'], .pro_desc_conent input[type=\'hidden\'], .pro_desc_conent input[type=\'radio\']:checked, .pro_desc_conent input[type=\'checkbox\']:checked, .pro_desc_conent select, .pro_desc_conent textarea'),
            dataType: 'json',
            success: function(json) {
                $('.success, .warning, .attention, information, .error').remove();
                
                if (json['error']) {
                    if (json['error']['option']) {
                        for (i in json['error']['option']) {
                            $('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
                        }
                    }
                } 
                
                if (json['success']) {
                    $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
                        
                    $('.success').fadeIn('slow');
                        
                    $('#cart-total').html(json['total']);
                    
                    $('html, body').animate({ scrollTop: 0 }, 'slow'); 
                }    
            }
        });
    });
    //--></script>
    <script type="text/javascript"><!--
    $('#review .pagination a').live('click', function() {
        $('#review').slideUp('slow');
            
        $('#review').load(this.href);
        
        $('#review').slideDown('slow');
        
        return false;
    });            

    $('#review').load('index.php?route=product/product/review&product_id=53');

    $('#button-review').bind('click', function() {
        $.ajax({
            url: 'index.php?route=product/product/write&product_id=53',
            type: 'post',
            dataType: 'json',
            data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
            beforeSend: function() {
                $('.scc, .err').remove();
                $('#button-review').attr('disabled', true);
                $('#review-title').after('<div class="att"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> Please Wait!</div>');
            },
            complete: function() {
                $('#button-review').attr('disabled', false);
                $('.att').remove();
            },
            success: function(data) {
                if (data.error) {
                    $('#review-title').after('<div class="err">' + data.error + '</div>');
                }
                
                if (data.success) {
                    $('#review-title').after('<div class="scc">' + data.success + '</div>');
                                    
                    $('input[name=\'name\']').val('');
                    $('textarea[name=\'text\']').val('');
                    $('input[name=\'rating\']:checked').attr('checked', '');
                    $('input[name=\'captcha\']').val('');
                }
            }
        });
    });
    //--></script> 
    <script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script> 
    <script type="text/javascript"><!--
    if ($.browser.msie && $.browser.version == 6) {
        $('.date, .datetime, .time').bgIframe();
    }

    $('.date').datepicker({dateFormat: 'yy-mm-dd'});
    $('.datetime').datetimepicker({
        dateFormat: 'yy-mm-dd',
        timeFormat: 'h:m'
    });
    $('.time').timepicker({timeFormat: 'h:m'});
    //--></script> 
    <?php include("footer.php"?>

    <?php include("sidebar.php"?>
        
                <script type="text/javascript"><!--
            // building select nav for mobile width only
            $(function(){
                // building h6 item to toggle the main nav menu
                $('<h6 class="open_nav">My Account</h6>').appendTo('#topHeader div.sixteen');

                $('#topHeader h6').click(
                    function(){
                        $('#topHeader #topNav').slideToggle(150);
                    }
                );

            });
            //end

            // building select nav for mobile width only
            $(function(){
                // building h6 item to toggle the main nav menu
                $('<h6 class="open_nav">All Categories</h6>').appendTo('#mainNav nav');
                
                $('#mainNav nav h6').click(
                    function(){
                        $('#mainNav nav > ul').slideToggle(150);
                    }
                );
            });
            //end
        //--></script> 
        
        
    <!-- End Document
    =============== -->
    </body>
    </html>

IMN logo majestic logo threadwatch logo seochat tools logo