Credit Class/Gift Vouchers/Discount Coupons 5.10
#41
Posted 27 July 2003, 17:30
Thanks
#42
Posted 27 July 2003, 23:13
there is a 10.00 signup gift certificate set that to 0 and it should turn it off.
#43
Posted 28 July 2003, 05:18
Thanks
#44
Posted 28 July 2003, 05:30
includes//add_ccgvdc_application_top.php and the variable is called
NEW_SIGNUP_GIFT_VOUCHER_AMOUNT for the gift voucher and
NEW_SIGNUP_DISCOUNT_COUPON for a discount coupon
I apologize for my misleading you in my earlier post.
#45
Posted 28 July 2003, 17:03
When I searched for the $10 value and couldn't find it, I was confused. However, I did delete all the define statments that had to do with the gift and voucher so it shouldn't email them to the customer
Does this sound right? It seem like it will work.
Also thanks for the quick help
Thanks
#46
Posted 28 July 2003, 19:30
Plus your customers email gift certs also.
#47
Posted 28 July 2003, 19:48
Quote
When I searched for the $10 value and couldn't find it, I was confused. However, I did delete all the define statments that had to do with the gift and voucher so it shouldn't email them to the customer
Does this sound right? It seem like it will work.
Also thanks for the quick help
Thanks
I dont recommend you do this.
Just change the value to "0" zero in /catalog/includes/add_ccgvdc_application_top.php
Around line 25:
// Set the amount of a Gift Voucher that the new signup will receive, set to 0 for none
define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0');
//
// 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', '0');
#48
Posted 29 July 2003, 20:55
I have installed this on MS2, and everything is working except shipping gets charged on all vouchers.
I created the gift voucher with the product ID of GIFT100 and set its weight to 0.
I also double checked the code in checkout_shipping.php, and I have added this :
// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
// ICW CREDIT CLASS GV AMENDE LINE BELOW
// if ($order->content_type == 'virtual') {
if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
What else should I be checking?
I am sure that I am missing something simple here, but I cannot see it
#49
Posted 29 July 2003, 21:00
#50
Posted 29 July 2003, 21:42
I managed to fix it by enabling downloads in the admin. This is the only way I could get it to work.
There are no other modules in the admin under order total, but the standard ones installed with oscommerce and the 2 installed with the gift voucher mod. Neither of these have any options for disabling shipping. Maybe I am blind :shock: , but I looked in all the order total modules, and only under the 'shipping' module was the 'allow free shipping' but this was enabled already.
Regardless, if it works, I am happy.
Next, I am having trouble with the shopping cart box. The only way the gift voucher shows up is if another product is added to the cart, otherwise, you would never know you had a voucher. Is there a way to get the voucher to display even if you have no other items in your cart?
#51
Posted 29 July 2003, 22:03
Order Total Modules in mine shows:
Include Shipping
true
Include Tax
true
I have GV showing up fine in my cart.
I would recheck the installation or back up all my files and replace the ones on the server with the contribution ones to see where my problem is.
#52
Posted 30 July 2003, 10:07
The problem is in catalog/includes/modules/order_total/ot_gv.php
the code that is there is
Quote
if ($SESSION['cot_gv']) {
$gv_payment_amount = $this->calculate_credit($order_total);
}
return $gv_payment_amount;
}
and the code that should be there is
Quote
if ($_SESSION['cot_gv']) {
$gv_payment_amount = $this->calculate_credit($order_total);
}
return $gv_payment_amount;
}
let's try that and see if it works... oh I almost forgot .. lol .. one sec ...
we also need to change
Quote
$credit_covers = true;
}
to
Quote
$credit_covers = true;
}
on line 207 in the function pre_confirmation_check within
catalog/includes/classes/order_total.php
and that should do it.... I think .. please play and tell me what you come up with
#53
Posted 30 July 2003, 16:39
The GV product's weight is set to 0.
Maybe if i make one base voucher with some attributes it just might work.
#54
Posted 30 July 2003, 16:48
#55
Posted 30 July 2003, 17:06
Allow Free Shipping
false
Then set to true.
Now it works.
As for that that other price GV thing.
If you purchase say a item of $25 and GV is $20 then it lets you use the GV?
I thought it was ok like that. If you wish to choose a product over the GV amount then you should be able to and be able to cover the difference.
#56
Posted 30 July 2003, 17:20
if your download enabled which is in
admin->configuration->download
is not set to true then it doesn't recognize virtual ie gift vouchers as being no shipping. if this is set to true it does work.
the fix for the other is just the first fix ie add a _ to the $SESSION variable or $_SESSION in the ot_gv.php in the pre_confirmation_check function. ot_gv is in includes/modules/order_total.
so it looks like this
function pre_confirmation_check($order_total) {
if ($_SESSION['cot_gv']) {
$gv_payment_amount = $this->calculate_credit($order_total);
}
return $gv_payment_amount;
}
sorry about the earlier wrong post .. posted before I had any sleep
I think that has it guys any problems please tell me .. I would love to put this puppy to bed for a few days
#57
Posted 30 July 2003, 18:51
Illicious: I am probably not being clear on my second issue. The gift vouchers balance do not show up in my shopping cart side box (if I have a gift voucher balance in my account, not a new gift voucher for purchase) , UNLESS I have another product in the shopping cart.
If I log into my account, and I know I have a balance of $20.00 (from gift vouchers previouslt purchased), it will not show up as a GV balance, nor will the links to send to a friend show up, unless I have some other item in my shopping cart.
I would like the balance to always show in the shopping cart side box if I am logged in, regardless of whether or not I have anything else in my cart.
I hope that makes more sense.
#58
Posted 30 July 2003, 19:04
Most likely I just added this in the wrong place?
Thanks! Just typing out the explanation gave me the idea on what to change. This is really a nice mod, thanks for the work!
#59
Posted 30 July 2003, 19:49
BEFORE:
When a customer attempted to use the checkbox for applying their GC to their oder, they were required to enter a CC number (if they skipped over that area, then the resulting page would show an error w/ CC# in red).
AFTER
When a customer checks the checkbox for applying the GC to their order total AND skips the CC form fields, their credit is applied and no error appears... UNTIL they reach the confirmation page. The following error appears:
[quote][b]There has been an error processing your credit card. Please try again.
This error appears after checkout_confirmation.php
So... we're almost there! Just a different place for the error.
#60
Posted 30 July 2003, 19:53
If you pass $0 to authorize.net then authorize.net will freak out on you and kill your first-born (in this case, killing of a first-born is equivalent to not processing an order: they both carry the same crushing feeling on my end).
So.... in order for the fix to work for me (crap! I've just made this so customized that no-one else will probably need the fix), I need to disable the passthru to authorize.net should the order total <= 0.
Any idea where I can find that?














