Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Shopping Cart Help Needed
Old 04-11-2005, 07:45 PM Shopping Cart Help Needed
Junior Talker

Posts: 1
Trades: 0
Hiya this is my first post!!

I need some help i need to move the form with quantity and buy me up so it run alongside the tee-shirt graphic and beneath the tell a friend link!!

Help!!

Here is the info

http://www.littlebluedog.co.uk/store...php?product=11

PHP Code:
<?php
/***************************************************************************
*    File Info: view_product.php
*    Purpose:   View Particular Product
*    Updated:   31/07/2003
****************************************************************************
*    Developer: Alistar Brookbanks (Devellion Limited)
*    Copyright: (C)2003 Devellion Limited - [url]http://www.devellion.com[/url]
*    Copyright: (C)2003 [url]http://www.cubecart.com[/url]
*    This program is not "free" software and restrictions apply!
*    Further Info: [url]http://www.cubecart.com/license.php[/url]
*    Contact [email]support@cubecart.com[/email] if any conditions are not clear.
*
*    Licensees holding valid "CubeCart Licence Number" may edit
*    the (powered by CubeCart) from browser title and "Powered by CubeCart"
*    and "(c) Brooky.com" from the web page footer.
*
*    This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
*    THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
*    PURPOSE. This and all others in the download package can only be
*    redistributed with written permission from Alistair Brookbanks!
*
*    The "CubeCart License" is available to purchase at
*    [url]http://www.cubecart.com/site/purchase/[/url]
*    For pricing please contact us via e-mail at [email]sales@cubecart.com[/email]
***************************************************************************/

session_start();

include(
"admin/config.php");

include( 
"admin/settings.inc.php");

include( 
"shoppingcart.php");



$cart = new Cart;



// start border


    // make sure product exists/has been selected
    
if(empty($product))
        {
            echo 
"<div align='center'><br>$la_view_prod_sel</div>";
        }
    else
        {
            if(isset(
$product) && !empty($product)){
            
$select_prod mysql_query"SELECT * FROM ".$prefix."store_inventory WHERE product='".cleanData($product,"text")."'");
            
$totalrows mysql_num_rows($select_prod);
            }

            if(
$totalrows==0)
                {
                    echo
"<br><br><p align=\"center\">$la_view_prod_noexist</p>";
                }

    
// build page for product
    
if($totalrows!==0)
        {
            while (
$row mysql_fetch_array($select_prod))
                {
                    
$title $row["title"];
                    
$image $row["image"];
                    
$description $row["description"];
                    
$quantity $row["quantity"];
                    
$price $row["price"];
                    
$sale_price $row["sale_price"];
                    
$cat_id $row["cat_id"];
                    
$popularity $row["popularity"];
                }

    
// add 1 to products popularity
    
$new_pop $popularity 1;
    
$sql_update "update ".$prefix."store_inventory set popularity='$new_pop' where product='".cleanData($product,"text")."'";
    
$result mysql_query ($sql_update);

    
$title=stripslashes($title);
    
$description stripslashes($description);
    
$description nl2br($description);

    
$select_cat mysql_query"SELECT * FROM ".$prefix."store_category WHERE cat_id='".cleanData($cat_id,"int")."'");
    while (
$row mysql_fetch_array($select_cat))
        {
            
$category $row["category"];
            
$cat_image $row["cat_image"];
        }




if (
$cat_image!='catnophoto.gif')
    {
        echo
"</p><img src='images/$cat_image'><br>";
    }

    echo
"<br><FORM ACTION=\"view_cart.php?add=$product\" name=\"add_product\" method=\"post\">
            <table align=\"center\" width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
                <tr>
                    <td bgcolor=\"
$colour_2\">
                        <table cellpadding=\"3\" border=\"0\" cellspacing=\"1\" width=\"100%\" align=\"center\">
                            <tr bgcolor=\"
$colour_1\" valign='top'>
                                <td width=\"33%\"><b>
$title</b>
                                <p><div align='center'><img src='images/
$image'></div></p></td>
                                <td align='left' valign='top' width=\"66%\" colspan=\"2\"><p><b>
$la_store_description:</b></p>$description";

                                
// next line for when stock quanity mod is made
                                //<p><b>$la_order_quan:</b> $quantity</p>

                                
if(($sale=="Y")and($sale_price!=="0.00"))
                                    {
                                        echo
"<p><b>$la_normal_price</b> $currency<s>$price</s></p>";
                                        echo
"<p><b>$la_sale_price</b> $currency<font color=\"990000\">$sale_price</font></p>";
                                    }

                                if((
$sale=="Y")and($sale_price=="0.00"))
                                    {
                                        echo
"<p><b>$la_store_price:</b> $currency$price</p>";
                                    }

                                if(
$sale=="N")
                                    {
                                        echo
"<p><b>$la_store_price:</b> $currency$price</p>";
                                    }

                                echo
"<p><img src='images/bullet.gif' border='0'> <a href='tellafriend.php?product=$product&session=$session'>$la_view_prod_tellfriend</a></p>";
                                
// future link to wishlist.php ;)
                                //echo"<p><img src='images/bullet.gif' border='0'> <a href='wishlist.php?product=$product&session=$session'>$la_view_prod_add_wish</a></p></td>

                                // START PRODUCT OPTIONS
                                
$select mysql_query("SELECT distinct option_id FROM ".$prefix."store_options_bot WHERE product='$product'");
                                
$count mysql_num_rows($select);

                                if(
$count>0)
                                    {
                                        echo
"<b>$la_product_options_view</b><br>";

                                        
//start table
                                        
echo"<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\">";

                                        
// find options

                                        
$option_number 0;

                                        while (
$row mysql_fetch_array($select))
                                            {
                                                
$option_id $row["option_id"];

                                                
$option_number $option_number 1;

                                                echo
"<tr>
                                                        <td align=\"left\">"
;

                                                        
// build option name
                                                        
$query "select * from ".$prefix."store_options_top where option_id = '$option_id'";
                                                        
$result mysql_query($query)or die("Error: " mysql_error());
                                                        while (
$row mysql_fetch_array($result))
                                                            {
                                                                
$option_name=$row["option_name"];
                                                            }

                                                        echo
"$option_name:";

                                                        echo
"</td><td align=\"left\">";

                                                        
// build select
                                                        
echo"<select name=\"dyn_opt$option_number\">
                                                                <option value=\"\">
$la_please_choose</option>";

                                                                
$select_value mysql_query("SELECT * FROM ".$prefix."store_options_bot WHERE product='$product' and option_id = '$option_id'");

                                                                while (
$row_value mysql_fetch_array($select_value))
                                                                    {
                                                                        
$assign_id $row_value["assign_id"];
                                                                        
$value_id $row_value["value_id"];
                                                                        
$option_price $row_value["option_price"];
                                                                        
$option_symbol $row_value["option_symbol"];

                                                                        
// get value name :)
                                                                        
$query_name "select * from ".$prefix."store_options_mid where value_id = '$value_id'";
                                                                        
$result_name mysql_query($query_name)or die("Error: " mysql_error());

                                                                        while (
$row_name mysql_fetch_array($result_name))
                                                                            {
                                                                                
$value_name=$row_name["value_name"];
                                                                            }

                                                            echo
"<option value=\"$assign_id\">$value_name";
                                                            if(
$option_price!=0){
                                                            echo
" ($option_symbol $currency$option_price)";}
                                                            echo
"</option>";

                                                                    }

                                                        echo
"</select>";

                                                echo
"</td>
                                            </tr>"
;
                                        }

                            echo
"</table>";
                    } 
//end if($count>0)
                    // END PRODUCT OPTIONS

            
echo"</tr>
            <tr height=\"30\">
                <td width=\"33%\" height=\"30\" background=\"images/grey_bev.gif\">
$la_view_prod_code $product</td>
                <td height=\"30\" align=\"right\" valign=\"middle\" background=\"images/grey_bev.gif\">
$la_order_quan: <INPUT TYPE=\"text\" class=\"textbox\" size=\"3\" value=\"1\" name=\"quan\"></td>
                <td height=\"30\" align=\"center\" background=\"images/grey_bev.gif\" align=\"right\" valign=\"middle\">

                        <table width=\"94\" height=\"24\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
                            <tr valign=\"middle\">
                                <td height=\"24\" width=\"94\" background=\"images/white_button.gif\" valign=\"middle\" align=\"center\" style='cursor:hand;' onClick='add_product.submit();'><a href='#'><font class=\"wht_btn\">
$la_add_to_basket</font></a></td>
                            </tr>
                        </table>
                    </td></form>
                </tr>
            </table>
        </td>
    </tr>
</table><br><br>"
;

    }
}
//end if there is a result

// end border
eb($bg_colour,$colour_1);

include(
"subfooter.inc.php");

include(
"footer.inc.php");

?>

Anyhelp would sure be appreciated!!!

Thankyou so much

Last edited by 0beron; 04-11-2005 at 09:01 PM..
unbeat3n is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-12-2005, 09:59 AM
KML9870's Avatar
One Bad Mamma :-)

Posts: 5,489
Name: Kandi
Location: Western NY
Trades: 0
I don't believe it's in your php code, but in your html. Your form should come right after "Tell a friend" but it appears to be after your product code.
KML9870 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Shopping Cart Help Needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16637 seconds with 12 queries