Add to Cart Popup | Backporting to 4.4.X
I think one of the juiciest features of 4.5.X is the addition of the new Add_to_cart_popup module. It is the best of both worlds. Traditionally you have to choose whether you want to redirect to cart and possibly lose out on additional impulse buying, or keep them on page with the ajax cart update and potentially confuse your visitor about whether the item is added or not. I have seen most of the bigger brands out there adopt this popup method. It also gives you an option for upselling.
So what do users with 4.4.X do? Upgrade their highly customized carts? No longer! 8) I have been contracted to backport this module to a 4.4.4 site, and I am going to track my progress and steps in this thread. Stay tuned! |
Re: Add to Cart Popup | Backporting to 4.4.X
Step 1
Download a 4.5.X distribution from your Qualiteam helpdesk. We need to get the files for the module. The two folders you are looking for are: /modules/Add_to_cart_popup/ and /skin/common_files/modules/Add_to_cart_popup/ Copy the contents of these two folders and place them in your xcart directory, being sure to keep the paths and folder structure intact. While you are at it, grab this file too: /include/func/func.minicart.php It helps if you create a folder on your computer that mimics the site structure and contains all the new files and the ones we are going to edit in the next step. This will let you upload all your changes to your dev site in one step, and after testing you can do the same for your live site. |
Re: Add to Cart Popup | Backporting to 4.4.X
Step 2
Now we are going to edit some files, to include the module functionality in the existing PHP files and templates. Be sure to create a backup of the existing file before you edit it. I like to name my backup files something meaningful like filename.extension.bak.Add_to_cart_popup so I can identify what I was doing when I edited that file. Edit /cart.php: Find: PHP Code:
After add: PHP Code:
Before: PHP Code:
Find: PHP Code:
PHP Code:
PHP Code:
Edit /include/product_modify.php: Find: PHP Code:
PHP Code:
Find: PHP Code:
PHP Code:
PHP Code:
Find: HTML Code:
HTML Code:
|
Re: Add to Cart Popup | Backporting to 4.4.X
1 Attachment(s)
Step 3
Now we need to update the database with the module settings and added language variables. To do this visit Tools > Patch/Upgrade section of your X-cart admin. Look under the heading "Apply SQL Patch". In the text box labeled SQL query(ies) paste these queries: INSERT INTO xcart_config VALUES ('enable_upselling','Upselling products','Show_Both','Add_to_cart_popup',10,'sele ctor','Show_Both','Show_Random:lbl_show_randomly_s elected_products\nShow:lbl_show_upselling_products \nShow_Both:lbl_show_upselling_and_random\nHide:lb l_do_not_show_upselling_products',''); INSERT INTO xcart_modules VALUES (98,'Add_to_cart_popup','This module allows your customers to see what they have added to cart along with upselling products.','Y'); INSERT INTO xcart_languages VALUES ('en','module_name_Add_to_cart_popup','Add To Cart Popup','Modules'); INSERT INTO xcart_languages VALUES ('en','lbl_show_upselling_and_random','Show upselling + random products','Labels'); INSERT INTO xcart_languages VALUES ('en','lbl_show_randomly_selected_products','Show random products','Labels'); INSERT INTO xcart_languages VALUES ('en','lbl_show_upselling_products','Show upselling products','Labels'); INSERT INTO xcart_languages VALUES ('en','lbl_do_not_show_upselling_products','Do not show additional products','Labels'); INSERT INTO xcart_languages VALUES ('en','lbl_item_added_to_cart','item added to cart','Labels'); INSERT INTO xcart_languages VALUES ('en','lbl_items_added_to_cart','items added to cart','Labels'); INSERT INTO xcart_languages VALUES ('en','lbl_proceed_to_checkout','Proceed to checkout','Labels'); Alternatively you can use phpMyAdmin for this task, or download the file attached to this post and upload it using the "Patch File" Upload button. (you may need to rename it to .sql instead of .txt, not sure haven't tried it yet) |
Re: Add to Cart Popup | Backporting to 4.4.X
You're Done!
You may want to run yoursite.com/cleanup.php. Now you can go to Settings > Modules and you should see Add To Cart Popup at the top of the list. If you don't then you might have forgotten to run the sql patch above. Good luck, hope it helps. Mike White, signing off... :-) |
Re: Add to Cart Popup | Backporting to 4.4.X
Great job Mike. Keep going!
|
Re: Add to Cart Popup | Backporting to 4.4.X
Very nice Mike and thank you! Going to bookmark this thread :)
|
Re: Add to Cart Popup | Backporting to 4.4.X
Excellent :)
Just make sure "Redirect customer to cart after adding a product" (Setting/General) is switched off, or you'll never see the popup! Took me about 15 minutes to work that one out :) |
Re: Add to Cart Popup | Backporting to 4.4.X
Quote:
I'm using 4.5.3 gold plus and this switch caused me 12+ hours of insanity. see: http://forum.x-cart.com/showthread.php?t=65209 THANK YOU for pointing this out!!! I have been searching the forum in every way, and this did not show up. :-( GEEZ -- turning this switch OFF should be a FRONT AND CENTER WARNING in the Add To Popup documentation, you think? If this switch is set, the module will not function. Hopefully, this thread helps someone searching. For the search engines: Add To Cart Popup Not Working Redirect customer to cart after adding a product setting THANK YOU, THANK YOU THANK YOU!!! |
Re: Add to Cart Popup | Backporting to 4.4.X
I hope someone is still paying attention to this thread. I'm currently trying to modify products_t.tpl to remove all the <table> related tags so I can use <div> tags instead. If I do this, clicking the Buy Now button will add products to the cart, but the Add To Cart popup box no longer open. It seems that the popup module relies on <table> codes? Anyone have any insight as to why this might be, and better yet, which other files I need to modify?
|
All times are GMT -8. The time now is 03:09 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.