Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Still awaiting help !

 

Can anyone shed any light as to why we get this error when confirming purchase of a voucher and sent to pay at Paypal:

 

Error Detected

 

The link you have used to enter the PayPal system contains an incorrectly formatted shipping amount

 

www.pleasurezone.uk.com/store

Link to comment
Share on other sites

wendys: I think I read in another thread you were using someones loaded version. The version that I think you are running is not running 5.10b.

 

peterr: I think the last one for 2.2.1 was 5.04. It had some serious problems.

 

stevemitch2: purchasing a voucher is just like purchasing any other product except that it usually doesn't incur shipping because of the 0.00 weight and that downloads are enabled(well they usually are). Not knowing what type of shipping you are running etc that is about all I can add.

(my knowledge is so small you would think that an ant was a genius in comparison)

Link to comment
Share on other sites

our shipping is set up per price, meaning that anything up to ?50 has delivery charge of ?3.50, and over ?50 is free shipping (50:3.50,400:0)

 

we have had no probs before and everything else works ok in the contrib.

 

we have placed vouchers for sale as per a normal product and they have a code starting as the install instructions specify, which i assume makes sure that shipping doesnt get charged on the vouchers.

 

seems that paypal doesnt recognise the contributions way of sending total to paypal??

 

steve

Link to comment
Share on other sites

just discovered that by setting 'download' to true, doesnt add shipping to vouchers - BUT paypal gives the previous error.

 

on the other hand, if 'download' is set to false, shipping gets added and it goes into and through paypal ok, but obviously we dont want shiping on vouchers as they dont get sent do they, dont they just stay on the customers account within osc, ready for them to spend?

 

what exactly does the 'download' function do?

 

steve

Link to comment
Share on other sites

Hi,

 

peterr: I think the last one for 2.2.1 was 5.04. It had some serious problems.

 

Okay, thanks for clarifying that. It seems to be working okay, there are some hacks in between the contrib. code, for example in checkout_process.php

 

// send emails to other people
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
   tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, nl2br($email_order), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');
 }

$creditconnection = mysql_connect($mycredithost,$mycreditdbuser,$mycreditdbpass) or die ("Couldn't connect to server.");
$creditdb1 = mysql_select_db($mycreditdb, $creditconnection) or die ("Unable to select database.");

$mycredit_db = "SELECT * FROM customers WHERE customers_id='$customer_id'"; 
$mycredit_result= mysql_query($mycredit_db,$creditconnection) or die ("Can not ....");
while ($row = mysql_fetch_object($mycredit_result)){
$this_credit_customer_id=$row->customers_id;
$this_credit_customers_groups_id=$row->customers_groups_id;

if ($this_credit_customer_id==$customer_id){
 $this_credit_customer_group_id=$this_credit_customers_groups_id;
}
}
$my_products_price_total=str_replace ("$", "", $currencies->format($cart->show_total()));

$the_credit_customer="";
if ($this_credit_customer_group_id==2){
$mycredit_db = "SELECT * FROM coupon_gv_customer"; 
$mycredit_result= mysql_query($mycredit_db,$creditconnection) or die ("Can not check if customer exists"); 
while ($row = mysql_fetch_object($mycredit_result)){
 $this_credit_customer_id=$row->customer_id;
 $this_credit_customer_amount=$row->amount;

 if ($this_credit_customer_id==$customer_id){
	 $the_credit_customer="exists";
	 $the_credit_amount_old=$this_credit_customer_amount;
 }
}
if ($the_credit_customer=="exists"){
 $this_credit_add=$my_products_price_total*0.1;
 $the_credit_amount_new=$this_credit_add+$the_credit_amount_old;
 
 $mycredit_db = "UPDATE coupon_gv_customer SET amount='$the_credit_amount_new' WHERE customer_id='$customer_id'"; 
 $mycredit_result= mysql_query($mycredit_db,$creditconnection) or die ("Can not update account");
} else {
 $this_credit_add=$total_products_price*0.1;
 
 $mycredit_db = "INSERT INTO coupon_gv_customer (customer_id,amount) VALUES ('$customer_id','$this_credit_add')"; 
 $mycredit_result= mysql_query($mycredit_db,$creditconnection) or die ("Can not create account");
}

$this_credit_message="Dear Customer,\n\nThank you for your recent order with ......";

mail($order->customer['email_address'], "You have Received a ... Credit!", $this_credit_message, "From: [email protected]");
}

// load the after_process function from the payment modules
 $payment_modules->after_process();

 

Can't understand why it is done like that (the 'hack'), when the db connection has already been established (by application_top.php), and the use of non std osCommerce code, rather than using the 'tep_' functions.

 

Also, the update or insert into the table "coupon_gv_customer" is already done elsewhere, as part of the contribution. If they wanted to only give a credit for "customers_groups_id = 2", then why not just place the IF construct around the code for this contribution.

 

Please understand all my comments are directed at the 'hack', and not the contribution, it would appear that the contribution is working fine with MS-1.

 

Thanks,

 

Peter

Link to comment
Share on other sites

Hi,

 

I was just wondering if Wendy managed to fix her problem with the GV not being deducted when Paypal IPN was used for payment.

 

I'm having the same problem currently, and was wondering whereabouts the fix/problem would be located.

 

 

TIA

Link to comment
Share on other sites

Hi,

 

I was just wondering if Wendy managed to fix her problem with the GV not being deducted when Paypal IPN was used for payment. 

 

I'm having the same problem currently, and was wondering whereabouts the fix/problem would be located.

TIA

I am not sure which version IPN everyone is using, but I have recently finished a clean install of this mod along with PayPal IPN v2.8. I have not tested each and every part of the GV/COUPON capability, but I no that a percent discount with no limits(products/categories) works wonderfully all the way through the process. I have the IPN settings like this,

PayPal

Enable PayPal Module

Do you want to accept PayPal payments? [Help]

True

E-Mail Address

The e-mail address to use for the PayPal service

@#$^*%@WHOEVER.COM

 

Business ID

Email address or account ID of the payment recipient

@#$^*%@WHOEVER.COM

 

Transaction Currency

The currency to use for credit card transactions

 

Selected Currency

Only USD

 

Payment Zone

If a zone is selected, only enable this payment method for that zone.

all

 

Set Pending Notification Status

Set the Pending Notification status of orders made with this payment module to this value ('Pending' recommended)

Pending

 

Set Order Status

Set the status of orders made with this payment module to this value

('Processing' recommended)

Processing

 

Set On Hold Order Status

Set the status of On Hold orders made with this payment module to this value

On Hold

 

Set Canceled Order Status

Set the status of Canceled orders made with this payment module to this value

Canceled

 

Synchronize Invoice

Do you want to specify the order number as the PayPal invoice number?

False

 

Sort order of display.

Sort order of display. Lowest is displayed first.

0

 

Background Color

Select the background color of PayPal's payment pages.

White

 

Processing logo

The image file name to display the store's checkout process

default

 

Store logo

The image file name for PayPal to display (leave empty if your store does not have SSL)

NONE

 

PayPal Page Style Name

The name of the page style you have configured in your PayPal Account

 

 

Include a note with payment

Choose whether your customer should be prompted to include a note or not?

No

 

Shopping Cart Method

What type of shopping cart do you want to use?

Aggregate

 

Enable PayPal Shipping Address

Allow the customer to choose their own PayPal shipping address?

No

 

Digest Key

Key to use for the digest functionality

 

 

Test Mode

Set test mode [iPN Test Panel]

Off

 

Cart Test

Set cart test mode to verify the transaction amounts

off

 

Debug Email Notifications

Enable debug email notifications

Yes

 

Debug Email Notification Address

The e-mail address to send debug notifications to

@#$^*%@WHOEVER.COM

 

PayPal Domain

Select which PayPal domain to use

(for live production select www.paypal.com)

www.paypal.com

 

Return URL behavior

How should the customer be sent back from PayPal to the specified URL?

0=No IPN, 1=GET, 2=POST

2

I am getting all good pass through with this. I think there seems to be serious issues that must be addressed in the older PayPal IPN verisons, and I have decided to upgrade all my customers shops to the v2.8 now that I have tested it some and like the way it runs. Just a few thoughts for everyone. Craig :)

 

PS I will continue testing and post my results.

Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: [email protected]

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Link to comment
Share on other sites

Strider,

Yes, mine OSC is Linda's loaded version and she included Paypal v0.981 and Ian's CCGV. 

 

I noticed there was some changed made on Ian's CCGV, so I downloaded v2.2.2 and used a comparing software to check each file involved and made sure they're all updated to the most current version of CCGV. 

 

I also upgraded the Paypal from v0.981 to Greg's most recent v2.8.  I did experience some problem in the Paypal but finally figured out and made it work.

 

However, I noticed that no matter which Paypal I tried (v0.981 or v2.8), the redeemed gift certificate not being deducted from a customer's available credit always exists.  It doesn't happen with Check/money order or Credit card payment but only with paypal.  So I know it's related to paypal only but don't know which files are involved.  There is a huge difference between Paypal v0.981 and 2.8 (they're indeed two contributions, not just an upgrade) but this problem occurs for both versions. 

 

If you could shed some light on this problem, I would really appreciate.

 

Veral,

Glad to know I'm not alone here.  I haven't solved the problem yet since there are so many files may be involved and I don't even know where to start.  My store is live and I try not to issue gift certificate.  When gift certificate is involved, I have to go to the database to manually change a customer's available credit.  It's such a pain.

 

Hopefully someone here may help us to solve the problem.

 

Wendy

wendys: I think I read in another thread you were using someones loaded version. The version that I think you are running is not running 5.10b.

Link to comment
Share on other sites

The version of ccgv I am using has the file name ccgv-510c.zip. It is installed and working fine - though if I remember correctly there was a lot of installing to do, lots of changes that had to be made to existing files.

 

Vger

Link to comment
Share on other sites

Hello

was wondering if someone can point me in the right direction to correct this problem?

On the catalog/checkout_payment.php page, in the "Credits Available" box, i see the following header:

 

MODULE_ORDER_TOTAL_GV_HEADER

 

How do i edit this to reflect the correct syntax? I must have overlooked something but i cant narrow it down...any help would be much appreciated!!

thx in advance

donato

Link to comment
Share on other sites

look in your includes/languages/englisn/modules/order_total/ot_gv.php and place this:

 

define('MODULE_ORDER_TOTAL_GV_HEADER', 'Gift Vouchers/Discount Coupons');

Link to comment
Share on other sites

I feel like such a newbie.

 

I've installed the CCGV 5.10c and the discount codes are working great. My problem is I can't redeem any of the gift voucher's. Some of the test sites I've been to, have a click here to use voucher check box above or next to redeem. For some reason this is not showing up on my site.

 

I've double checked the code and it appears to be right, can anyone give me a specific page to check to make sure the code is correct to make the check box that redeem's the voucher to show up on the checkout_payment page?

 

Bill

Link to comment
Share on other sites

I have a client who is using the contribution and is having problems with tax. It seems that tax is calculated on the total amount prior to using a coupon. If I buy something for $10.00 and have a 15% off coupon the 6% tax is calculated on $10.00 and not the $8.50 like it shoud be. Has anyone ran into this problem and how did you fix it?

 

Thanks,

Justin

:huh:

Link to comment
Share on other sites

Let's make a new infobox!

 

My client originally asked me to take down the shopping cart infobox to reduce clutter. Since the gv code uses that box, I'm trying to hack together a new infobox just for the discounts and vouchers.

 

I'm so close. The weird thing is that it's repeating the infobox header. Here's a screenshot:

 

infobox_ss.gif

 

I started with includes/boxes/shopping_cart.php, renamed it to gift_certificates.php, and am using this code:

 

<?php
/*
 $Id: shopping_cart.php,v 1.2.2.9 2003/05/13 22:49:08 wilt Exp $
 orig : 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
*/
?>
<!-- gift_certificate_bof //-->
<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_GIFT_CERTIFICATES);

 new infoBoxHeading($info_box_contents, false, false);


// 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="smalltext2">' . VOUCHER_BALANCE . '</td><td class="smalltext2" 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="smalltext2"><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="smalltext2">' . VOUCHER_REDEEMED . '</td><td class="smalltext2" 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="smalltext2">' . CART_COUPON . '</td><td class="smalltext2" 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 infoBox($info_box_contents);
?>

           </td>
         </tr>
<!-- gift_Certificate_eof //-->

 

It's referred to in column_right.php with this code:

 

  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 ) {
    require(DIR_WS_BOXES . 'gift_certificate.php');
   }
 }

 

...so, it ends up querying the database twice. I don't think that would cause it, though. That's just my sloppy php knowledge.

 

In checking "view page source," the CSS class for the repeated header is "boxText", which I think is only defined in includes/classes/boxes.php.

 

I'm lost. I'd love some help. A seperate infobox might be a useful thing to have around in this contribution, too.

First you decide what you've got to do, and then you go out and do it.

Maybe the most that we can do is just see each other through it.

Ani Difranco

Link to comment
Share on other sites

Justin -

 

I think the answer to that tax question is in the admin panel -> modules -> order total.

 

Try playing with the sort order. Do coupons come before tax calculation?

 

You can click the coupon module in there, hit edit, and try tweaking those settings. I'm not sure which is the answer.

First you decide what you've got to do, and then you go out and do it.

Maybe the most that we can do is just see each other through it.

Ani Difranco

Link to comment
Share on other sites

portalplanet: admin->modules->order totals->discount coupons click the recaclulate tax checkbox

 

 

sort orders:

Sub-Total 1

Shipping 2

Discount Coupons 9

Tax 20

Gift Vouchers 740

Total 900

 

Sometimes you want your tax to be 8 depending on your configuration.

(my knowledge is so small you would think that an ant was a genius in comparison)

Link to comment
Share on other sites

hi Strider,

 

you know that PayPal IPN does support 0 cost orders on the paypal side...

 

there is no current fix for that so I was hoping that you can help me to setup temporary fix such as make CCGV not to calculate decimals for GV.

 

example

 

product cost $19.50

gift vocher $25.00

 

if used - product cost becomes $0 and GV balance $$5.50

 

 

needed

 

product cost $19.50

gift vocher $25.00

 

if used - product cost becomes $0.50 and GV balance $6.00

 

thus leaving $0.50 for paypal to accept transaction

 

can you help to do that?

Link to comment
Share on other sites

Dear people,

 

I've installed the contrib, love it, got me some time, but love it. Been reading the whole day here to figger it out. Now i'm testing the system and i run into a little problem:

 

the layout of the e-mail send to a new subscriber is a bit :'( up :

 

Dear Mr. davido,

 

We welcome you to ............ Administration.

 

You can now take part in the various services we have to offer you. Some of these services include:

 

Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out.

Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.

Order History - View your history of purchases that you have made with us.

Products Reviews - Share your opinions on products with our other customers.

 

For help with any of our online services, please email the store-owner: ..................

 

Note: This email address was given to us by one of our customers. If you did not signup to be a member, please send an email to info@...............

Congratulation, to make your first visit to our online shop a more rewarding experience

  below are details of a Discount Coupon created just for you

 

 

 

To use the coupon enter the redeem code which is 399df1b0de during checkout,

after making a purchase

 

 

 

You can now take part in the various services we have to offer you. Some of these services include:

 

Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out.

Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.

Order History - View your history of purchases that you have made with us.

Products Reviews - Share your opinions on products with our other customers.

 

For help with any of our online services, please email the store-owner: info@..............

 

Note: This email address was given to us by one of our customers. If you did not signup to be a member, please send an email to info@...............

 

Does enyone know why this part is repeated in the e-mail ?

Link to comment
Share on other sites

And next to that i just found that when i redeem the Coupon the customer gets the following email:

 

You recently purchased a Gift Voucher from our online store.

For security reasons this was not made immediately available to you.

However this amount has now been released. You can now visit our store

and sent the value via email to someone else

 

The Gift Voucher(s) you purchased are worth ?8,40

 

Funny because the coupons is 10 worth... my tax rate is 19%

Link to comment
Share on other sites

Is there any way to make the whole row that has the "tick box" clickable instead of just the box? When the cursor changes to the hand, and the whole row is highlighted, it gives the impression that you can just click anywhere in that row and it will tick. But you can't do that. You have to click in the box.

Drive it like you stole it.

Link to comment
Share on other sites

I am working with the latest OSCart and the Latest CCGV. When I use the admin control to send out a GV to someone the url they receive to redeem the GV goes to http://website/admin/gv_redeem.php?gv_no=xxxxx

or visit http://website/admin

 

I was wondering how to get the admin part out of the automatic email, since that is the wrong URL. If you manualy remove the admin from the url in the browser, the link works fine, http://website/gv_redeem.php?gv_no=xxxxx

 

thank you for any help.

Link to comment
Share on other sites

Hey,

 

I'm not sure of the exact answer, but here are some places to start.

 

Check your config files:

 

includes/configure.php

--and--

admin/includes/configure.php

 

Make sure there are no paths to "admin" in anything that says "catalog".

 

Then you can check your filename definitions in:

 

includes/filenames.php

 

and make sure there are no paths to "admin" where there shouldn't be.

 

I'm sure someone on this thread can pinpoint the exact place, but this should get you started in the right direction.

First you decide what you've got to do, and then you go out and do it.

Maybe the most that we can do is just see each other through it.

Ani Difranco

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...