Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

QUOTE (noppie @ Feb 15 2004, 06:40 AM)

ok guys and gals..

 

I installed this a while ago can't even tell which verison

 

but ON my welcome email it says gift voucher for 10.00

 

I dont' know where to change that amount..

 

I have a small book store and don't want to give it all away..

can you please help me..

 

Hi noppie,

In the admin section Just go to Configuration->My Store and set the value under Welcome Gift Voucher Amount to a value 0

I guess this should take care of your problem.

 

what if it isn't there..

I don't see anything like that..

naomi


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites
Wow, does the help every reply to serious help problems???

 

i posted my problem almost a week ago and no solution

Your problem is that the checkbox to redeem a gift v. not appears?

 

Try change the sort order to 740 for Discount Coupons and 760 for Gift Vouchers, that works for me.

Share this post


Link to post
Share on other sites
Help!  :(

 

I'm still in urgent need for an authorize.net fix.  The correct discounted total displays on screen, in the customer order confirmation email and in the admin area.  Thought all was well and emailed hundreds of discount coupons to perspective customers. Many orders are being placed as a result.

 

BUT, when the transaction goes to authorize.net, the amount does not include the discount and customer credit cards are being billed for the non-discounted amount.  A major problem.

 

Relevant info:

 

1. Using Authorizenet ADC Direct Connection w/cvv and transaction key.

2. This is the only payment module being used.

3. Using the 510b release of ccgv.

 

I would truly appreciate any help with this. Thank you!!

I've had the same issue. To fix this (thanks to Joshua Dechant on his bug report 1629) modify checkout_process.php.

 

Before:

 

// load selected payment module

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment($payment);

 

// load the selected shipping module

require(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping($shipping);

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

//************************************************************

// Authorizenet ADC Direct Connection

// Make sure the /catalog/includes/class/order.php is included

// and $order object is created before this!!!

if(MODULE_PAYMENT_AUTHORIZENET_STATUS) {

include(DIR_WS_MODULES . 'authorizenet_direct.php');

}

//************************************************************

 

// load the before_process function from the payment modules

$payment_modules->before_process();

 

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

 

$sql_data_array = array('customers_id' => $customer_id,

 

********************************************************************

After:

 

// load selected payment module

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment($payment);

 

// load the selected shipping module

require(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping($shipping);

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

 

//************************************************************

// Authorizenet ADC Direct Connection

// Make sure the /catalog/includes/class/order.php is included

// and $order object is created before this!!!

if(MODULE_PAYMENT_AUTHORIZENET_STATUS) {

include(DIR_WS_MODULES . 'authorizenet_direct.php');

}

//************************************************************

 

// load the before_process function from the payment modules

$payment_modules->before_process();

 

$sql_data_array = array('customers_id' => $customer_id,

 

Hope this helps.

Share this post


Link to post
Share on other sites
Wow, does the help every reply to serious help problems???

 

i posted my problem almost a week ago and no solution

Your problem is that the checkbox to redeem a gift v. not appears?

 

Try change the sort order to 740 for Discount Coupons and 760 for Gift Vouchers, that works for me.

that did nothing

 

ug, this is annoying...it was there when I installed it, the first time I signed in, then I went back and it was gone

Share this post


Link to post
Share on other sites

Simple question..

 

Do you have to be an existing customer to be able to redeem a coupon code?

 

or

 

does the functionality exist where by I could send a coupon code to 'whoever' ?

Share this post


Link to post
Share on other sites

I have a tiny problem with this module. Everything seems to be working correctly on the admin side, however when I try and process an order I get the following error when I get to checkout_payment.php:

Fatal error: Call to undefined function: use_credit_amount() in C:\Program Files\Apache Group\Apache2\htdocs\store\includes\classes\order_total.php on line 117

 

I used to ExamDiff to see if I had missed any code in the install, with all looking ok. Instructions were followed as per install.html.

Help would be appreciated.

Share this post


Link to post
Share on other sites

Search Help Keywords: Sort Order, Total, Incorrect, Subtract, Discount Code, Coupon, Checkout, Error.

 

If anyone is having problems with discounts not being correctly subtracted from the total in OSC and thus appearing incorrectly in the Admin Order List here's a suggestion.

 

I was having this problem - total would submit correctly to 2checkout.com but would appear without subtracting discount in my Admin panel. To resolve the problem I changed the sort order of the modules in Admin/Modules/Order_Total.

 

I changed Total to 9. I changed Discount Coupon to 8 so that it comes just before Total. GV is still set to 760 because I haven't toyed with it yet but will try it probably at 7 or so.

 

If this helps drop me a line. I hope it helps.

 

Regards,

John :mellow:


Regards,

John

 

"There is nothing like a little successful tinkering to bring out the looney mad scientist in all of us. Brohoohoohoooohaahaahaaahahaaaaaaaaaa!"

Share this post


Link to post
Share on other sites

Just a note: problem with my so-called 'solution' is that OSC keeps discounting the percentage off the entire subtotal including the shipping, which I don't want it to do?

 

Any ideas how to keep it from using shipping in the calculation of the percentage discount?

 

Regards,

John


Regards,

John

 

"There is nothing like a little successful tinkering to bring out the looney mad scientist in all of us. Brohoohoohoooohaahaahaaahahaaaaaaaaaa!"

Share this post


Link to post
Share on other sites

Don't I feel less than bright now!

 

I forgot to turn off tax and shipping calculations for the coupon.

 

:blink:

 

:P

 

Regards,

John

Edited by threeG

Regards,

John

 

"There is nothing like a little successful tinkering to bring out the looney mad scientist in all of us. Brohoohoohoooohaahaahaaahahaaaaaaaaaa!"

Share this post


Link to post
Share on other sites

Anybody having a store with prices including tax or discount coupons with restrictions and having problems with DC/GV contribution?

 

I have found a couple of bugs in "modules/ot_coupon.php" regarding the above case and even cases for shops displaying prices excluding taxes. The thing is that discount coupons with restrictions didn't calculate the discount and tax correct. There were some fundamental bugs in this part. I also fixed some "corrections" to Credit Note, i.e some corrections before was not correct. ;)

 

I have also added a "debug" flag in the class so you can follow the calculation of deduction, tax etc. This is a very nice feature.

 

I am not sure if it's just me or others are having the same issus, so please PM me if you would like to test this modified class. Then when confirmed we can add it to this great contribution!

 

/Fred

Share this post


Link to post
Share on other sites

Problem report:

 

Editing a coupon with coupon admin resets the start/end date of the coupon. There is some code that tries to retain the old start/end date, but it didn't

seem to work on my system, so I had to change it to make it work.

 

I was just wondering if someone else could confirm they had the same problem

or if I have a install problem.

Share this post


Link to post
Share on other sites
Problem report:

 

Editing a coupon with coupon admin resets the start/end date of the coupon.  There is some code that tries to retain the old start/end date, but it didn't

seem to work on my system, so I had to change it to make it work.

 

I was just wondering if someone else could confirm they had the same problem

or if I have a install problem.

I've reported this bug some time ago (>3 months) and I've posted a fix for it. It should be in 5.10b I think (I am not sure).

 

/Fred

Share this post


Link to post
Share on other sites

Hi, i've installed the lastest version on 2.2ms2 and everything is working fine except that I'm using BTS1.2 and I cannot get the modifications to catalog/includes/boxes/shopping_cart.php to function.

 

This is because of the way BTS works and no longer uses the $info_box_contents array.

 

Has anyone found a way round this problem or can anyone help me out a bit.

 

Any help is much appreciated.

 

Regards,

 

Fish

Share this post


Link to post
Share on other sites
Problem report:

 

Editing a coupon with coupon admin resets the start/end date of the coupon.? There is some code that tries to retain the old start/end date, but it didn't

seem to work on my system, so I had to change it to make it work.

...

I've reported this bug some time ago (>3 months) and I've posted a fix for it. It should be in 5.10b I think (I am not sure).

 

/Fred

Hi, I just ran an diff on "coupon_admin.php" for 5.10b and my version and they are identical but for two bug fixes I've made. One of the bugs is the one you reported and the other is a fix I made for the voucher report. I.e you can not view the "next 20" redeemed coupons etc.

 

So the fix for start/end date of coupons is not in 5.10b.

 

If you want I can e-mail you my "coupon_admin.php". As I said, it's the same as 5.10b but for the two fixes.

 

/Fred

Share this post


Link to post
Share on other sites
you can just post what you have changed here so everyone can take a look

The thing is I've posted this before but with no response what so ever ... but here it is again ....

 

In "coupon_admin.php"

 

#1

Change this:

      if (!$HTTP_POST_VARS['coupon_startdate']) {
       $coupon_startdate = split("[-]", date('Y-m-d'));
     } else {
       $coupon_startdate = split("[-]", $HTTP_POST_VARS['coupon_startdate']);
     }
     if (!$HTTP_POST_VARS['coupon_finishdate']) {
       $coupon_finishdate = split("[-]", date('Y-m-d'));
       $coupon_finishdate[0] = $coupon_finishdate[0] + 1;
     } else {
       $coupon_finishdate = split("[-]", $HTTP_POST_VARS['coupon_finishdate']);
     }

 

into this:

    if ($HTTP_GET_VARS['action'] == 'voucheredit') { 
       $coupon_startdate = split("[-]", $coupon['coupon_start_date']);
       $coupon_finishdate = split("[-]", $coupon['coupon_expire_date']);
   } else {
     if (!$HTTP_POST_VARS['coupon_startdate']) {
       $coupon_startdate = split("[-]", date('Y-m-d'));
     } else {
       $coupon_startdate = split("[-]", $HTTP_POST_VARS['coupon_startdate']);
     }
     if (!$HTTP_POST_VARS['coupon_finishdate']) {
       $coupon_finishdate = split("[-]", date('Y-m-d'));
       $coupon_finishdate[0] = $coupon_finishdate[0] + 1;
     } else {
       $coupon_finishdate = split("[-]", $HTTP_POST_VARS['coupon_finishdate']);
     }
  }

 

 

 

#2

and after:

                <td class="dataTableContent" align="right"><?php if ( (is_object($cInfo)) && ($cc_list['unique_id'] == $cInfo->unique_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_COUPON_ADMIN, 'page=' . $HTTP_GET_VARS['page'] . '&cid=' . $cc_list['coupon_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
             </tr>
<?php
   }
?>

 

add this:

              <tr>
               <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="smallText" valign="top"><?php echo $cc_split->display_count($cc_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_COUPONS); ?></td>
                   <td class="smallText" align="right"><?php echo $cc_split->display_links($cc_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'],'action=voucherreport&cid='.$HTTP_GET_VARS['cid']); ?> </td>
                 </tr>
               </table></td>
             </tr>

 

/Fred

Share this post


Link to post
Share on other sites

I've made some changes to the contribution and I would like to tell you about it.

 

As you may have seen Ian had in mind a restriction of coupons like the restrictions on categories and products, there is already a field in the coupon table named "restrict_to_customers".

 

I've implemented restriction of discount coupons to a list of customers just like the restriction to products and/or categories. And the good news is that there is no need to change the database. If you leave this field blank, there is no restriction on customers.

 

In "coupon_admin.php" there is a new field when inserting a new coupon or editing an existing coupon, restrict to customers which is a comma separated list of customers that are valid to use the coupon. I have also changed the class "ot_coupon" in "ot_coupon.php" to calculate credits and tax_deduction etc based on this new restriction rule.

 

I have also added two new files to take care of listing customers etc.

 

So there are 2 amended files and 2 new files required for this change. If someone is interested in this just PM me so we can thoroughly test this before we add this into the contribution.

 

/Fred

Share this post


Link to post
Share on other sites

I just want to say thank you to everyone who worked on this contribution. I have almost zero knowledge of PHP, but I can follow instructions. I was able to get this up and running in 3.5 hours. I followed the excellent instructions step by step, modified every file that need to be modified by hand (our installation already had some customization), and it worked without a hitch!

 

Thanks again.

 

Bob

Share this post


Link to post
Share on other sites

Upon checkout the values are correct, for the total after taking a coupon or free shipping off. But the credit card processing company, reports it as the total before the deductions... is anyone else having this problem? how do i fix it? thanks.


Most likely your question has been answered, please do a search first.

Share this post


Link to post
Share on other sites

Hi,

 

I went nearly all 95!!! pages, and still couldn't find a decent bug fix for the category/product restrictions.

validcategories.php and validproducts.php just appear empty of cat/prod...

Has this been resolved?

 

I'm using 2.2-CVS and ccgv-510b

 

Please help???

Share this post


Link to post
Share on other sites
this module would be even cooler, if it could do not valid on restrictions for like gift certificates.

I was also wondering the same thing, is there a way to make the ship in cart not show when someone's just purchasing a gift certificate or something that's downloaded rather than shipped?

 

Thanks.

Share this post


Link to post
Share on other sites

I installed this contribution going through the directions step by step.

The coupons work for a dollar amount but not for a percentage. When I enter a code for a Gift Voucher or a coupon for a percentage it just goes to the checkout_confirmation page without changing to total. The more info link in the shopping cart box does nothing.

 

Any suggestions?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×