Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Create Popup Window With Product Details


I am attempting to create a popup window using the code that's shown here http://forums.devshed.com/t15928/s.html

I want it to display the product information when a user clicks a link from a table. But, I havent got a clue about where to start. I am displaying an alternate color table from what i assume is a recordset. please excuse my ignorance if this is straight forward as i only just started to attempt anything like this in the last week. PHP Code:




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Emailing Product Details
i have kind of a shopping cart i can add products to the cart but i need to email this selected informtaion to an email address. PHP Code:

Can't Open A New Fullscreen Popup From Another Popup Window
I can't seem to make a fullscreen popup from a page that is already a fullscreen popup. What I want to do is open another fullscreen popup window from a current fullscreen popup that has the link in it. The link that comes up is http://www.somesite.com/"javascript:void(0);/"

Here is a sample of the code I am working with. Does anyone see anything wrong?

echo '<html>'
echo '<head>'
echo '<script type="text/javascript" src="/uploads/File/Javascripts/new_window_max.js"></script>'
echo '</head>'
echo '<body>'
echo '<a href="javascript:void(0);" onclick="fullScreen('/uploads/File',$row['map'],'');">Map</a><br>'
echo '</body>'
echo '</html>'

Form For Uploading Product Details And Image
I am creating a product upload form, which includes product details, category and image.

The databases are as follows:

Category: (cat_id) (cat_name)

Products: (prod_id) (cat_id) (prod_name) (prod_photo) (prod_link) (prod_description) (prod_price) (prod_size)

products.cat_id will link to category.cat_id

Here's my major concern:

My image upload is not working. Of course, I have no idea whether the category info will work at this point, but if I can get the image upload to work -- I'll be able to test the category input and I'll post in a separate thread.

The prod_photo field is saved as LONGBLOB in the table. I believe the database is setup correctly. Code:

Populating Form In Parent Window With Value From Popup Window
I have a text box in the parent window.. now i want to populate this text box with a user_id that i will get from query within a popup window.. How do i get the value from the popup window to be passed to the main window form field in php. I know how it can be done in javascript but when i tried combining javascript and php i dont get the desired result.

Can A Popup Window Return Data To Parent Window?
Is it possible to do the following in php:
I want to have a main form open. In the form I want a button that will
open a popup window so the user can search for something. The user can
then select what they want, and the popup window closes and the main
form (which is still open) shows the search results.

Popup Window That Darkens The Window That Opened It
I just visited a website and saw how they darkened the background page
when a popup was opened. How can I do this using JS and HTML? Is it a
normal popup window?

Popup Window
I have a file called opportunityList.php .It has a search button in it.When I press the button a popup window opens.The file that opens in the popup window is searchOpportunity.php,in which there are some text boxes ,drop down boxes and one submit button.When I press submit button the values in the textboxes should be transfered to the main file i.e. from searchOpportunity.php to opportunityList.php and the window should close.

Popup Window
I am trying to make a popup window that when I click on a picture it pops up a new window with the bigger picture in it. Code:

Popup Window And Sessions
I encounter some troubles using $_SESSION, since I use a popup window
in my php code. I mean, $_SESSION['id'] contains a certain value, when
I click to get popup window opened, $_SESSION['id'] value has changed,
without being reaffected explicitly...

Sending Data To Popup Window
I have a table and when i do click in one of its parameters i open a popup window and obtain some data. It works ok when the parameter i do the link are just numbers(ex: 12345) but if i have other simbols on it doesn't work, for example: if i have 12345-1 instead of sending to the popup 12345-1 it sends 12344.

Passing Vars - Popup Window Problem
I currently have a problem passing a variable value from one page to
another. Once a form submit button is pressed java pops up a window and
displays some information. The problem being is variables value needs to
be passed from the main page to this popup window ... but it isn't. why?

the submit button one the PHP page is

$s_download_action = "index.$phpEx?page=downloads";

$download_url = "download.$phpEx";

$hidden_download_vars = '<input type="hidden" name="download_id"
value="' . $d_id . '" />'
$u_download = "<input type="submit" name="get_download" value="" .
$lang['Download'] . "" class="mainoption" onClick="window.open('" .
$download_url . "', '_spdownload', 'HEIGHT=250,resizable=yes,WIDTH=
400');return false;" />";

echo '<form action="' . $s_download_action . '" method="post">'
echo $hidden_download_vars . '' . $u_download;
echo '</form>'

[php] Using Session To Pass Values From A Popup Window...
i got a problem here. its like this... i have a popup php page... in it details of what is stored in my database is retrieve and displayed out.... but i want to pass the values that is displayed out in the popup window to the main window by using session .....
how can i do that?

How Do You Parse Post Variables To A Popup Window?
I know this isnt really a php question but can anyone tell me how
you parse post variables to a popup window, here's my code so far, im
trying to pass the value entered into a radio button:

<head>
<script language="JavaScript" type="text/JavaScript">
var win= null;
function NewWindow(mypage,myname,w,h,scroll)
{
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings ='height='+h+','
settings +='width='+w+','
settings +='top='+wint+','
settings +='left='+winl+','
settings +='scrollbars='+scroll+','
settings +='resizable=yes'
win=window.open(mypage,myname,settings);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<form name="answer" action="result.php" method="post">
<input type="radio" name="group1" value="Milk"> Milk<br>
<input type="radio" name="group1" value="Butter"> Butter<br>
<input type="radio" name="group1" value="Cheese"> Cheese<br>
<input type="submit" name="submit" value="submit" src="result.php"
onClick="NewWindow(this.src,'name',âÆ',âÆ','yes');retur n false" >
</form>
</body>

Popup Window List Of Values To Select
What i need to do is bring up a popup window with a list of values(values looked up from the database). The user should be able to select one of the values from the list and the value then populate a text box on the calling form.

Popup Window Show When Php Form Is Validated.
I am using a HTML/PHP form on a website I am doing. The form works and it even redirects to the correct page. However, instead of redirecting to a new page I would like it to call a popup window (600px x 400px)but leave the page that the form is on open so when they close the popup window the page is still there.

Session Variables Disappear When Popup Window Closes
I am in window one (of one) and I popup a second window. Everything is fine.  When the popup window closes the entire session in window one is destroyed!! I have tried everything from named sessions to caches, etc.. This does not happen when i start out with two windows open??

Open Popup Window When Page Is Loaded If A Field Is Populated
Would it be possible to open a popup window on loading the instruction page but only when the critical information section of the page contains text?

The popup window could either contain the contents of the critical information section or just a visual warning that such information exists on the main page.

I have a pretty good knowledge of VBA but sadly my knowledge of php and javascript is very limited.

Only Allowing Popup To Popup Once
I use an OnLoad event in the body tag to open a popup window. I would like to know how to go about only allowing the window to popup once i.e on subsequent visits to the parent page, the popup np longer pops up. I think it is irritating to users to have to close the popup everytime they visit the page. I think I need to set a cookie so that the server knows the visitor is a return visitor and not a new visitor, but I have no idea how to write the code. I do know a little php so I could combine php and javascript if that is the best way to achieve my goal.

Way I Can Stop The 'message Sent' Window Opening In Another Window?
everytime somebody sends a message from my contact form on my flash website, an additional window opens saying 'message sent', its not a big problem, its just annoying. Is there any code i could add to the contact.php form to prevent this from happening?

Reload Existing Window From Another Window
I have logg in page, after clicking loggin the pop up window apiears and
if user loggins it closes,
I want to reload if loggin succes ( I have handling sistem for it) ,page
were user have clicked to logg in, how do I do it?
is it possible to do it with php?

User Details
building a login system for my website and i need to know how do i get the name of the computer the user is on? i have already figured out how to get the ipaddress but testing that on our network here if i login on one computer all others get logged on automatically so i need to be able to identify the particular computer so as to prevent this.

Session Details
I'm interested in the details of how the built in session management works in PHP. For example, using the built in session support, including the files save handler, when PHP generates a new session ID, does it actually insure that it's unique?

That is, does it just generate a random ID, or does it check the existing sessions (e.g. read a listing of files in the save_path directory, or keep track in some internal data structure?) to make sure that ID is not already in use?

Browser Details
i would like to know how to get the browser details of my surfers (like: ip,
langauge, version, OS, etc').

Record Details
I have a database of properties and have a show all records page. From that page you get an option to view all details about any record. When i choose one, how does the info from (that) record get posted to a page that displays all the info. I used form varibles, is that the best way?

Registration Of User Details In A DB
I am creating a web application which involves users registering
details in a DB. Obviously this is a very common thing to do and there
seem to be many different ways to solve this problem.

1. Is there a way to do this without needing to hard code DB login
details into the source?

2. Is it better practice to create individual DB users for new members
when they register and use DB authentication, or should the DB
connections all be through a single user and use code to check a table
containing user name and password hash?

3. Is there a way to create a connection pool in PHP?

Using Require For DB Connection Details
I have taken over a job and one of my functions is updating and improving a website that creates reports from a Oracle DB. There are many php files and each of them has the DB connection details at the top of the file. I am wanting to make one file that has the connection details and require in each file, which would make it easier to update the connection details. I was told that in my php.ini that I had to update my include_path to say(oh yea php is installed on the c drive and the website data is on the g drive). include_path ".;g:websiteinetpubwwwroot...";

I then copied that connection details out of one file and pasted it into a new file and named it SouthDBConnection.php(saved it at the above mentioned path).

I then placed the line of code
require('SouthDBConnection.php');
in place of the connection details.

it does not connect. I have been using include instead to see whats going on. I tried putting echo "test"; into the SouthDBConnection.php file to see if it will echo onto the screen and it does not. I have tried using

include_path ".g:websiteinetpubwwwroot...";
and
include_path "g:websiteinetpubwwwroot...";
and nothing works

Supplying Details To Page Through Url
basically i'd like my users to be able to give their friends a link like this:

ww.mysite.com/index.php?id=[users id number]

and id like to use the id number supplied in a mysql query on the page. in abit more detail, the page contains a form , the friend fills the form in and the contents are logged in a database so it can be viewed by the user who sent the link.

i already have the link output ready thanks to some members in another thread, but i need to know how to make the page pick up the id. this is what i got so far: Code:

Adding A Page - FTP Details?
I am creating some PHP files and on one of them the user has an option to add a page.

I know how to create a page using PHP, but when I try to do it, it gives me a message saying I dont have permission to do this. Am I suppose to include the FTP details in order to do this? And if so, how do I insert them?

Online Product Catalog
Can anyone suggest me a good and reasonably priced or free script for setting up an online product catalog. Like the other image library scripts the catalog can create its own thubnails and we can also input the details about the product.

Product Attributes Problem?
While trying to design a database for shopping cart i encountered few problems which i am mentioning here.

I had hierarchical level of categories for products for which i designed table as:

I Need A Product Review Script
I need a script for reviewing products (much like epinions.com)
written in either perl or php (can't use asp). i am very strapped for
time and need a functional script asap, which is why i dont have time
to write it myself. i would prefer if it used a mysql db. basically, i
just need for people to be able to have members write out how much
they paid, pros/cons, overall opinion, whether or not they would buy
again, and some sort of rating system (ex 1-5 stars)/ i would need to
have a master page for each product which would have msrp,
manufacterer description, pic, etc. under that would be my sites
review of the prouct (if available), and under that member reviews.
members would be able to browse products by category w/ one
sub-category level, or manufacturer, or all 3. inside this products
would need to be able to be sorted by: newest, highest rating, lowest
rating, and price.

i really, really, really need this soon. even if u know of a script
that is like this, but basic, it would really help as i could finish
it myself. if any of u have a script that u use on your site that is
still fine i can customize it myself.

Multiple Product Options
I've built a number of online shops with but I want to increase the
flexibility of the system that I use, mainly relating to product options.

Currently I just use an admin area to assign one or more options to a product
and these get displayed on the product page of the site, however what I really
want to do is relate those options so that only the options available are
displayed. This has my head in a bit of a spin as I haven't entirely decided
on the best way to do this.

My current thinking is to - in the admin area - list all the permutations for
a product each with a stock level form element, then when submitting the form
I use PHP to only grab the options that are available and store them in MySQL
as an string that can be eval'd when extracted and processed on the product page.

The product option drop-downs would be displayed in an iframe so that it can
refresh quickly based on the options chosen and what's available. I was going
to output a JavaScript array and use that but I want the system to work
whether JS is on or off.

Does this sound the best way to go about this or are there better more
efficient ways?

Product Display PROBLEM With PHP + CSS
I have the folowing code looping thru a result set from the Database and
displaying a list of products.
I want to use CSS to display 3 products for each line ... or any number of
products that will fit in a line and look nice.
So from the php side How can I do something for every 3 records e.x every 3
records echo "<ul>".

Without any CSS it will display them vertically....

/************************************************** */
echo "<ul>";
while ($row_newProd=mysql_fetch_assoc($new_products))
{?>

<li>
<?php echo $row_newProd['products_shrt_desc']; ?><br>
<div align="center"><a href="index.php?products_id=<?php echo
$row_newProd['products_id']; ?>"><img src="/images/thumb_<?php echo
$row_newProd['products_img']; ?>" border="0" ></a></div>
<p><?php
display_product_price($row_newProd['products_price'],$row_newProd['products_offer']);
?></p>
</li>

<? }
echo "</ul>";

/************************/
css:

#new_products ul {
margin:0px;
list-style-type: none;
text-align:center;
padding: 0px;
}
#new_products ul li {
font-size:0.8em;
display:inline;
float:left;
/*border: 1px dashed #CCCCFF;*/
width:30%;
margin:2px;
}
/**************************************/

Echo Only The Most Recent Of A Product....
Right now I have a basic drop down menu which is populated by the MySQL database. Once the user submits the form they are taken to the results page that match their criteria. Code:

Changing Product System
Currently, in my shopping cart, it checks for a product id. If it already exists, it adds to the value ct_qty.

if (dbNumRows($result) == 0) {
// put the product in cart table
$sql = "INSERT INTO tbl_cart (pd_id, ct_qty, ct_session_id, item_color, item_size, ct_date)
VALUES ($productId, 1, '$sid', '$color', '$size', NOW())";
$result = dbQuery($sql);
}else{
$sql = "UPDATE tbl_cart
        SET ct_qty = ct_qty + 1
WHERE ct_session_id = '$sid' AND pd_id = $productId";

$result = dbQuery($sql);

But I want to be able to compare all the products where the product ids are the same, as well as session id. If one product exists and matches the same color AND size I want that quantity to update. If not, just add another item.  My problem is I'm not sure how to access every single row that matches the product id and session id.

Remove Product Quantity's
I'm trying to develop a simple shopping basket, how do I remove the quantity option from the following code, so that only one of each item can be purchased instead of 2 or more?

Also, if the product selected to add to basket, already exists in the shopping cart, how do I display a message notifying the user? Code:

Remove Product Quantity's
I'm trying to develop a simple shopping basket, how do I remove the quantity option from the following code, so that only one of each item can be purchased instead of 2 or more?

Also, if the product selected to add to basket, already exists in the shopping cart, how do I display a message notifying the user?...

Member Logged In, Updating Their Details.
I have got a login system using sessions, and wanted to have a page where once the user is logged in, they can see and change/edit their details.

I have currently got two pages, modify_user.php and do_modify_user.php to try and do this, but i keep getting an error on do_modify_user.php that the query was empty. Code:

Search Form To Results To Details
I have created a Search form in html that is processed by a php script via the POST method. All this works pretty well and lists results from my DB. Now i want to be able to click on 1 particular result to bring up a details page. I would like to create this via php so I don't have to create heaps of pages but just a template that uploads data from the DB.

Is this possible, and if so, where do i go from here???

Upload Details And Image Script:
I have a site that has vehicles for sale with an image and then a description next to it, there are about 10 of these on the page.

At the moment, the client emails me the details of the vehicles and I manually enter everything into the html to update the page, but to speed things up (and allow me to spend more time on other things!),

I need a script that the client can browse for the image of the vehicle, fill in a few forms (make, model, price etc) and upload it to the site.

How Do I Edit A List Of Files Associated With A Product ?
-I wrote a script that you use it to add products in the database.
-Each product is associated with files.
-In the Form to add the product you have to enter the product name in a
textfield and below there are $no_of_add_file filefields.
$no_of_add_file is an integer that determines the Maximum number of
filefields that you want to associate/add for each product.

So it succesfully adds the product and the files in a database and the
filesystem.

The problem I am trying to solve is how am I going to edit those files in
the product.
If you know what I mean... and you have done something like that or you know
a url or script that does that, pls let me know.
What I need mostly, is not the PHP code but the logic and what are the
possible ways of doing something like that.

In the database i have two tables that this script needs:
One is the products and the other the files.

Products : product_id, product_name
Files : file_id, file_name, product_id

Product Variants In An Ecommerce Application
I am trying to create a product variants facility for an ecommerce site
(php/mysql).

Each of my products have options & option values stored in the db like
this:

-------------------- -------------------------
| product_options | | product_option_values |
-------------------- -------------------------
| option_id | | option_value_id |
| name | | option_id |
| product_id | | value |
-------------------- -------------------------

I have created product variant tables as follows:
-------------------- -------------------------
| product_variants | | product_variant_items |
-------------------- -------------------------
| variant_id | | variant_item_id |
| price | | variant_id |
| weight | | option_id |
| stock_available | | option_value_id |
| product_id | | |
-------------------- -------------------------

This allows the stock, price etc to be set for combinations of options.

For example:
Blue/Medium/Long Sleeved
Blue/Large/Long Sleeved

The problem comes when i try to generate these variants from the
product options. I need to get all the combinations as shown in the
example but i have no

idea how to do it. For the moment i have created a form where each
combination can be added manually but idealy this would be generated
automatically.

Of its more than possible that this is just not the way to do it ;0)

Making A Function For A Product Discount
im trying to make it if the category equals necklace and the product id returns with the word necklace the product price will be discounted on checkout.


<?php
if($cat=="necklaces"||$prodid= strpos("necklace",$prodid,TRUE)) 
{ $productprice=///$productprice discounted at 10 percent off 
;}?>

Creating A Product List Page!!!!
I was able to retrieve information from the database but I get an error message that says "Notice: Undefined variable: SubCatID "  and I can`t get my list to display right. I wanted my SmallIMG to be on the right and my and my ProductName to appear right beside it along with the UnitPrice.

Kinda like straight across because I want it to be a link to the individual product page. If I can get help on this part, I can get started on my shopping cart. Code:

Keeping Credit Card Details Secure
I'm building a shopping cart for a small site that need to accept credit card payments. The problem is that payment details need to be sent securly by e-mail, or retreived by the store owner from a secure page for manual processing because the sales volume is too low to pay the setup costs for an online system. What is the best way to do this? Currently they use a PERL script that send half of the details by e-mail (not secure) and stores the other half in a file on the host's server. Is this the best way to do it?

Adding User Details Into Body Of Email
Im having problems adding info from a database into a personalised email. At present I can email x amount of friends, but I would like to personalise it, like :

dear ......
your password is......

these 2 .... are already in the mysql database, I just need to allow a variable for it to be added eg :

dear %name%
your password is %password% Code:

Php Cookie Form Save User Details
i have a website that offers email on disirable domains, i have over 100 domains and would like to set a cookie so it saves the username and the email domain of a user, so they don't have to re-enter them everytime they come to site, i not worried about password, they can use the browsers save password for that id they want password saved.

How Do I Stop People Seeing My Php Code And Giving My Product Away?
I am currently working on a program for small business, done using HTML/PHP and MySql. It will run on internal Intranets. Aside from legal ties, how can I keep people from viewing the source code and giving my product away to others?

Product Image In Database For Froogle Feed
All the images for my products are stored in the database. I have to post a url for the image in my froogle feed. I used to put the URL I put in the src of the img file and that doesn't work anymore. If I remember correctly, putting
http://<domain>/pic.php?id=47&table=table1&column=column_id just got me the picture, now IE tells me it failed downloading a file.
Presumably it is because the browser doesn't know the type of the file returned whereas in the img tag it expect an image?

Is there anyway to fix that please?


Copyright © 2005-08 www.BigResource.com, All rights reserved