Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add Products From Popup Window To Card And Close Window


strub

Recommended Posts

Posted

Customer can open a popup window featuring special products. Now by clicking on the button_buy_now the window should close and the product should be added to the shipping cart. But it doesn't work. Below is my code for this.

Should i change the Javascript code perhaps write a function with variablen?

 

 

I tried many things many times. Here is my code

 

I hope someone can help me with this.

 

<script language="JavaScript"><!--function closeMe(); {close()}</script>     <tr class="productListing-odd">    <td class="productListing-data" align="center"> <a href="http://www.blumen-strub.ch/shop/product_info.php?cPath=24_25_33&products_id=32"><img src="images/z_carmen_2.jpg" alt="Carmen" title=" Carmen " border="0" height="80" width="80"></a> </td>    <td class="productListing-data"> <a href="http://www.blumen-strub.ch/shop/product_info.php?cPath=24_25_33&products_id=32">Carmen</a> </td>    <td class="productListing-data" align="right"> 6,00SFR </td>    <td class="productListing-data" align="center"><a href="java script:self.close()"><img src="includes/languages/german/images/buttons/button_einfuegen_karten.gif" alt="Karten" title=" Karten " border="0" height="14" width="80"></a> </td>(This Code closes window but doesn`t add product to shopping card.)        <tr class="productListing-odd">    <td class="productListing-data" align="center"> <a href="http://www.blumen-strub.ch/shop/product_info.php?cPath=24_25_33&products_id=36"><img src="images/z_schoenevgrenchen.jpg" alt="Schöne von Grenchen" title=" Schöne von Grenchen " border="0" height="80" width="80"></a> </td>    <td class="productListing-data"> <a href="http://www.blumen-strub.ch/shop/product_info.php?cPath=24_25_33&products_id=36">Schöne von Grenchen</a> </td>    <td class="productListing-data" align="right"> 6,00SFR </td>    <td class="productListing-data" align="center"><a href="http://www.blumen-strub.ch/shop/index.php?cPath=24_25_33&sort=2a&action=buy_now&products_id=36"><img src="includes/languages/german/images/buttons/button_buy_now.gif" alt="Buy Now" title=" Buy Now " border="0" height="14" width="80"></a> </td>  </tr>(This Code adds product to card but window doesn`t close) 

Posted

thanks a lot for replying,

 

I did this

 

CODE

<a href="java script:self.close()">

 

So thw window closed, but I somehow need to add the action that products will be added

to the shipping cart.

 

I tried it this way:

 

CODE

<a href="java script:self.close();action=buy_now&products_id=31">

 

But it didn`t work, do you have any useful idea?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...