Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Credit Class/Gift Vouchers/Discount Coupons 5.10


4756 replies to this topic

#41 msheno01

  • Community Member
  • 166 posts
  • Real Name:moneer

Posted 27 July 2003, 17:30

How do you stop the vouchers being sent in the welcome emails. I would like to be able to control if it should be on or off. Is there a code to be edited that would allow me to do that.

Thanks

#42 Strider

  • Community Member
  • 413 posts
  • Real Name:Strider
  • Location:New York

Posted 27 July 2003, 23:13

msheno ... look in the includes/language/english/create_account.php
there is a 10.00 signup gift certificate set that to 0 and it should turn it off.
(my knowledge is so small you would think that an ant was a genius in comparison)

#43 msheno01

  • Community Member
  • 166 posts
  • Real Name:moneer

Posted 28 July 2003, 05:18

Thank you for the feedback. I will give it a try and see how it works.


Thanks

#44 Strider

  • Community Member
  • 413 posts
  • Real Name:Strider
  • Location:New York

Posted 28 July 2003, 05:30

I made a mistake msheno it is in
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.
(my knowledge is so small you would think that an ant was a genius in comparison)

#45 msheno01

  • Community Member
  • 166 posts
  • Real Name:moneer

Posted 28 July 2003, 17:03

No problem.

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 Strider

  • Community Member
  • 413 posts
  • Real Name:Strider
  • Location:New York

Posted 28 July 2003, 19:30

No .. you really want all the define statements else it will blow up.
Plus your customers email gift certs also.
(my knowledge is so small you would think that an ant was a genius in comparison)

#47 Illicious

  • Community Member
  • 455 posts
  • Real Name:Illicious
  • Location:Shaolin of NYC

Posted 28 July 2003, 19:48

Quote

No problem.

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 msasek

  • Community Member
  • 39 posts
  • Real Name:Michael Sasek
  • Gender:Male

Posted 29 July 2003, 20:55

Hi,

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 Strider

  • Community Member
  • 413 posts
  • Real Name:Strider
  • Location:New York

Posted 29 July 2003, 21:00

under the order modules where you installed the gv and dc in admin there is a question for this.
(my knowledge is so small you would think that an ant was a genius in comparison)

#50 msasek

  • Community Member
  • 39 posts
  • Real Name:Michael Sasek
  • Gender:Male

Posted 29 July 2003, 21:42

Jason,

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 Illicious

  • Community Member
  • 455 posts
  • Real Name:Illicious
  • Location:Shaolin of NYC

Posted 29 July 2003, 22:03

If your running MS2 i would asume theres a error in you contribution installation somewhere.

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 Strider

  • Community Member
  • 413 posts
  • Real Name:Strider
  • Location:New York

Posted 30 July 2003, 10:07

in previous posts there was brought to light an error about having to choose a payment method even if you had enough in the gift voucher. there have been a couple of us working on this fix and I think this is it.. you might want to play with it please because there is no way I could test something as good as you guys test things ..

The problem is in catalog/includes/modules/order_total/ot_gv.php
the code that is there is

Quote

function pre_confirmation_check($order_total) {
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

function pre_confirmation_check($order_total) {
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

if ($order->info['total'] - $total_deductions <= 0 ) {
$credit_covers = true;
}

to

Quote

if (($order_total - $total_deductions) <= 0 ) {
$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
(my knowledge is so small you would think that an ant was a genius in comparison)

#53 Illicious

  • Community Member
  • 455 posts
  • Real Name:Illicious
  • Location:Shaolin of NYC

Posted 30 July 2003, 16:39

Have this new issue where if you purchase just one GV on checkout you have to select shipping charges.

The GV product's weight is set to 0.
Maybe if i make one base voucher with some attributes it just might work.

#54 Strider

  • Community Member
  • 413 posts
  • Real Name:Strider
  • Location:New York

Posted 30 July 2003, 16:48

yes I noticed that also Illicious ... but even more so I noticed that the other fix I thought worked doesn't quite do it yet.. in fact if you buy an item more expensive than the amount of your gv it let's it through with the second part to that fix am working on it now .. should have something soon I should think ..
(my knowledge is so small you would think that an ant was a genius in comparison)

#55 Illicious

  • Community Member
  • 455 posts
  • Real Name:Illicious
  • Location:Shaolin of NYC

Posted 30 July 2003, 17:06

Ok whats wrong with me. In Order Total Modules/Shipping:

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 Strider

  • Community Member
  • 413 posts
  • Real Name:Strider
  • Location:New York

Posted 30 July 2003, 17:20

ok
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
(my knowledge is so small you would think that an ant was a genius in comparison)

#57 msasek

  • Community Member
  • 39 posts
  • Real Name:Michael Sasek
  • Gender:Male

Posted 30 July 2003, 18:51

This is the issue I was having regarding downloads must be activated in order for GV to skip the shipping page.

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 msasek

  • Community Member
  • 39 posts
  • Real Name:Michael Sasek
  • Gender:Male

Posted 30 July 2003, 19:04

I managed to figure it out. I just moved the ICW code out of the 'if' statement, immediately after the closing } and it now displays the GV link and balance all the time when you are logged in, regardless of the items in the cart.

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 chadedge

  • Community Member
  • 6 posts
  • Real Name:chad edge

Posted 30 July 2003, 19:49

Ok, implemented your fix. Workes about %90. Here's what I'm facing now:

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 chadedge

  • Community Member
  • 6 posts
  • Real Name:chad edge

Posted 30 July 2003, 19:53

Ok, I think I understand why the error is appearing: it might be because of the authorize.net problem:

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?