Add pop-up conditions before buying in opencart
This shows funny do not know if anyone used it?
This tutorial add a pop-up to ask if the customer definitely buy selected products before you give to cart, or well, but also make less user? only shelves, post up for a few you against OpenCart a little for fun.
1. Edit the file: catalog / view / javascript / common.js
Find the line:
WP-SYNHIGHLIGHT PLUGIN: NOTHING TO HIGHLIGHT! PLEASE READ README.TXT IN PLUGIN FOLDER!
function addToCart (product_id) {
[/ codesyntax]
Add the following line:
WP-SYNHIGHLIGHT PLUGIN: NOTHING TO HIGHLIGHT! PLEASE READ README.TXT IN PLUGIN FOLDER!
if (! confirm ("Are you sure you want to buy this product?")) {return false;}
[/ codesyntax]
2. Edit the file: catalog / view / theme / YOURTHEME / template / product / product.tpl
Find the line:
WP-SYNHIGHLIGHT PLUGIN: NOTHING TO HIGHLIGHT! PLEASE READ README.TXT IN PLUGIN FOLDER!
$ ('# button-cart'). bind ('click', function () {
[/ codesyntax]
Add the following line:
WP-SYNHIGHLIGHT PLUGIN: NOTHING TO HIGHLIGHT! PLEASE READ README.TXT IN PLUGIN FOLDER!
if (! confirm ("Are you sure you want to buy this product?")) {return false;}
[/ codesyntax]