Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Popup - Item Added to Cart

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 04-29-2009, 01:26 AM
 
idandt idandt is offline
 

Newbie
  
Join Date: May 2005
Posts: 1
 

Default Re: Popup - Item Added to Cart

Hi Great modification thanks for sharing it. Do you have an version for Version 4.2.0. I tried it but cant get the pop up to show. It adds to the basket fine though.

Many thanks
__________________
thanks
Reply With Quote
  #12  
Old 06-04-2009, 09:43 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Popup - Item Added to Cart

Hi,
autobulbs thanks for your codes.I have Special offer modules where I give some offers to the customer.Now when a customer enters into the shopping cart there are two buttons named Proceed to pay & check for special offers.But Unfortunately some of my customers forget to click check for special offers button and they will not get that offer products.
I want when a customer click into proceed to pay button then a small pop up will open and say"Please click check for special offers button to avail discounts/offers if any before you select "proceed to pay".

Is it possible to? Can you help me?

Thanks to all.
__________________
4.6.1 Platinum


Reply With Quote
  #13  
Old 06-07-2009, 01:10 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Popup - Item Added to Cart

Great mod! I'm also interested to find out if it works with 4.2.x
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #14  
Old 06-30-2009, 03:01 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Popup - Item Added to Cart

Quote:
Originally Posted by Learner
Hi,
autobulbs thanks for your codes.I have Special offer modules where I give some offers to the customer.Now when a customer enters into the shopping cart there are two buttons named Proceed to pay & check for special offers.But Unfortunately some of my customers forget to click check for special offers button and they will not get that offer products.
I want when a customer click into proceed to pay button then a small pop up will open and say"Please click check for special offers button to avail discounts/offers if any before you select "proceed to pay".

Is it possible to? Can you help me?

Thanks to all.

Hi,
autobulbs is it possible to do?

Thank you.
__________________
4.6.1 Platinum


Reply With Quote
  #15  
Old 07-09-2009, 03:27 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Popup - Item Added to Cart

Quote:
Originally Posted by Learner
Hi,
autobulbs thanks for your codes.I have Special offer modules where I give some offers to the customer.Now when a customer enters into the shopping cart there are two buttons named Proceed to pay & check for special offers.But Unfortunately some of my customers forget to click check for special offers button and they will not get that offer products.
I want when a customer click into proceed to pay button then a small pop up will open and say"Please click check for special offers button to avail discounts/offers if any before you select "proceed to pay".

Is it possible to? Can you help me?

Thanks to all.

Hi,
autobulbs is it possible? Can you help me?
__________________
4.6.1 Platinum


Reply With Quote
  #16  
Old 07-16-2009, 04:03 PM
 
royng royng is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 85
 

Default Re: Popup - Item Added to Cart

Quote:
Originally Posted by Learner
Thanks autobulbs for your effort.
Also is it possible to insert a close button and the small red window scroll through the page?

It's not working for me(4.1.11)
I can't find the menu_cart.tpl in the root or skin folder

I can see it in skin1/menu_cart.tpl, so I added the code there.

Is that why it's not working?
__________________
X-Cart DB Version: 4.1.11 GOLD
Reply With Quote
  #17  
Old 07-24-2009, 04:59 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Popup - Item Added to Cart

Hi,
autobulbs thanks for your codes.I have Special offer modules where I give some offers to the customer.Now when a customer enters into the shopping cart there are two buttons named Proceed to pay & check for special offers.But Unfortunately some of my customers forget to click check for special offers button and they will not get that offer products.
I want when a customer click into proceed to pay button then a small pop up will open and say"Please click check for special offers button to avail discounts/offers if any before you select "proceed to pay".

Is it possible to? Can you help me?
__________________
4.6.1 Platinum


Reply With Quote
  #18  
Old 08-12-2009, 11:52 AM
 
Plucky Pear Plucky Pear is offline
 

Member
  
Join Date: Aug 2009
Posts: 15
 

Default Re: Popup - Item Added to Cart

Does this work on 4.2? I know people asked but I don't see an answer
__________________
Version 4.2.2

Mods
Special Offers
Download Expander
What's New

Plucky Pear Designs
Reply With Quote
  #19  
Old 08-13-2009, 07:30 AM
 
autobulbs autobulbs is offline
 

Advanced Member
  
Join Date: Feb 2007
Location: Southampton, UK
Posts: 68
 

Default Re: Popup - Item Added to Cart

I am currently rebuilding our main store on 4.2.2 so this module will be working on 4.2.2 in a few days.

I will post the code on Monday
__________________
Autobulbs Direct Ltd
X-Cart Version: 4.2.2
eWay Designs - Custom X-Cart Templates / CMS Websites / Bespoke web applications
Reply With Quote
  #20  
Old 08-17-2009, 02:09 AM
 
autobulbs autobulbs is offline
 

Advanced Member
  
Join Date: Feb 2007
Location: Southampton, UK
Posts: 68
 

Default Re: Popup - Item Added to Cart

4.2.2 Basket Popup Code

I think it's all here, and I've had to sift thru it to remove our theme specific junk. Read the comments within the CSS and TPL files

Go to Patch/Upgrade and then Apply SQL Patch and run this:

Code:
INSERT INTO `xcart_modules` (`module_name`,`module_descr`,`active`) VALUES ('Item_Added','This module popups when a customer adds something to the basket. Remember to set redirect customer to cart to N','N');


Create modules/Item_Added/item_added.php and put this in it:

PHP Code:
<?php
  
/* Item Added Popup */
  
x_session_register("item_added");
  
$smarty->assign("item_added","$item_added");
  
x_session_unregister("item_added");
  
/* /Item Added Popup */
  
?>


Open home.php and find this:

PHP Code:
# Assign the current location line
  
$smarty->assign("location"$location); 

Add this before it:

PHP Code:
# Item Added Module
  
if (!empty($active_modules["Item_Added"]))
              include 
$xcart_dir."/modules/Item_Added/item_added.php"


Open product.php and find this:

PHP Code:
# Assign the current location line
  
$smarty->assign("location"$location); 

Add this before it:

PHP Code:
# Item Added Module
  
if (!empty($active_modules["Item_Added"]))
              include 
$xcart_dir."/modules/Item_Added/item_added.php"

Open cart.php and find this ( around line 258 ):

PHP Code:
func_save_customer_cart($login$cart); 

Paste this below it:

PHP Code:
/* Item Added Popup */
                          
x_session_register("item_added");
                          
$item_added=1;
                          
/* /Item Added Popup */ 

Open skin1/customer/menu_cart.tpl and paste this after {capture name=menu}

Code:
{if $item_added eq 1}<div class="item_added" id="item_added_box"><div>{include file="customer/item_added.tpl"}</div></div>{/if}

Open main.css and add this code (edit to fit your theme):

Code:
/* The popup wrapper, brings the element to the front */ .item_added { position:absolute; width:1px; height:1px; text-align:left; } /* The popup inner wrapper, positions the popup √ you can fine tune it here */ .item_added > div { position:relative !important; display:block; top:24px; z-index:9999; left:-24px; } /* The main body of the popup change the bg color or use an image */ #basketPopup { background:#e1e1e1; height:216px; width:210px; color:#484848; padding-left:54px; } #basketPopup div { color:#fff !important; } #basketPopup a { color:#fff !important; text-decoration:underline; } /* The popup main title */ #basketPopup .basketPopupTitle { font-weight:bold; font-size:13px; text-align:right; width:162px; padding:12px 0; float:left; } #basketPopup #basketClose { /* The bg image is commented here and replaced with an ▒X▓ √ feel free to replace with an image */ /* background:url(images /btn_close.gif) no-repeat; */ height:14px; width:14px; float:left; margin: 8px 0 0 16px; cursor:pointer; } /* Keep shopping / View Basket buttons */ #basketPopup .basketPopupButtons { clear:left; } /* Use this for an arrow image which links the popup to the minicart √ you will need to make an image */ #basketJoiner { width:232px; text-align:right; padding-right:32px; margin-bottom:-1px; }


Create skin1/customer/item_added.tpl and put this in it

Code:
{* Remember to create the joiner.jpg image to fit your theme!! *} <div id="basketJoiner"><img src="{$ImagesDir} /joiner.png" alt="" /></div> <div id="basketPopup"> {* The title of the popup *} <div class="basketPopupTitle">Item Added To Basket</div> {* The close button √ Remove the X and replace with an image *} <div id="basketClose" onclick="javascript:item_added_close();">X</div> {* The buttons view basket and keep shopping buttons, make your images to fit your theme *} <div class="basketPopupButtons"><a href="/cart.php"><img src="{$ImagesDir}/BasketPopup/btn_basket.gif" alt="View Basket" /></a> <a href="javascript:item_added_close();"><img src="{$ImagesDir}/keepshopping.gif" alt="Keep Shopping" /></a></div> </div>


One more thing - Open skin1/common.js and add this:

Code:
/* When something is added to the cart... Close it.... */ function item_added_close() { document.getElementById('item_added_box').style.display="none"; }

When you are happy to set it live, go to modules within the admin section, check Item_Added and click update to enable it
__________________
Autobulbs Direct Ltd
X-Cart Version: 4.2.2
eWay Designs - Custom X-Cart Templates / CMS Websites / Bespoke web applications
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:45 PM.

   

 
X-Cart forums © 2001-2020