Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

Change the sort order for discount coupon and gift voucher in order total modules. Make discount coupon before gift voucher.

 

 

Thanks kagg it showed the checkbox. I also had few other problems, which were due to the settings, but I fixed them. So here are my seetings for GV

 

Gift Vouchers

 

Display Total

true

 

Sort Order

9

 

Queue Purchases

true

 

Include Shipping

true

 

Include Tax

true

 

Re-calculate Tax

None

 

Tax Class

Taxable Goods

 

Credit including Tax

false

 

I didn't understand why would one recalculate the tax on a purchase? Can someone explain what exactly it does?

 

Now everything is good, If I buy a $8.00 product with a $10.00 GV, the order total is 0 and the paypal screen also shows 0, but Paypal won't let the user pay $0.00, so is there a way in which if the total is 0, the customer is not forwarded to paypal, but to the thanks page and the order is assigned Processing status (or whatever after payment is)

 

I also checked the discount coupon. It also works fine for most of the time. I tried to redeem a DC by itself and then a GV and DC both at the same time and both of the cases worked.

The only problem I faced was that when the Order total was 0, the paypal screen showed -$2.00 (negative of cost of shipping).

 

It seems like things are getting better :)

 

Once again thanks kagg

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Thank you Kagg! It seems following the directions is not the way to get this thing working. I believe Strider is the one who took the time to create the (quite comprehensive instructions) and I thank him but perhaps there should be a stick on the front of this sopic that the contribution won't work unless you use a very specific sort order. The sort order examples provided do not work. Here's what worked for me...

 

Discount Coupons 740

Gift Vouchers 760

Low Order Fee (not used)

Shipping 2

Sub-Total 1

Tax (not used)

Total 900

Link to comment
Share on other sites

Now everything is good, If I buy a $8.00 product with a $10.00 GV, the order total is 0 and the paypal screen also shows 0, but Paypal won't let the user pay $0.00, so is there a way in which if the total is 0, the customer is not forwarded to paypal, but to the thanks page and the order is assigned Processing status (or whatever after payment is)

 

I saw someplace in this thread that there was a glitch in the javascript that tests if the credits cover the order. That may be what is messing you up. I don't charge shipping so I can't test it. But if the credit covers paypal it skips right to the "thanks" screen, as it should.

Link to comment
Share on other sites

what did you do to get it to work? i am having the same problem. i want to create a coupon that is only good for my clearance section but i think i'm having a problem with the cpath as well. i'm just putting the number and it doesn't seem to work. any advice you might have would be greatly appreciated..thanks!!

 

I figured it out.

Thanks anyway

Link to comment
Share on other sites

My client has been using this mod for a while now but came across a situation that I am not sure the current mod is capable of dealing with.

 

My client wants to offer a coupon that provides free shipping for ProductA, in the admin he selects free shipping and enters the correct categories and productID's. What he wants is that if you have ProductA in your cart and your add ProductB (not in the coupon) you will get free shipping on ProductA but not ProductB.

 

What is happening is that if you use the coupon for free shipping on ProductA, it turns the entire order into free shipping.

 

Can this be fixed or worked around?

-Kerry

Link to comment
Share on other sites

Hey Revolt,

I was putting in the complete cpath 30_27_28, but you only have to put in the number of the last part of the path such as 28. Multiple categories would be 28,29 etc. This only works for me in Valid Product List not in Valid Category List. IF ANYONE KNOWS HOW TO GET VALID CATEGORY LIST TO WORK, PLEASE HELP? I FOUND WENDY AND UPDMIKE AROUND PAGE 77 ASKING ABOUT THIS BUT I NEVER QUITE FOUND THE ANSWER THERE.

Link to comment
Share on other sites

Could somebody explain to me how they're using the gift voucher as an electronic gift certificate (ex. $25 Gift Certificate, $50 Gift Certificate)? I am totally confused as to how I should set up everything . . .

 

I understand that a gift voucher can be issued to a customer that wants a refund, in the form of store credit. I also have been able to set up gift certificates in the different denominations with the product model start with GIFT_ (ex. GIFT_25 for the $25 Gift Certificate). Beyond that I am completely lost.

 

I want to be able to issue electronic gift certificates that will be emailed to the receiver (similar to the virtual gift cards found on Macy's website, Macy's virtual gift card). Because the certificate will be emailed, there won't be any shipping charges applied to the order. I set the products weight at 0, so that no shipping charges would be applied, but it doesn't work unless I set the products as downloadable, which I do not want.

 

You can see an example of what I have done so far here: $25 Gift Certificate.

 

Please help! :blush:

Link to comment
Share on other sites

I have the same problems.

 

I added 2 products $5.49 and $19.99? from category A and B in my cart, had shipping charges = $3.50 and tax = $2.10

 

Total = 31.08

 

I issued myself with a "discount coupon" for 31.05 and redeemed it. When I confirmed the order and was forwarded to the Paypal, it showed that I had to pay "-3.47" that is my shipping cost - the balance I had to pay "$0.03"

 

Moreover I assigned the discount coupon to category A and it should have given discount only on $5.49 and not $19.99.

 

Gift Voucher also have weird problems, where I sent a GV worth $10.00 to a customer, he redeemed it and it showed that he has the amount credited but couldn't use it, instead it had a link to send it to someone else.

 

A few weeks back I also created a GV worth $20.00 and bought it and sent $10.00 to another email address. Later I checked that the other person got $10.00 and I still had $20.00 with me.

 

Does anybody has this whole contrib working fine for them? then please upload all the files as it is too confusing and one doesn't know which package to download.

 

Having the same problem here as well, except the negative # I am getting is the total of the tax :huh:

 

Sub-Total: $11.27

Canada Post (1 x 0.12kgs) (Regular, 2005-01-14): $7.96

7.0% GST: $0.79

Shipping 7% GST: $0.56

Coupons:xxxxx: $20.58

Total: $-1.35

Edited by iamcanadian
Link to comment
Share on other sites

I think I've run into an odd little 'glitch' with this- it seems to be working properly but ever since I installed it I'm having problems when people select check/money order as payment AND have a zero balance due. It looks fine in the checkout process right up to the confirmation page- you select check/money order on payment and then on the next page it doesn't show anything as your payment choice and it's not setting the status of the order correctly- setting it to pending rather than shipped and doesn't show on the order page itself (looking at it in Admin) a payment method at all. Anyone else run into this?

Link to comment
Share on other sites

Quin, check the sort order on your payment modules. It sounds like the GV is not being applied. IF you can't see the check box by the redeem button the sort order is messed up. If this is even a tiny bit off the whole thing freaks out.

 

Note: The GV number must be higher than the coupon number, at least that's the way it works on my server.

 

Discount Coupons  740

Gift Vouchers            760

Low Order Fee  (not used)

Shipping                  2

Sub-Total                  1

Tax                  (not used)

Total                            900

Link to comment
Share on other sites

I saw someplace in this thread that there was a glitch in the javascript that tests if the credits cover the order.  That may be what is messing you up. I don't charge shipping so I can't test it. But if the credit covers paypal it skips right to the "thanks" screen, as it should.

 

Thanks nerd3d, I tried it but it didn't work. Does anybody else know how to get rid of Paypal page when the order total is 0?

 

Thanks

Link to comment
Share on other sites

I am facing another problem. The sort order where GV is more than DC gives 0.00 in Paypal for GV, but if I use a DC then for like this:

 

Sub-Total: $5.49

Shipping: $2.00

Discount Coupons:xxxxx: $7.45

Total: $0.04

 

I get -$1.96 on my paypal page. Now how can I solve that?

 

Thanks

Link to comment
Share on other sites

Quin, check the sort order on your payment modules. It sounds like the GV is not being applied. IF you can't see the check box by the redeem button the sort order is messed up. If this is even a tiny bit off the whole thing freaks out.

 

Note: The GV number must be higher than the coupon number, at least that's the way it works on my server.

Thanks but I've got that working- what's happening now is that whether or not I'm actually using a gv or cc if I select 'check/money order' as my payment then on the next page no type of payment shows up (at the customer end or at the Admin end) IF the order totals zero (which happens quite a bit as I offer downloadable freebies). If someone orders an actual product and the total is higher than zero it's fine and it's only been doing this since I installed the contrib. It's not something I can't work around it would just be alot easier if I didn't have to and I'm a little concerned that it may lead to a bigger problem at some point- this may be the symptom rather than the disease so to speak.

Link to comment
Share on other sites

I am facing another problem. The sort order where GV is more than DC gives 0.00 in Paypal for GV, but if I use a DC then for like this:

 

Sub-Total:  $5.49

Shipping:  $2.00

Discount Coupons:xxxxx:  $7.45

Total:  $0.04

 

I get -$1.96 on my paypal page. Now how can I solve that?

 

Thanks

 

I have the same problem too and would like to know how to resolve this. Thanks.

Link to comment
Share on other sites

I'm using Linda McGrath's Free shipping and Payment contribution. That may have something to do with mine not having troubles in the with the negative balance in the check out. I also have all the shipping calculations set to false on Coupons and GV.

 

All my products are downloads, so I don't have any shipping charges. Wish I could help more.

 

P.S. If you use this get the newest one from her website.

Link to comment
Share on other sites

For a quick fix you can edit the paypal module.

 

/catalog/includes/modules/payment/paypal.php

 

comment out lines 89 & 90

 

tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

 

and replace them with this line

 

tep_draw_hidden_field('amount', number_format(($order->info['total']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

 

What this does is just send the total to paypal and doesnt break it down into total and shipping.

 

If you look at the code in line 89 it works it out by deducting the shipping from the total so thats how you end up with a negative figure in paypal.

 

HTH

 

Simon

Link to comment
Share on other sites

Sorry if this is here but this thread is HUGE now.

 

I have just noticed that if I check to pay with a GV only it will work if there is no tax calcualation. If I add tax to the item I am checking out with it is requireing me to choose another method, but is still handling the GV correctly.

 

Anyone know of how to fix this ior where to look?

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Hello all, I've heavily customised my store so I may have introduced this small problem, or not...

 

Does anyone else get a message if they attempt to use a discount coupon but the minimum order has not been reached?

 

e.g. if someone is trying to use a "?2 off your next order over ?10" coupon, but is spending only ?8, my store currently acts correctly and makes no discount, but equally gives no message. :unsure:

 

>> Have I broken the message or is it not there for everyone else too?

 

If I haven't broken it as it just wasn't there...

 

I can see the minimum order amount is checked in function calculate_credit in includes/modules/order_total/ot_coupon.php but as this is called from all over the place I'm loathe to raise an error from there.

Maybe it can be checked in function collect_posts instead?

 

Anyone?

Thanks

Anna

Link to comment
Share on other sites

A bug and the fix. How's that for a change? 6 files included in the GVCC 5.11 contain references to tables names that are hard coded. For the majority of users this will be OK, but it broke the coupon functionality for me. My tables all have a prefix to allow multiple shops in one database. Anyone else with changed table names may run into the same problem.

 

There are 6 files that have these hard coded SQL table references. If you have changed (prefixed) table names you'll need to edit the files to fix the queries. I could only find 6 files with hard coded tables, there may be more!

 

Backup your files first

Backup your files first

Backup your files first

 

You will edit 6 files, back them up.

popup_coupon_help.php

modules/includes/order_total/ot_coupon.php

admin/listproducts.php

admin/listcatagories.php

admin/validcatagories.php

admin/validproducts.php

 

Did I say, "Backup your files first"? I didn't before I started fiddling with these queries. I said bad things for about an hour over a mis-placed space.

 

In popup_coupon_help.php find

     $result = tep_db_query("SELECT * FROM categories, categories_description WHERE categories.categories_id = categories_description.categories_id and categories_description.language_id = '" . $languages_id . "' and categories.categories_id='" . $cat_ids[$i] . "'");

replace it with

    $result = tep_db_query("SELECT * FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE  c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' and  c.categories_id='" . $cat_ids[$i] . "'"); //N3D Fixed this query to use soft coded table names

Then find

    $result = tep_db_query("SELECT * FROM products, products_description WHERE products.products_id = products_description.products_id and products_description.language_id = '" . $languages_id . "'and products.products_id = '" . $pr_ids[$i] . "'");

And replace it with

    $result = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS . " p , " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'and p.products_id = '" . $pr_ids[$i] . "'");//N3D Fixed this query to use soft coded table names

 

OK now open modules/includes/order_total/ot_coupon.php find

     	 $cat_query = tep_db_query("select products_id from products_to_categories where products_id = '" . $products_id . "' and categories_id = '" . $cat_ids[$i] . "'");

and replace it with

     	 $cat_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $products_id . "' and categories_id = '" . $cat_ids[$i] . "'"); //N3D Fixed this query to use table names from database_tables.php

Then find

      $cat_query = tep_db_query("select products_id from products_to_categories where products_id = '" . $products_id . "' and categories_id = '" . $cat_ids[$i] . "'");

and replace it with

      $cat_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $products_id . "' and categories_id = '" . $cat_ids[$i] . "'"); //N3D Fixed this query to use tables named in database_tables.php

 

Now open admin/listproducts.php and find

 

      $result = mysql_query("SELECT * FROM products, products_description WHERE products.products_id = products_description.products_id and products_description.language_id = '" . $languages_id . "'and products.products_id = '" . $pr_ids[$i] . "'");

replace it with

      $result = mysql_query("SELECT * FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'and p.products_id = '" . $pr_ids[$i] . "'"); // N3D fixed query to use soft coded table names

Open admin/listcatagories.php and find

     $result = mysql_query("SELECT * FROM categories, categories_description WHERE categories.categories_id = categories_description.categories_id and categories_description.language_id = '" . $languages_id . "' and categories.categories_id='" . $cat_ids[$i] . "'");

Replace it with

     $result = mysql_query("SELECT * FROM " . TABLE_CATAGORIES . " c, " . TABLE_CATAGORIES_DESCRIPTION . " cd WHERE c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' and c.categories_id='" . $cat_ids[$i] . "'"); //N3D fixed query to use soft coded table names

Open admin/validcatagories.php and find

    $result = mysql_query("SELECT * FROM categories, categories_description WHERE categories.categories_id = categories_description.categories_id and categories_description.language_id = '" . $languages_id . "' ORDER BY categories.categories_id");

Replace it with

    $result = mysql_query("SELECT * FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' ORDER BY c.categories_id"); //N3D fixed query to use soft coded table names

OK, last one open admin/validproducts.php and find

    $result = mysql_query("SELECT * FROM products, products_description WHERE products.products_id = products_description.products_id and products_description.language_id = '" . $languages_id . "' ORDER BY products_description.products_name");

Replace it with

    $result = mysql_query("SELECT * FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' ORDER BY pd.products_name"); //N3D Fixed query to use soft coded table names.

 

I hope this helps somebody.

Edited by nerd3d
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...