Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

alert when adding a product to shopping cart


Retro

Recommended Posts

I'm using this contribution:

http://addons.oscommerce.com/info/4284

 

1. Open catalog/includes/header.php
add this on top:
// language definition
define('PRODUCT_ADDED',add_cart);

// give alert if new product added to the cart
if (tep_session_is_registered('new_products_id_in_cart')) {
echo '<script>alert(\''.PRODUCT_ADDED.'\');</script>';
}


2. open your language definition (ie: catalog/includes/language/italian.php):
add this:
define('add_cart', 'Product was added to your basket!');

 

the problem appears when I add to cart a product with attributes, since that each visited page in my store displays the alert :blink:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...