Pop-up instead of an Alert

Completed modifications to the NOP Shopping Cart. Additions, modifications, and more.

Moderators: Koibito, Stefko, Randy, Rosey

Pop-up instead of an Alert

Postby Stefko » Sun Sep 28, 2003 3:23 pm

Pop-up instead of an Alert

Step 1

Options for Everyone in the nopcart.js file set:
Code: Select all
DisplayNotice         = false;


Step 2

Add this function to your nopcart.js file:
(you may edit this to your specs.)

Code: Select all
//---------------------------------------------------------------------||
// FUNCTION:    cartWindow                                                 ||
// PARAMETERS:  Null                                                   ||
// RETURNS:     Null                                                  ||
// PURPOSE:     Open a pop-up window when item added to cart   ||
//----------------------------------------------------------------------------||

function cartWindow(cartItem) {

   cartAdded = window.open(cartItem, 'cartWin', 'left=40,top=40,width=200,height=200,scrollbars=no,resizable=no,status=no,toolbar=no,menubar=no,location=no')
   
   cartAdded.focus();

}


Step 3:

On product order pages us this as your form submit:

Code: Select all
<form name="order" onSubmit="AddToCart(this);cartWindow('alert.html');">


Step 4:

Create a small html page for your pop-up (here it is alert.html)
KFL Technologies
Web-Enabled Solutions
e-Commerence Solutions
Stefko
Contributor / Guru
 
Posts: 833
Joined: Wed Sep 18, 2002 1:11 am
Location: Wichita, KS

Postby Mustang » Thu Dec 04, 2003 10:40 pm

Thanks for the script...

I'm also wondering if it is possible to add a price, quantity, product name/description... in the pop-up window

So that the pop-up window would say something like...

Thank you

You have added

Quantity: quantity 1
Product name/description: product 1
Price:

to your shopping cart.


Thanks for any help
Mustang
 
Posts: 3
Joined: Thu Dec 04, 2003 6:03 pm

Alert with auto close delay

Postby knght4amor » Wed Aug 04, 2004 11:06 am

how could we go about creating a modal window with a delay of certain time before it autocloses? That way we could keep the summary as to what has been added. The alerts don't seemed to get blocked by my popup blocker.

Thanks for your help,
Neil
knght4amor
 
Posts: 1
Joined: Wed Aug 04, 2004 10:42 am
Location: Utah

Postby badesigns » Thu Apr 07, 2005 5:48 pm

So I entered all the code, exactly as listed above but I am still getting the normal alert box. Here is my site (only changed coding on first 2 products)
http://www.bignetangling.com/Store/products.htm

I have the alert.htm file, what it says in the code but just the normal box.

Any help is appreciated
Melanie
badesigns
WebMaster
 
Posts: 16
Joined: Sun Apr 03, 2005 5:39 pm

Postby altermoor » Tue Apr 26, 2005 5:26 pm

I've had some difficulty integrating this into my NOPCart. Is it possible that NOPCart has changed appreciably since this MOD was first published? In other words, is it possible that it won't work with the latest version of NOPCart? Or, more likely, I am just doing something wrong!

The reason I'd really like to do this is for the possibility of integrating an "up-sell" component in the pop-up window. If someone purchases a particular item, I'd like to: 1) confirm the purchase, quantity and price of the item, and 2) ask them if they'd like to purchase another related item... All from the same window. Does anyone think this is a doable proposition?

Thanks!

Drew
altermoor
 
Posts: 20
Joined: Fri Mar 11, 2005 11:56 am
Location: Pittsburgh, PA USA


Return to Modifications

Who is online

Users browsing this forum: No registered users and 0 guests