Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

I have recently installed the Credit Class/Gift Vouchers/Discount Coupons (Version 5.10). I read the instruction to create a welcome gift voucher in the readme, but there are no fields in the admin->configuration->Welcome Gift Voucher Amount or admin->configuration->Welcome Discount Coupon Code for me to change to enable this feature. I am assuming this is a problem with my install, but I have double checked my files and every thing seems to be in order.

 

I would think that changes in file admin/includes/boxes/configuration.php would be necessary for these option to appear in the place the directions stated.

Share this post


Link to post
Share on other sites

Hi all - I'm having a problem with Tax for free freight coupons:

 

My order is set in admin as such:

Discount Coupons 9

Shipping 3

Sub-Total 1

Credit Card Surcharge 5

Tax 4

Total 10

 

And a non-coupon order looks like this:

Sub-Total: $21.00

Flat Rate (Best Way): $9.90

GST: $2.81

Total: $30.90

 

but a coupon order looks like this:

Sub-Total: $21.00

Flat Rate (Best Way): $9.90

GST: $2.81

Discount Coupons:deanrocks: -$9.90

Total: $21.00

 

which is mostly correct, except that the coupon doesn't remove the shipping tax of $0.90 from the GST line.

 

Changing the order doesn't work either, because then if the order is

Discount Coupons 4

Shipping 3

Sub-Total 1

Credit Card Surcharge 5

Tax 9

Total 10

 

gives a coupon order of:

Sub-Total: $21.00

Flat Rate (Best Way): $9.90

Discount Coupons:deanrocks: -$9.90

GST: $2.81

Total: $21.00

, in which the Tax is still wrong ... should be (1/11 of the subtotal + 1/11 of the freight - 1/11 of the coupon).

 

Can anyone help me?

Share this post


Link to post
Share on other sites
I think I'm gonna have to do it myself TBH, I've even crated a seperate thread asking for this feature and got no reply.? <_< If do create something that does this, I'll make it a contrib. :)

Regarding CCGV and "buy three get one free" method of operation, it doesn't work that way. However, you can easily install the Price Breaks mod which works fine with CCGV (my site has both) and in that PB mod you can establish price breaks for your product at your desired qtys.

{example}What you would do is establish your price breaks at qty 1,2,3= $1.00 and your price for 4 = $.75, which would = 4 for $3.00 and only when you buy 4.

Quantity Price Breaks per product

Edited by snuff

--Jeff

Of course I don't look busy! I did it right the first time!

Share this post


Link to post
Share on other sites

Lisa you probably figured this out already...but if you take out the second

new infoBoxRed($info_box_contents);

under

$info_box_contents[] = array('align' => 'center',
           'text' => '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . BOX_SHOPPING_CART_VIEW . '</a>' . '    ' .
            '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL') . '">' .  BOX_SHOPPING_CART_CHECKOUT . '</a>');

That should do the trick

 

Installation of the 5.11 package has gone pretty smooth.  The one problem I'm having is that my shopping cart box is displaying the products twice.  (If a customer has a gv amount, that amount is only displayed once)  Here's a screen shot:

 

shopping_cart2x.jpg

Here's my code for /includes/boxes/shopping_cart.php

<?php
/*
 $Id: shopping_cart.php,v 1.18 2003/02/10 22:31:06 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- shopping_cart //-->
<script language="javascript"><!--
function couponpopupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re
sizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,l
eft=150')
}
//--></script>
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART);

 new infoBoxHeadingShopping($info_box_contents);

 $cart_contents_string = '';
 if ($cart->count_contents() > 0) {
   $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';
   $products = $cart->get_products();
   for ($i=0, $n=sizeof($products); $i<$n; $i++) {
     $cart_contents_string .= '<tr><td align="right" valign="top" >';

     if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
       $cart_contents_string .= '<span class="newItemInCart">';
     } else {
       $cart_contents_string .= '<span class="infoBoxContentsRed2">';
     }

     $cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="infoBoxContentsRed2"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">';

     if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
       $cart_contents_string .= '<span class="newItemInCart">';
     } else {
       $cart_contents_string .= '<span class="infoBoxContentsRed2">';
     }

     $cart_contents_string .= $products[$i]['name'] . '</span></a></td></tr>';

     if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
       tep_session_unregister('new_products_id_in_cart');
     }
   }
   $cart_contents_string .= '</table>';
 } else {
   $cart_contents_string .= BOX_SHOPPING_CART_EMPTY;
 }

 $info_box_contents = array();
 $info_box_contents[] = array('text' => $cart_contents_string);

 if ($cart->count_contents() > 0) {
   $info_box_contents[] = array('text' => tep_draw_separator());
   $info_box_contents[] = array('align' => 'right',
                                'text' => $currencies->format($cart->show_total()));
 }
 // ICW ADDED FOR CREDIT CLASS GV
 if (tep_session_is_registered('customer_id')) {
   $gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
   $gv_result = tep_db_fetch_array($gv_query);
   if ($gv_result['amount'] > 0 ) {
     $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator());
     $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_BALANCE . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($gv_result['amount']) . '</td></tr></table>');
     $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext"><a href="'. tep_href_link(FILENAME_GV_SEND) . '">' . BOX_SEND_TO_FRIEND . '</a></td></tr></table>');
   }
 }
 if (tep_session_is_registered('gv_id')) {
   $gv_query = tep_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'");
   $coupon = tep_db_fetch_array($gv_query);
   $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator());
   $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_REDEEMED . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($coupon['coupon_amount']) . '</td></tr></table>');

 }
 if (tep_session_is_registered('cc_id') && $cc_id) {
   $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator());
   $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . CART_COUPON . '</td><td class="smalltext" align="right" valign="bottom">' . '<a href="javascript:couponpopupWindow(\'' . tep_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $cc_id) . '\')">' . CART_COUPON_INFO . '</a>' . '</td></tr></table>');

 }
 // ADDED FOR CREDIT CLASS GV END ADDITTION
 new infoBoxRed($info_box_contents);
 
 $info_box_contents[] = array('align' => 'center',
           'text' => '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . BOX_SHOPPING_CART_VIEW . '</a>' . '    ' .
            '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL') . '">' .  BOX_SHOPPING_CART_CHECKOUT . '</a>');
 new infoBoxRed($info_box_contents);
 
 $info_box_contents2 = array();
 $info_box_contents2[] = array('text' => tep_image('images/redbox_bottom.gif'));
 
 new infoBoxRedBottom($info_box_contents2);

?>
           </td>
         </tr>
<!-- shopping_cart_eof //-->

 

As you can tell, it is a modified store so I've been very carefull about what I try to fix. Everything I've tried so far hasn't worked. 

 

I would really appreciate someone who knows more about PHP taking a look at this file and pointing out the obvious error(s).

 

Many thanks-

Lisa

Share this post


Link to post
Share on other sites

Seemed to have run into a problem. When I go to confirm the order and I click "Confirm Order" it loops back to checkout_payment.php with no error messages or anything.

 

Anyone know whats wrong?

Share this post


Link to post
Share on other sites
Hello,

I am also getting the following errors for GV installed on MS2:

- When I buy something in the cart, the amount of GV is correctly deducted on the confirmation page, but actually it does not get deducted from the total amount of GV. The shopping cart box still shows the same amount of GV. However the amount of GV gets updated if I send another gift voucher from the GV amount

- I have created a gift voucher GIFT100 (written in product model) and then make a purchase, but nothing happened. It simply gets stored in the order (visible in admin -> customers -> order), but I can not see it as gift queue in admin portion, and also do not get email for the purchased gift voucher at the customer email address.

If anyone can help?

Thanks

kagg

 

Hi,

I am having this same error. could anyone plz help about this.

thanks in advance

 

regards

jojee

Share this post


Link to post
Share on other sites
Before I post this question, I fully acknowledge being a complete douche who didn't spend 3 hours searching to see if my question has already been answered. I apologize. With that being said, I am seeing a weird behavior during the checkout process w/ regards to an GV's that are present. AFTER I checked out, using the full GV value against my order, I was still able to email the GV to a friend from the checkout_success page.

 

Am I missing something obvious about how this module works? I thought that once you redeemed the full value of a GV during checkout, it was gone; no longer available to send to someone else. Any suggestions, theories, insults?

 

Thanks in advance.

 

Has anyone else experienced this problem or have any comments about the above?


cxdi_logo_100x45.gif

Share this post


Link to post
Share on other sites

I just installed the newst download for this with all the fixes but when admin send a gift voucher and the recipient clicks the link to redeem it they get a blank page? Any ideas? Did I do somehting woring? Thanks!

Share this post


Link to post
Share on other sites
When i change in catalog/includes/modules/order_total/ot_gv.php

Line 268:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_GV_SORT_ORDER', '740', 'Sort order of display.', '6', '2', now())");

From '740' TO: '0' it lets me assign any sort order in admin and still works fine.

Should i use with the change or stay with the default 740 sort order?

 

I had to make this change to get the tick box to show at checkout, even though I used the latest contributions.

 

Also I had to "remove" the "Discount Coupons" module.

Share this post


Link to post
Share on other sites

Hi There,

 

This contribution is fantastic. I've got it right around just where I need it. I searched all 97 pages of this thread and can't seem to find anything on the following questions and I was hoping someone could assist me:

 

1. Is there a way to have a discount applied to a product, multiple times? My client would like to sell a product at a discounted rate to people using a coupon code. So if she takes $20.00 off the product, and the client buys 3 of them, we'd like to take $60.00 off instead of $20.00 overall. Is this possible?

 

2. When the end user enters the promo code, there is a "redeem" button, is there a way to remove this button?

 

Thank you for any help you can offer!

David :D

Share this post


Link to post
Share on other sites

Is there a way to take this contribution and make it take the coupon amount off the highest priced item only, not the entire shopping cart? we have 50% off coupons and its taking 50% off the entire cart.

Share this post


Link to post
Share on other sites

SOmeone just purchased a gift voucher and emailed it to a friend, but the friend never recieved the email with the link and code. Anyone know why not? I am on a windows server I have the following in admin under email options

 

E-Mail Transport Method smtp

E-Mail Linefeeds CRLF

Use MIME HTML When Sending Emails true

Verify E-Mail Addresses Through DNS false

Send E-Mails true

Share this post


Link to post
Share on other sites

Somebody please help!

 

I have installed this contribution, and all seemed to go well. I created a new discount voucher, and attempted a sample order. However, I kept getting a number of errors, most of which I was able to rectify myself. However, I now have the following error, which appears after choosing payment method at checkout and pressing continue:

 

Fatal error: Cannot redeclare class order_total in /home/www/buyjewel/catalog/includes/classes/order_total.php on line 13

 

I have tried uploading all the files again to see if I made a mistake that way, and searched through the forums for answers but nothing has helped so far! I am a newcomer to PHP so please be gentle with me!!

 

Many thanks

 

Sarah

Share this post


Link to post
Share on other sites

I tested and checked that the received Gift Voucher email which sent from admin found that two major problems here.

 

1) The Gift Voucher is ALWAYS worth $0.0 even if any amount value entered.

2) Invalid HTTP link (double folders happen). .../shop//shop/....

 

See attached email sample:

_____________________________________________________________

The Gift Voucher is worth $0.0

To redeem this Gift Voucher, please click on the link below. Please

also write down the redemption code which is 838d10 in case you have any

problems.

 

http://www.XXXXX.com/shop//shop/gv_redeem.php?gv_no=838d10

 

or visit http://www.XXXXX.com/shop//shop/ and enter the code during

the checkout process

______________________________________________________________

 

Anyone got the same problem? How to fix the problem?

 

Thanks.

Share this post


Link to post
Share on other sites

Ok i have a problem (pretty small problem)

 

When you redeem a coupon code a line appears in the shopping cart box saying "coupon: more info" and the more info is a link, but when you click it nothing happens

Share this post


Link to post
Share on other sites

Hi all, :( :'(

I know the probem of question 1 because the dollar sign$ is entered. After only entered the amount value without dollor sign is OK.

 

But i cannot find out the solution of invalid HTTP link problem. Anybody has temporary solution when sent by mail gift voucher?

I cannot find out where the address link put to here and i am not sure i downloaded version whether mostly updated. My version is downloaded from here : http://www.oscommerce.com/community/contri...367/mirror,pair

 

Many Thanks. :D

 

 

I tested and checked that the received Gift Voucher email which sent from admin found that two major problems here.

 

1)  The Gift Voucher is ALWAYS worth $0.0 even if any amount value entered.

2)  Invalid HTTP link (double folders happen). .../shop//shop/....

 

See attached email sample:

_____________________________________________________________

The Gift Voucher is worth $0.0

To redeem this Gift Voucher, please click on the link below. Please

also write down the redemption code which is 838d10 in case you have any

problems.

 

http://www.XXXXX.com/shop//shop/gv_redeem.php?gv_no=838d10

 

or visit http://www.XXXXX.com/shop//shop/ and enter the code during

the checkout process

______________________________________________________________

 

Anyone got the same problem? How to fix the problem?

 

Thanks.

Share this post


Link to post
Share on other sites

I've installed a ccgv 5.10 in my osCommerce store. I have a problem with a coupon discount. If I enter a coupon amount in percentage (e.g. 15%), it doesn't apply a discount on a total price (when Checkout). However, if I enter a fixed coupon amount (e.g. $15), it works fine. What the problem can be?

 

Thanks for any advice.

Irin.

Share this post


Link to post
Share on other sites

@ Irin: This is probably a sort order problem. If you look back a few pages in this thread I posted the sort order that worked for me. The examples in the documentation appear to be wrong.

 

@ alex wong: Check the variables in admin/includes/configure.php Pay close attention the the http_catalog and dir_ws_catalog variables. There is probably an extra slash somewhere.

Share this post


Link to post
Share on other sites
@ Irin: This is probably a sort order problem. If you look back a few pages in this thread I posted the sort order that worked for me. The examples in the documentation appear to be wrong.

 

@ alex wong: Check the variables in admin/includes/configure.php Pay close attention the the http_catalog and dir_ws_catalog variables. There is probably an extra slash somewhere.

 

I've tryed to change the sort order, but it doesn't make any changes to the above problem. And, as I said, it works fine with a fixed ($) amount but not a percentage. I think there is a problem with code. But where to look for this problem?

Another question: how somebody can purchase a Gift Voucher (add it to cart?) Do I need to list it in products section, so somebody can just add it to cart?

 

Thanks.

Irin.

Share this post


Link to post
Share on other sites
@ alex wong: Check the variables in admin/includes/configure.php Pay close attention the the http_catalog and dir_ws_catalog variables. There is probably an extra slash somewhere.

 

Adding to this: make sure the server name has no slash at the end of it. Format should be like

define('HTTP_SERVER', 'http://yourhostname.com'); // eg, http://localhost - should not be empty for productive servers

(use localhost if that works for you).

 

Also check that the catalog dir is defined like

define('DIR_WS_HTTP_CATALOG', '/catalog/');

or just one slash if it's your root.

 

Irin:

I've tryed to change the sort order, but it doesn't make any changes to the above problem. And, as I said, it works fine with a fixed ($) amount but not a percentage. I think there is a problem with code. But where to look for this problem?

 

Not sure about this one, but I think you should make sure you have the latest version of /includes/modules/order_total/ot_gv.php. Mine works great with both fixed amounts and percentages.

 

Another question: how somebody can purchase a Gift Voucher (add it to cart?) Do I need to list it in products section, so somebody can just add it to cart?

 

Yup! The contribution comes with images so you can use them out of the box, or you can make your own. You can see mine in action at Aspiring Arts; just click on Gift Certificates on the left (I Americanized mine).

 

Susan

Share this post


Link to post
Share on other sites

Irin:

Not sure about this one, but I think you should make sure you have the latest version of /includes/modules/order_total/ot_gv.php. Mine works great with both fixed amounts and percentages.

Yup! The contribution comes with images so you can use them out of the box, or you can make your own. You can see mine in action at Aspiring Arts; just click on Gift Certificates on the left (I Americanized mine).

 

Susan

 

Susan,

What is the latest version of ot_gv.php and where can I get it?

 

Irin.

Share this post


Link to post
Share on other sites

One more question as an addition to the above. If somebody will purchase a voucher from my store, how they will know the redemption code for that voucher? Do I need to send them this code separately or there is an automated email that needs to be sent containing the code? I've purchased a voucher from myself, and I've got an email containing just an order information. There is no redemption code for the voucher in the email. I'll appreciate any suggestions.

 

Irin.

Share this post


Link to post
Share on other sites
One more question as an addition to the above. If somebody will purchase a voucher from my store, how they will know the redemption code for that voucher? Do I need to send them this code separately or there is an automated email that needs to be sent containing the code? I've purchased a voucher from myself, and I've got an email containing just an order information. There is no redemption code for the voucher in the email. I'll appreciate any suggestions.

Lol - it took me a while to figure this out too, even though it's right in the documentation. Go to the admin interface, Vouchers/Coupons, Gift Certificate Queue. Click on Redeem to release it to the customer, then click Confirm.

 

Susan

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

×