Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

heeey! trying to fix this one, i might just have come up with something that would help someone, someday. keywords: module stuck uninstalled won't install reinstall

 

if a module won't install when you click it, and it's one you've used before.. maybe it didn't get uninstalled completely. in my instance this was evidenced by the fact that the 'sort order' was still set for the uninstalled module. so i got the url for the +Install button, http://whatever.com/shop/admin/modules.php...&action=install -- and changed 'install' to 'remove', and that reset it. install now works.

 

hope this helps someone someday!

 

Hey Top Popper:

 

would u please post the sort order of the rest of your payment modules? ...i havent tried it yet but its hard to believe that this will fix everything!  ..and WHY havent i tried it yet? well, now when i press the +Install button next to Discount Coupons, it works for a second and then reverts to uninstalled state. siggghhhhh................. so i guess let me go search the thread on THAT now and perhaps prepare to re-install everything.

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Nope, this alone didn't do it. And like I said, if I set Include Shipping to false, the discount doesn't appear or affect the total AT ALL...

 

whats the rest of your sort order? any other ideas?

my request for help is still open folks :)

 

allen

 

I noticed a few others here with this problem and found the fix...

 

I added a coupon for 10% off all products / categories.

 

At checkout, it took 10% off the shipping amount, NOT the subtotal.

 

The fix is this, go into Admin / Modules / Order Total and edit Discount Coupons like this:

 

Display Total - true

Sort Order - 4

Include Shipping - false

Include Tax - false

Re-calculate Tax - None

Tax Class - --none--

Link to comment
Share on other sites

I've been running this module on my site, and it works really well...except for one thing.? I don't seem to be able to combine a %age discount wiht free shipping.? When I set it up, it's fine, but it actually sets it up as a value discount.

 

IE.? If I try to give a 10% discount with free shipping, it turns it into a ?10 voucher with free shipping!?

 

Everything else works fine..where am I going wrong?

 

Thanks in advance!? :blush:

 

I just ran into exactly the same problem, first you have to do as is in post 2027, then you have to uncheck the "free shipping" text box in the discount coupon Admin and then it works fine :rolleyes: B)

And incase your wondering yes the Free shipping (or should that read postage ;) ) still applies.

Edited by Reesy
Link to comment
Share on other sites

Here you go...

 

 

Sub-Total 1

Shipping 2

Tax 3

Discount Coupons 4

Gift Vouchers 5

Total 6

Low Order Fee not active

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

I'm having no luck at all in activating the gift voucher and coupon modules. Whenever I try I get an error message of:

 

Fatal error: Cannot redeclare class ot_coupon in /home/sites/site10/web/includes/modules/order_total/ot_coupon.php on line 15

 

It gives the same error for either module when installed singly. All the other parts seem to be working OK, I can create and edit vouchers and coupons in the admin page.

 

I found an earlier post about it but their problem was sorted by a re-install: I've spent 7 hours doing that now and I'm pretty sure there are no editing bugs! Can anyone suggest a fix? I don't even know where to start looking. Why is it saying it's a redeclare problem? Where else would it be declared?

 

Any help would be so much appreciated as this site is committed to going live Friday, CCGV or not!

 

Thanks in advance,

 

Neil

Link to comment
Share on other sites

PayPal Preparing IPN status is showing for a purchase that are 100% voucher. I only have the PayPal IPN payment module installed and it works with the CCGV mod.

 

However, if someone uses a voucher to make the entire purchase it shows their status as PayPal Preparing IPN and dose not switch over to Pending. Is this normal behavior? I believe I have the latest version of the mod installed and the PayPal CCGV modifications.

 

Thanks,

 

-G

Link to comment
Share on other sites

Hey everyone, osCommerce newbie here trying to finish a project in the next 48 hours. everything seemed to be going soooo smoothly when.....

discount coupon of %10 [no restrictions]: if 'calculate shipping' is set to true in the coupon payment mod, then it returns the discount as 10% OF THE SHIPPING COST [not the product cost]; if 'calculate shipping' false, then the coupon isn't honored at all... please help help help help... i am a reasonable PHP programmer so, even any LEADS you might have would help!

thanks

allen

 

OK! An exciting update!:

 

I've been working for quite some time on figuring out where this problem is, and I finally took a significant step today. I had the invaluable help of the PHP Debugging system, Gubed [gubed.sourcforge.net]. I discovered that the problem doesn't lie in the part of the program that applies the discount, as I thought it did! By tracing every step of the process, I found out that the error occurs because I'm purchasing a gift voucher. During the discount calculation, the gift-voucher part of the code notices that I have a gift voucher in my cart, but then messes up and APPLIES the gift voucher to the purchase's total price [subtotal plus shipping] (see get_order_total in ot_coupon). Subtotal is price of gift voucher [ie. 25$] - value of voucher [$25] = 0, + shipping, minus 10%. So it IS taking the 10% off of the total, as it should; it just somehow thinks that the total is 0 plus the shipping! This is also why, if you turn 'calculate shipping' off, the discount doesn't appear at all: the discount code takes cart value [$25] - gift voucher [$25] = 0, plus nothing because shipping isnt calculated... so then the coupon's discount total is zero and the program supresses it's output.

 

SO! Now all I gotta do is figure out how to FIX the problem I found... ANY SUGGESTIONS ARE HELPFUL -- if we can make this module do what it should, i think a lot of peoples' [non-fatal-and-script-ending] errors will dissappear.....so now i don the tribal warpaint and prepare to hunt the animal I have defined...until I kill it and drink it's blood, which I imagine will taste a lot like beer.

 

a

Link to comment
Share on other sites

Sorry if this is covered already, I got to page 40 and, well... fell asleep. Sooo...

 

How do I display the discount amount that can be potentially tooken away from the order for a gift voucher? Like what variables/functions/whatever do I need to call to get the amount of gift voucher that can be applied?

 

Also, same question but for how to access the grand total.

 

I tried copying and pasting from the shopping cart info box, but it always thinks both amounts are $0 instead of the right amounts.

 

example: I have in my account a gift voucher for 50 bucks. My order total is only 15 bucks. I want to display it like this...

 

Payment Method

Check/Money Order                    []

Paypal (credit card/debit)            []

$15 from available gift vouchers  []

 

This next part I can set up, but I'll describe it anyways just to put the idea out there:

 

If the gift voucher totally covers the total, make it so that clicking on it will set all of the other payment options to off.

 

If the gift voucher is less than the total, then the person will click on a payment option AND the gift voucher. Like I said I know enough to do that part I just need to be able to access the total and the voucher amount appliable to the order.

 

If and when I get it working I'll post the code so if anyone else wants to set it up this way they can too. The reason I'm changing it is because the current way is very confusing, my test customers say they think they have to enter the voucher code again and hit redeem even when it is already redeemed, so I'm changing it to be a little more self intuitive.

 

Thanks!

Link to comment
Share on other sites

PayPal Preparing IPN status is showing for a purchase that are 100% voucher. I only have the PayPal IPN payment module installed and it works with the CCGV mod.

 

However, if someone uses a voucher to make the entire purchase it shows their status as PayPal Preparing IPN and dose not switch over to Pending. Is this normal behavior? I believe I have the latest version of the mod installed and the PayPal CCGV modifications.

 

Thanks,

 

-G

G, Did you install the "27 Jan 2005 - PayPal IPN Update" update from the contribute section for ccgv? contrib page here. I have installed that update, and am using paypal IPN, and in my tests it skips the paypal step when completely paid for. Although, I do have some heavy modification to the layout of the payment screen (as shown below) but that should not affect how it works.

 

 

To anyone wanting to make the payment screen a little more easy to understand (at least in my humble opinion): this is how my payment screen now looks: payment screencap And yes I do know that I neglected to customize the stupid redeem button to look like the rest... putting that off in case I decide to change the button look again...

 

I Changed the javascript so that if the voucher amount covers the whole total, when you click on "$38.65 from Gift Vouchers" it unchecks all the radios, and disables them. Then if you uncheck the gift voucher it enables them again. If the gift voucher does not cover the whole total, then you still have to click on one of the other payment methods, even if you click on the voucher. This makes it pretty hard to screw up for customers (although there will always be the one or two trouble customers that still can't figure it out, oh well)

 

Also, if you couldn't guess, the $37.28 changes to whatever amount is able to be applied to your account, like if you have 10 buck voucher, and the total is over 10, it displays $10.00. This makes it clear to customers exactly what will be discounted for the gift voucher. I also made it so that it unregisteres whether the gift voucher is being applied at the top of this page, because when customers go to the checkout and then decide "oh hey, I don't want to use my gift voucher yet!" if they go back to payment, the gift voucher is already put toward the total and they are unable to undo it.

 

It took way too much digging around to figure out how to do this... if you want to do it here is my code... I had to change more than just one page. Unfortunately I did this VERY late at night while drinking liquid jollyranchers (smirnof twist) so I neglected to make much documentation... I will describe to the best of my memory what I did though. They should be pretty accurate, the most I might miss is forgetting to tell you about some commented out line, or something minor like that.

 

Check later in this thread for follow ups by me, before you make this change (in case later in the future I fix a bug in the instructions)

 

1. BACKUP THE FILES before you edit them!!!! This is especially important since (like I said above) I might be missing a step or two. If you hose your live shop because of this, it's your own fault for not backing up.

 

2. catalog/checkout_payment.php

 

search the file for

$order_total_modules->process();

This will only be in your code if you customized this page to show order total and all that. Comment this line out, as we will be doing it elsewhere in the file.

 

at the beginning of the file, after this line

  require('includes/application_top.php');

add

if (tep_session_is_registered('cot_gv')) tep_session_unregister('cot_gv');  //added to reset whether a gift voucher is used or not on this order

 

after this code around line 133 or so

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}

add this code:

<?php
if (MODULE_ORDER_TOTAL_INSTALLED) 
  $temp=$order_total_modules->process(); 
   $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);
//$temp=$order_total_modules->process();
$temp=$temp[count($temp)-1];
$temp=$temp['value'];
if ($gv_result['amount']>=$temp){ $coversAll=true;
?>
function clearRadeos(){
document.forms[0].cot_gv.checked=!document.forms[0].cot_gv.checked;
for (counter = 0; counter < document.forms[0].payment.length; counter++)
{
// If a radio button has been selected it will return true
// (If not it will return false)
if (document.forms[0].cot_gv.checked){
document.forms[0].payment[counter].checked = false; 
document.forms[0].payment[counter].disabled=true;[CODE]
//document.forms[0].cot_gv.checked=false;
} else {
document.forms[0].payment[counter].disabled=false;
//document.forms[0].cot_gv.checked=true;
}
}
}<? } else { $coversAll=false;?>
function clearRadeos(){
document.forms[0].cot_gv.checked=!document.forms[0].cot_gv.checked;
}<? } ?>

On the next line, change the code

<?php echo $payment_modules->javascript_validation(); ?>

to this (note the $coversAll) (also note that we will be changing the function later on to accept this variable input)

<?php echo $payment_modules->javascript_validation($coversAll); ?>

 

At this point I added the checkout info at the top of the screen, you can add this if you want but it's not part of this mod. See my full source below if you want to add it. I got it from another thread somewhere.

 

RIGHT after this code (don't know the line number because of customization) it is at the end of the for loop that draws all the radios for payment selection.

                    </table></td>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
<?php
   }
?>
               </table></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
<?php
   $radio_buttons++;
 }

Add this code:

    if (tep_session_is_registered('customer_id')) {

if ($temp>0){
 echo ' <tr><td width="10">' .  tep_draw_separator('pixel_trans.gif', '10', '1') .'</td><td colspan=2><table border="0" cellpadding="2" cellspacing="0" width="100%"><tr class="moduleRow" onmouseover="rowOverEffect(this)" onclick="clearRadeos()" onmouseout="rowOutEffect(this)" >' . "\n" .
                              '   <td width="10">' .  tep_draw_separator('pixel_trans.gif', '10', '1') .'</td><td class="main"><b>';
 if ($gv_result['amount']>$temp) echo $currencies->format($temp).' ';
 else echo $currencies->format($gv_result['amount']).' ';
 echo $order_total_modules->sub_credit_selection();
   }
 }

That should be all I edited on checkout_payment.php, for this mod. See the very end of this post on a bunus of how to get the order total on this page...

 

3. Edit catalog/includes/classes/order_total.php

 

right before the function credit_selection () add the following function:

	function sub_credit_selection(){
 $selection_string = '';
     $close_string = '';
     $credit_class_string = '';
     if (MODULE_ORDER_TOTAL_INSTALLED) {
       
       reset($this->modules);
       $output_string = '';
       while (list(, $value) = each($this->modules)) {
         $class = substr($value, 0, strrpos($value, '.'));
         if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) {
           $use_credit_string = $GLOBALS[$class]->use_credit_amount();
           if ($selection_string =='') $selection_string = $GLOBALS[$class]->credit_selection();
           if ( ($use_credit_string !='' ) || ($selection_string != '') ) {
             
             $output_string = /*' <tr><td width="10">' .  tep_draw_separator('pixel_trans.gif', '10', '1') .'</td><td colspan=2><table border="0" cellpadding="2" cellspacing="0" width="100%"><tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" >' . "\n" .
                              '   <td width="10">' .  tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>' .*/
                             $use_credit_string;
             $output_string .= '<td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
             $output_string .= '  </tr></table></td><td width="10">' .  tep_draw_separator('pixel_trans.gif', '10', '1') .'</td></tr>' . "\n";
    //$output_string.=$GLOBALS[$class]->use_credit_amount();
             //$output_string .= $selection_string;
           }

         }
       }
       if ($output_string != '') {
         //$output_string =  $output_string;
         //$output_string .= $close_string;
       }
     }
     return $output_string;
}

 

Change the function credit_selection() to this (sorry, I can't remember what exactly what I edited in the code, but I did edit this function some to not display stuff we alread displayed)

    function credit_selection() {
     $selection_string = '';
     $close_string = '';
     $credit_class_string = '';
     if (MODULE_ORDER_TOTAL_INSTALLED) {
       $header_string = '<tr>' . "\n";
       $header_string .= '   <td><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n";
       $output1_string .= '      <tr>' . "\n";
       $header_string .= '        <td class="main"><b>' . TABLE_HEADING_CREDIT . '</b></td>' . "\n";
       $header_string .= '      </tr>' . "\n";
       $header_string .= '    </table></td>' . "\n";
       $header_string .= '  </tr>' . "\n";
       $header_string .= '<tr>' . "\n";
       $header_string .= '   <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">' . "\n";
       $header_string .= '     <tr class="infoBoxContents"><td><table border="0" width="100%" cellspacing="0" cellpadding="2">' ."\n";
      $header_string .= '       <tr><td width="10">' .  tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>' . "\n";
       $header_string .= '           <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n";
       $close_string   = '                           </table></td>';
       $close_string  .= '<td width="10">' .  tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
       $close_string  .= '</tr></table></td></tr></table></td>';
       $close_string  .= '<tr><td width="100%">' .  tep_draw_separator('pixel_trans.gif', '100%', '10') . '</td></tr>';
       reset($this->modules);
       $output_string = '';
       while (list(, $value) = each($this->modules)) {
         $class = substr($value, 0, strrpos($value, '.'));
         if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) {
           //$use_credit_string = $GLOBALS[$class]->use_credit_amount();
           if ($selection_string =='') $selection_string = $GLOBALS[$class]->credit_selection();
           if ( ($use_credit_string !='' ) || ($selection_string != '') ) {
             $output_string .=  '<tr colspan="4"><td colspan="4" width="100%">' .  tep_draw_separator('pixel_trans.gif', '100%', '10') . '</td></tr>';
             $output_string = ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" >' . "\n" .
                              '   <td width="10">' .  tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>' .
                              '     <td class="main"><b>' . $GLOBALS[$class]->header . '</b></td>' . $use_credit_string;
             $output_string .= '<td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
             $output_string .= '  </tr>' . "\n";
             $output_string .= $selection_string;
           }

         }
       }
       if ($output_string != '') {
         $output_string = $header_string . $output_string;
         $output_string .= $close_string;
       }
     }
     return $output_string;
   }

 

4. in catalog/includes/modules/order_total/ot_gv.php

 

change the line near the top of the file that STARTS WITH

$this->checkbox = $this->user_prompt . '<input type="checkbox"

to this

$this->checkbox = $this->user_prompt . '<input type="checkbox" onClick="clearRadeos()" name="' . 'c' . $this->code . '">';

find this function:

    function use_credit_amount() {

change it to

    function use_credit_amount() {
 global $cot_gv, $currencies;
//      $_SESSION['cot_gv'] = false;     // old code - Strider
     $cot_gv = false;
     if ($this->selection_test()) {
       $output_string = $this->checkbox . '</b>' . '</td>' . "\n";}
     
     return $output_string;
   }

(this is needed to bring a few of the tags outside of this function, so that we can put stuff in them that for some reason won't let me add from this function. More specifically, won't let me access the amount of credit that can be applied...)

 

5. edit file catalog/includes/classes/payment.php

 

line 80 or so: find the line

     function javascript_validation() {

change it to

    function javascript_validation($coversAll) {

 

A few lines down, find the line

if (is_array($this->modules)) {

after it add this (heh the only part I rememberd to somewhat comment)

     //BOF added to check for diff stuff jonyo
 if ($coversAll) {
   $addThis='if (document.forms[0].cot_gv.checked) {
      payment_value=cot_gv;  alert (\'hey yo\');
   } else ';
   } else {
  	 $addThis='';
   }
  //EOF added to check for diff stuff jonyo

after this line

              '  var payment_value = null;' . "\n" .

add this

     $addThis . //added by jonyo, yo

 

6. Edit catalog/includes/languages/english/modules/order_total/ot_gv.php (for wordage to sound right)

 

Here is my entire file, since it's pretty small anyways. Change the wording to your liking. The tags (like </td>) that are in the definitions are needed for stuff to line up right, sorry it's a quick and dirty way to do it...

<?php
/*
 $Id: ot_gv.php,v 1.2.2.4 2003/05/14 22:52:59 wilt Exp $

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

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

 define('MODULE_ORDER_TOTAL_GV_TITLE', 'Gift Vouchers (-) ');
 define('MODULE_ORDER_TOTAL_GV_HEADER', 'Enter code below if you have any gift certificates or coupons you have not redeemed yet.');
 define('MODULE_ORDER_TOTAL_GV_DESCRIPTION', 'Gift Vouchers');
 define('SHIPPING_NOT_INCLUDED', ' [Shipping not included]');
 define('TAX_NOT_INCLUDED', ' [Tax not included]');
 define('MODULE_ORDER_TOTAL_GV_USER_PROMPT', 'From Gift Vouchers </td><td align=right>');
 define('TEXT_ENTER_GV_CODE', 'Enter Redeem Code  ');
?>

 

7. Try it and see what happens. If the instructions work, please post so I know if I put all the steps in. If it doesn't work, or if one of the steps isn't understandable, I'll be happy to help you get it working and post the corrected instructions.

 

 

 

BONUS: This is an already posted thing, that I got out of the tips and tricks forum if I remember right. I had to change the table tags a TON from the original to all look right and pretty (at least on my page) Here is the code:

 

in catalog/checkout_payment.php:

Around line 218 or so, find the code

      <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }
?>

RIGHT after it, put this snipet:

 <!--Added by jonyo-->
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo HEADING_PRODUCTS; ?></b><?  echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
   <tr class="infoBoxContents">
           <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
//}

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
  echo '          <tr>' . "\n" .
       '            <td width="10%" class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
       '            <td width="60%" class="main" valign="top">' . $order->products[$i]['name'];

  if (STOCK_CHECK == 'true') {
    echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']);
  }

  if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
    for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
      echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
    }
  }

  echo '</td>' . "\n";

  if (sizeof($order->info['tax_groups']) > 1) echo '            <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '% </td>' . "\n";

  echo '            <td width="30%"class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . ' </td>' . "\n" .
       '          </tr>' . "\n";
}
?>
               <tr>
           <td COLSPAN="4" valign="top" align="right">
          <table border="0" cellspacing="0" cellpadding="3">
<?php
if (MODULE_ORDER_TOTAL_INSTALLED) {
  //$temp=$order_total_modules->process();
  echo $order_total_modules->output();
}
?>
                   </table>
        </td>
         </tr>
     </table>
	 </td>
         </tr>
       </table></td>
     </tr>
<!--              </table></td>
            </tr>
<!--end added by me-->

This bonus is to be treated as an addendum or whatever to the already done tips and tricks thread about adding the cart details and total to the payment_method page. If there are other steps, you will find them there. REMEMBER TO BACK UP!!!

Link to comment
Share on other sites

--GMGGG I did some more testing, and you are right, even with the update for paypal ipn it messes up like you say.

 

I found out how to fix it though, in a roundabout quickfix kind of way: Install the check/money order payment method. Disable it. This is how I originally tested it, which is why I was thinking it worked. When the amount is totally covered by a gift voucher, it says the payment method is check/money order (even though that payment method is disabled, wierd) and the status is pending.

 

Hope this helps! :D

Link to comment
Share on other sites

Hey all,

 

I installed this contribution a while ago: 16 Dec 2004 - Credit Class & Gift Voucher 5.11

 

What updates shoud i implement in order to be current, i am very confused.

 

Thanks

Danny

Link to comment
Share on other sites

--GMGGG I did some more testing, and you are right, even with the update for paypal ipn it messes up like you say. 

 

I found out how to fix it though, in a roundabout quickfix kind of way:  Install the check/money order payment method.  Disable it.  This is how I originally tested it, which is why I was thinking it worked.  When the amount is totally covered by a gift voucher, it says the payment method is check/money order (even though that payment method is disabled, wierd) and the status is pending.

 

Hope this helps! :D

 

 

Sweeeet. Works just fine. I can live with this. :thumbsup:

Thank you,

Link to comment
Share on other sites

Jonyo - I installed your mods, looks great! The only thing missing is in the top order summary box, the HEADING_PRODUCTS (TEXT_EDIT) is not defined. I'm sure I could figure this out, but I'm so tired from daylight savings time and other stuff, it would be great if you could easily point me to which change to make.

 

You can see how it looks if you do a fake checkout (don't confirm) at my site.

 

Thanks much, and this should definitely be a downloadable mod if you have the time!

Link to comment
Share on other sites

Jonyo - I installed your mods, looks great! The only thing missing is in the top order summary box, the HEADING_PRODUCTS (TEXT_EDIT) is not defined. I'm sure I could figure this out, but I'm so tired from daylight savings time and other stuff, it would be great if you could easily point me to which change to make.

 

Never mind, did it myself, very simple. It concerns the "bonus" mod you posted, not the one you made.

 

In catalog/includes/languages/english.php, add the following lines between whatever "define" code you choose:

 

// product summary text in checkout_payment.php
define('HEADING_PRODUCTS', 'Products Ordered');
define('TEXT_EDIT', 'Edit');

 

Thanks again.

Link to comment
Share on other sites

I'm having a problem or two with this contribute:

 

1) when I send someone a coupon, in the email the redeem link is

/gv_redeem.php?gv_no=######. However, when I do redeem that amount (by prepending my shop's address to the given link "/gv_redeem.php?gv_no=421a03")

I do show a voucher amount. I can even send it to someone else, and their email will contain the full, correct link to redeem.

 

2) Even though I show a balance to redeem, during checkout I never see a chance to use my voucher balance. Basically, there's no way I can spend my voucher amount!!

 

Anyone know what could cause these things to happen?

 

 

The only conflicting mod I might have is Group Discounts installed, and the conflicting line difference is this (I think in 2 diff spots)

 

In checkout_process.php:

Coupon's Version:

$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

 

My version:

$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price_nodiscount($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

Link to comment
Share on other sites

I'm having a problem or two with this contribute:

 

1) when I send someone a coupon, in the email the redeem link is

/gv_redeem.php?gv_no=######.  However, when I do redeem that amount (by prepending my shop's address to the given link "/gv_redeem.php?gv_no=421a03")

I do show a voucher amount.  I can even send it to someone else, and their email will contain the full, correct link to redeem.

 

2) Even though I show a balance to redeem, during checkout I never see a chance to use my voucher balance.  Basically, there's no way I can spend my voucher amount!!

 

Anyone know what could cause these things to happen?

The only conflicting mod I might have is Group Discounts installed, and the conflicting line difference is this (I think in 2 diff spots)

 

In checkout_process.php:

Coupon's Version:

    $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

 

My version:

    $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price_nodiscount($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

 

 

Ok I fixed #2, but #1 still givin me problems..

Link to comment
Share on other sites

discmonkey- since hardcoding the HTTP_SERVER fixed your problem, might try looking to see if you have that variable set right in includes/configure.php, although since you already fixed it you probably won't bother :P although I'd think that other stuff besides just the e-mail would be broken if HTTP_SERVER is not set right...

 

aspiringarts- Thanks, glad to hear someone else benifited from it, and that it worked :thumbsup: If enough people are interested I'll clean it up and do testing or whatever is necessary to do it as an official update, I guess I would upload it as an "optional update"? Kinda like the IPN compatibility update? Don't hold your breath though because I have about 20 mini projects all going on at once, and this would probably take some time to do. I'd probably have to start out with the base oscommerce code, put the voucher & coupon version 511 (or whatever is the latest), then do my custom changes, and be making very good comments while updateing, then testing it to make sure it doesn't break anything... So in other words it will probably take some time. Although I'm always looking for good procrastination excuses for other things.... :rolleyes:

Link to comment
Share on other sites

THANK YOU THANK YOU THANK YOU!!!! From the bottom of my little geek heart! I don't know why the simple thigns are sometimes the hardest for me! I had played with this and just couldn't get it to do what I wanted. Kenyastar :D

 

Here is what I have, sorry It took so long, I didn't see your post,

 

 

Sub-Total 1

Discount Coupons 2

Tax 3

Shipping 4

Gift Vouchers 5

Total 50

 

and I get this in Payment/order Confirmation:

 

Sub-Total: $208.00

(Free Shipping)Shipping: $0.00

Gift Vouchers: $130.00

Total: $78.00

 

And $78.00 due once you hit Paypal.....all is as it should be

Link to comment
Share on other sites

2.2 Milestone 3 should be released within 3 months.

 

Milestone 4 should be within 2 months after that, and a finalized 2.2 released shortly thereafter.

 

Please note we are working to get things finalized as soon as possible.

After seeing this, I think I will wait till the final 2.2 comes out, since what I do will probably become obsolete once the finalized 2.2 comes out (and hopefully the voucher system that is compatible with 2.2)

 

So untill then, you can always rely on the previous post on this forum for how to do the "optional update"

 

If you don't know what I am talking about, look for the really long post by me about 1 page back, it has instructions on how to change the look for the order comfirmation page, so that it is easier for customers to understand.

Link to comment
Share on other sites

Go into phpMyAdmin

 

On the left column, click on your store's database to open

 

On the right side and at the top, click on the SQL tab

 

Enter the SQL commands in the text box and hit GO

OR

Click on the BROWSE button and select the SQL file you want to import and hit GO

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

Go into phpMyAdmin

 

On the left column, click on your store's database to open

 

On the right side and at the top, click on the SQL tab

 

Enter the SQL commands in the text box and hit GO

OR

Click on the BROWSE button and select the SQL file you want to import and  hit GO

 

 

 

1 Word - Legend

 

Thanks so much

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...