Community Add-Ons
| Maintainers: | mduggy |
Choice of Free Gifts Module
for osCommerce Online Merchant v2.2
This modification will allow you to show a category that contains various items that your customer can choose from when they spend over x amount.
Ive been searching for one of these with no avail so i made one! lots of people seemed to be interested in this on the forums so i hope this helps some one.
If you use Paypal IPN(PayPal IPN v2.3.4.6) , you need replace /includes/modules/payment/paypal_ipn.php with the attached.
leirisset missed out 2 modifications which in the instructions under v2.1
This would cause a "function not defined" error and the free gift not to be able to update during checkout.
I took some time to debug/compare against v2.0. Thought I'll share a quick note with all.
See the attached for 2 notes.
Gifts_mod_v2.1_with_french
####################################################
Complete package
Updating, installation and translation in French
- Fix links hard
- Added packingslip.php
- Added invoice.php
####################################################
Package complet
Mise à jour, traduction et installation en français
- Correction des liens en dur
- Ajout packingslip.php
- Ajout invoice.php
####################################################
Screenshots visible at : http://www.oscommerce-screenshots.com/choice-free-gifts-module-p-374.html
We've taken the great work of Matt and made an Order Total module for the free gifts that allows the following upgrades:
- automatically makes all the database tables for you when installed
- allows you to change the minimum order size before showing the free gifts
- select from existing categories the one to use for free gifts
- enable/disable module in realtime
- SQL modified to use database table names rather than fixed values
http://forums.oscommerce.com/index.php?showtopic=299553
attached is blink file, not use.
Database Modifications:
Add Configuration Group:
INSERT INTO `configuration_group` VALUES ('', 'Free Gift', 'Free Gift Configuration', '17', '1');
Please get the configuration_id that the db has generated, as it will be required for the next step!
AND CHECK THE LASTconfiguration_id IN configuration AND add in LAST1 and LAST2 below.
example your last number is 143, you add in 144 and 145.
Please replace 'ID' with the id generated from stage 1
Add Configuration Items:
INSERT INTO `configuration` VALUES ('LAST1', 'Minimum Spend', 'FREE_GIFT_MINIMUM_SPEND', '30.00', 'Minimum Spend to Qualify For The Free Gift', 'ID', '1', '2007-08-08 15:24:50', '2007-08-07 19:16:00', null, null);
INSERT INTO `configuration` VALUES ('LAST2', 'Free Gift Category', 'FREE_GIFT_CATEGORY', '96', 'The category that contains all of the potentially free items', 'ID', '2', '2007-08-11 11:02:05', '2007-08-07 19:16:00', 'tep_cfg_get_cat_name', 'tep_cfg_pull_down_cat_list(');
Add Free Gift Orders Table
CREATE TABLE `orders_freegift` (
`orders_freegift_id` int(11) NOT NULL auto_increment,
`orders_id` int(11) default NULL,
`products_id` int(11) default NULL,
`products_model` varchar(12) default NULL,
`products_name` varchar(64) default NULL,
PRIMARY KEY (`orders_freegift_id`)
) TYPE=MyISAM;
Database Modifications Complete
Ive been asked this a few times, the best way i find of adding products to the free gift category is to use this modification:
http://www.oscommerce.com/community/contributions,1537
I've made it easier to choose the free gift. This extra part to the modification, now allows you to choose your free gift directly from the product category page.
USE THIS.
================================
Database Modifications:
Add Configuration Group:
INSERT INTO `configuration_group` VALUES ('', 'Free Gift', 'Free Gift Configuration', '17', '1');
Please get the configuration_id that the db has generated, as it will be required for the next step! AND CHECK THE LAST configuration_id IN configuration AND add in LAST1 and LAST2 below.
example your last number is 143, you add in 144 and 145.
Add Configuration Items:
Please replace 'ID' with the id generated from stage 1
INSERT INTO `configuration` VALUES ('LAST1', 'Minimum Spend', 'FREE_GIFT_MINIMUM_SPEND', '30.00', 'Minimum Spend to Qualify For The Free Gift', '16', '1', '2007-08-08 15:24:50', '2007-08-07 19:16:00', null, null);
INSERT INTO `configuration` VALUES ('LAST2', 'Free Gift Category', 'FREE_GIFT_CATEGORY', '96', 'The category that contains all of the potentially free items', '16', '2', '2007-08-11 11:02:05', '2007-08-07 19:16:00', 'tep_cfg_get_cat_name', 'tep_cfg_pull_down_cat_list(');
Add Free Gift Orders Table
CREATE TABLE `orders_freegift` (
`orders_freegift_id` int(11) NOT NULL auto_increment,
`orders_id` int(11) default NULL,
`products_id` int(11) default NULL,
`products_model` varchar(12) default NULL,
`products_name` varchar(64) default NULL,
PRIMARY KEY (`orders_freegift_id`)
) TYPE=MyISAM;
Database Modifications Complete
This modification will allow you to show a category that contains various items that your customer can choose from when they spend over x amount.
Ive been searching for one of these with no avail so i made one! lots of people seemed to be interested in this on the forums so i hope this helps some one.
