osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

changes with gift voucher

This is a discussion on changes with gift voucher within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; hola! i have gift voucher discount of 10$. i want to remove it, and give an overall 10% discount on ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 06-27-2004, 01:36 AM
Member
 
Join Date: Mar 2004
Posts: 78
Thanks: 29
Thanked 0 Times in 0 Posts
Rep Power: 0
altenter
Default changes with gift voucher

hola!
i have gift voucher discount of 10$.
i want to remove it, and give an overall 10% discount on the whole shop. (or if easier, change the gv to 10%)
help appreciated,
thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 06-27-2004, 03:55 AM
Active Member
 
Join Date: May 2004
Location: somewhere above colchester uk
Posts: 147
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
battleaxe
Default

altenter,

Please, like the rest of us have had to, search through the forum before you post, many of the answers are there.

The answer to yours is here http://oscdox.com/index.php?name=PNp...t=gift+voucher
__________________
Google says be nice!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 06-27-2004, 09:45 AM
Member
 
Join Date: Mar 2004
Posts: 78
Thanks: 29
Thanked 0 Times in 0 Posts
Rep Power: 0
altenter
Default

i have searched endlessly, but apparently not enough
thanks battleaxe for the link, but it is not clear in that post (or maybe its me overlooking everything) but to change the $ into % in includes/add_ccgvdc_application_top.php doesnt seem to work. i still get the 10$ voucher emailed after registering....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 06-28-2004, 06:36 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Posts: 1,521
Thanks: 1
Thanked 81 Times in 68 Posts
Rep Power: 10
jpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nice
Default

In add_ccgvdc_application_top.php:
Quote:
// The settings below determine whether a new customer receives an incentive when they first signup
//
// Set the amount of a Gift Voucher that the new signup will receive, set to 0 for none
define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '10');
//
A POSTIVE number is a DOLLAR OFF
ZERO - IS NO signup bouns
A NEGATIVE -is a % off

define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '10');
$10 off next purchase.
define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0');
Nothing is generated/sent
define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '-10');
-10% (10% off) next purchase.


Good Luck!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 06-28-2004, 12:26 PM
Member
 
Join Date: Mar 2004
Posts: 78
Thanks: 29
Thanked 0 Times in 0 Posts
Rep Power: 0
altenter
Default

jpf, thanks for clarifying, but still, as soon as a put a "-" like:
define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '-10');
i recieve no gift voucher upon registering

other settings seem correct:

Quote:
define('FILENAME_GV_FAQ', 'gv_faq.php');
define('FILENAME_GV_REDEEM', 'gv_redeem.php');
define('FILENAME_GV_REDEEM_PROCESS', 'gv_redeem_process.php');
define('FILENAME_GV_SEND', 'gv_send.php');
define('FILENAME_GV_SEND_PROCESS', 'gv_send_process.php');
define('FILENAME_PRODUCT_LISTING_COL', 'product_listing_col.php');
define('FILENAME_POPUP_COUPON_HELP', 'popup_coupon_help.php');

define('TABLE_COUPON_GV_CUSTOMER', 'coupon_gv_customer');
define('TABLE_COUPON_GV_QUEUE', 'coupon_gv_queue');
define('TABLE_COUPON_REDEEM_TRACK', 'coupon_redeem_track');
define('TABLE_COUPON_EMAIL_TRACK', 'coupon_email_track');
define('TABLE_COUPONS', 'coupons');
define('TABLE_COUPONS_DESCRIPTION', 'coupons_description');


// Set the length of the redeem code, the longer the more secure
define('SECURITY_CODE_LENGTH', '10');
//
// The settings below determine whether a new customer receives an incentive when they first signup
//
// Set the amount of a Gift Voucher that the new signup will receive, set to 0 for none
define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '-10');
//
// Set the coupon ID that will be sent by email to a new signup, if no id is set then no email
define('NEW_SIGNUP_DISCOUNT_COUPON', '3');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 06-29-2004, 09:02 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Posts: 1,521
Thanks: 1
Thanked 81 Times in 68 Posts
Rep Power: 10
jpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nicejpf is just really nice
Default

EDIT : create_account.php on about line 247
// ICW - CREDIT CLASS CODE BLOCK ADDED ************************************************** ***** BEGIN
if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
$coupon_code = create_coupon_code();

$email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;


CHANGE TO:

// ICW - CREDIT CLASS CODE BLOCK ADDED ************************************************** ***** BEGIN
if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT <> 0) {
$coupon_code = create_coupon_code();


I think..... Good Luck
__________________
JPF - osCMax Fourm Moderator
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 06-29-2004, 11:40 AM
Member
 
Join Date: Mar 2004
Posts: 78
Thanks: 29
Thanked 0 Times in 0 Posts
Rep Power: 0
altenter
Default

thanks jpf for your time,

ok, now the gv is sent, but with a -10$ as amount, and doesnt count it in the total.

im almost there, i can smell it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 07-04-2004, 08:34 AM
Member
 
Join Date: Mar 2004
Posts: 78
Thanks: 29
Thanked 0 Times in 0 Posts
Rep Power: 0
altenter
Default

jpf? anyone?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 07-15-2004, 04:14 PM
Anonymous
Guest
 
Posts: n/a
Default

not a lot of help but -10 works for me, as does 10 and as does 0

what version are you running? want to paste the whole file?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10  
Old 07-19-2004, 05:22 AM
Member
 
Join Date: Mar 2004
Posts: 78
Thanks: 29
Thanked 0 Times in 0 Posts
Rep Power: 0
altenter
Default

running ms2max1.55

here's my add_ccgvdc_application_top.php:
Quote:
<?php
define('FILENAME_GV_FAQ', 'gv_faq.php');
define('FILENAME_GV_REDEEM', 'gv_redeem.php');
define('FILENAME_GV_REDEEM_PROCESS', 'gv_redeem_process.php');
define('FILENAME_GV_SEND', 'gv_send.php');
define('FILENAME_GV_SEND_PROCESS', 'gv_send_process.php');
define('FILENAME_PRODUCT_LISTING_COL', 'product_listing_col.php');
define('FILENAME_POPUP_COUPON_HELP', 'popup_coupon_help.php');

define('TABLE_COUPON_GV_CUSTOMER', 'coupon_gv_customer');
define('TABLE_COUPON_GV_QUEUE', 'coupon_gv_queue');
define('TABLE_COUPON_REDEEM_TRACK', 'coupon_redeem_track');
define('TABLE_COUPON_EMAIL_TRACK', 'coupon_email_track');
define('TABLE_COUPONS', 'coupons');
define('TABLE_COUPONS_DESCRIPTION', 'coupons_description');

// Below are some defines which affect the way the discount coupon/gift voucher system work
// Be careful when editing them.
//
// Set the length of the redeem code, the longer the more secure
define('SECURITY_CODE_LENGTH', '10');
//
// The settings below determine whether a new customer receives an incentive when they first signup
//
// Set the amount of a Gift Voucher that the new signup will receive, set to 0 for none
define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '-10');
//
// Set the coupon ID that will be sent by email to a new signup, if no id is set then no email
define('NEW_SIGNUP_DISCOUNT_COUPON', '3');


////
// Create a Coupon Code. length may be between 1 and 16 Characters
// $salt needs some thought.

function create_coupon_code($salt="secret", $length = SECURITY_CODE_LENGTH) {
$ccid = md5(uniqid("","salt"));
$ccid .= md5(uniqid("","salt"));
$ccid .= md5(uniqid("","salt"));
$ccid .= md5(uniqid("","salt"));
srand((double)microtime()*1000000); // seed the random number generator
$random_start = @rand(0, (128-$length));
$good_result = 0;
while ($good_result == 0) {
$id1=substr($ccid, $random_start,$length);
$query = tep_db_query("select coupon_code from " . TABLE_COUPONS . " where coupon_code = '" . $id1 . "'");
if (tep_db_num_rows($query) == 0) $good_result = 1;
}
return $id1;
}
////
// Update the Customers GV account
function tep_gv_account_update($customer_id, $gv_id) {
$customer_gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
$coupon_gv_query = tep_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'");
$coupon_gv = tep_db_fetch_array($coupon_gv_query);
if (tep_db_num_rows($customer_gv_query) > 0) {
$customer_gv = tep_db_fetch_array($customer_gv_query);
$new_gv_amount = $customer_gv['amount'] + $coupon_gv['coupon_amount'];
$gv_query = tep_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . "'");
} else {
$gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "')");
}
}
////
// Get tax rate from tax description
function tep_get_tax_rate_from_desc($tax_desc) {
$tax_query = tep_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_description = '" . $tax_desc . "'");
$tax = tep_db_fetch_array($tax_query);
return $tax['tax_rate'];
}
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread



Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Gift Voucher Questions alexbranding osCMax v1.7 Discussion 1 04-11-2005 11:18 AM
Gift Voucher checkout harpon osCMax v1.7 General Mods Discussion 2 07-30-2004 11:00 AM
Creating a Gift Voucher Anonymous osCMax v1.7 Discussion 1 06-14-2004 05:55 AM
Updated Gift Voucher mod? DaisyO75 osCMax v1.7 General Mods Discussion 1 02-17-2004 06:44 AM
Gift Voucher texts Lynoure osCMax v1.7 General Mods Discussion 2 11-21-2003 08:43 AM


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


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax