Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Credit Class/Gift voucher/Discount Coupon v5


Ian
 Share

Recommended Posts

How do I not apply shipping charges to purchases of gift vouchers?  

 

I'm using table based shipping that will add shipping charges according to the number of items in the cart. ($6.50 up to 8 items, 9-16 items - 9.50, etc...) If someone purchases a gift voucher, it currently counts as an item to be charged shipping. Only it's basically a download, therefore no shipping charge should be applied. Suggestions?

 

Thanks,

 

Chris Kelley

 

I am also wondering the same :(

 

Thank you, I will apply this now :)

 

 

 

credit_class_GV_DC_v5.03 already has that capability, just need to do some minor changes.

in catalog/checkout_shipping.php

replace this

// if the order contains only virtual products, forward the customer to the billing page as

// a shipping address is not needed

// ICW CREDIT CLASS GV AMENDE LINE BELOW

// if ($order->content_type == 'virtual') {

if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) {

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

$shipping = false;

$sendto = false;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

}

 

with

 

// if the order contains only virtual products, forward the customer to the billing page as

// a shipping address is not needed

// ICW CREDIT CLASS GV AMENDE LINE BELOW

$cart->get_content_type();

if (($cart->content_type == 'virtual') || ($cart->content_type == 'virtual_weight') ) {

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

$shipping = false;

$sendto = false;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

}

 

by doing this, it will skip the shipping and jump into payment information.

of course, your gift certificate product model must start with GIFT.

 

Thank you. Your support on this forum is tremendous. I'll insert this and give it a try. I guess I'll find out soon enough, but what if an order consists of both physical and virtual products? Will shipping charges still be applied to only the physical items in the cart?

 

Chris

Link to comment
Share on other sites

  • Replies 499
  • Created
  • Last Reply

Top Posters In This Topic

Hi Ian and others

i did install the contribution and foolowed the stpes , however there is nothing showing up in the admin->modules->order_total->

i,e there is no gift voucher that show up so i can setit to true .,

and ofcourse there is nothing showing up in the catalog too

i am using gift voucher the latest version it was actually my first time to try the contribution .,

pls help

Thanks

I.o

Link to comment
Share on other sites

Storeman,

 

you're very brave choosing the credit class as your first contribution to install.

 

If the gift voucher/discount coupon is not showing in admin then check that the files

 

ot_coupon.php & it_gv.php exist in includes/modules/order_total and includes/languages/english/modules/order_total (on catalog side)

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Ian, will this contrib work with 5/18 snapshot as far as you know? I am installing Linda's SEC, but need your contrib as well. Or should I stick with the 3/24 version?

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Loxly,

 

5.04 will work with the 5/18 or 18/5 as we say in England :)

 

I'm will probably branch the code (5.04xxx) for people to use on current cvs.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

I have installed cvs 5/18 and Linda's shoppe controller 5/18 version. Both are clean install.

 

Now I need the gift voucher contribution. Which version should I install? Will there be any conflict between this contribution and Linda's controller? If the same file is changed by both you and Linda, which one should I keep and which one be overwritten.

 

Please provide some detailed instruction on updating. I have spent hours to get the project working and I'm so afraid that I may break it again.

 

Thanks.

 

Wendy

Link to comment
Share on other sites

1. Make a complete backup of your store and install the files in a separate subdirectory.

 

2. Use Beyond Compare or another similar program to compare the files that have been changed by both contributions and insert the changes.

 

3. Make sure it works in the subdirectory before you move it to your main site.

 

Those are my tips for the day!

 

:)

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Hi Ian

 

it is very nice that you can be called vrave :D

actually what i ment is :this is my first time to install the credit / gift vocuher system "i.e i did not install any previous versions " buti did install a couple of other contributions , but any way as long as this let you call me brave i have no problem :D :wink:

 

ian , thanks for the advice it did work out :) and thanks again for such a wounderful contribution .,

i have two questions actually

1)how can you display two separate boxes one for gift voucher and the other for discount coupon "the idea i want to use the discount coupon wher the customer can enter his PST or GST canadian exempt tax number

2)in whcih file you can chnage the words that appear beside teh gift voucher discount coupon box ?

Thanks

I.O

Link to comment
Share on other sites

Thank you. Your support on this forum is tremendous. I'll insert this and give it a try. I guess I'll find out soon enough, but what if an order consists of both physical and virtual products? Will shipping charges still be applied to only the physical items in the cart?

Chris

 

Yes, as long as your physical items have weight and your virtual products have 0 weight.

 

btw, Ian, thanks for your gift voucher module, they work GREAT!

:D

shyang

Link to comment
Share on other sites

Storeman,,

 

I bowed to pressure from others when I created the combined redeem box. I now really regret it as it severely limits the credit class code.

 

Wait for 5.04, it returns the system to multiple redeem boxes. There will be precise instructions for upgrading from 5.03. Also the tax stuff is now sorted, and the display routines now conform to current cvs standards (in that there is no html in the modules thmeselves) all html is now in an includes modules file.

 

I hope to have everything finished tonight ready for release sometime tommorrow.

 

When it's done I'll also help as much as I can with the module for entering tax number, as I know this is something that lots of others want as well.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Oh don't give me none more of that Old Janx Spirit

No, don't you give me none more of that Old Janx Spirit For my head will fly,

my tongue will lie, my eyes will fry and I may die

Won't you pour me one more of that sinful Old Janx Spirit

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Melinda,

 

I'm confused, so confused that your PM has caused my left frontal lobe to retire to a holiday apartment in the Maldives.

 

Please explain, before the right frontal lobe gets ideas of it own as well.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Hi Ian

 

i am facing a challange when i try to redeem a gift voucher it give me the line saying congratulation you ahve redeemed , then teh amount of teh copon but when you go to checkout it does not show any thing there ?

and the amount of teh coupon is not redeemed from teh total ,

is there any thing i am missing ?

Thanks

 

I.O

Link to comment
Share on other sites

Thank you. Your support on this forum is tremendous. I'll insert this and give it a try. I guess I'll find out soon enough, but what if an order consists of both physical and virtual products? Will shipping charges still be applied to only the physical items in the cart?

Chris

 

Yes, as long as your physical items have weight and your virtual products have 0 weight.

 

btw, Ian, thanks for your gift voucher module, they work GREAT!

:D

 

welp, it's not working. I don't get errors, just that shipping fees are still applied to the GIFT$$ items. I set the weight for physical items, and weight of 0 for virtual items. Only I don't use weight to determine shipping fees, I use a table and determine shipping based on the number of items in the cart. Likely this is conflicting?

 

Chris

Link to comment
Share on other sites

Oh don't give me none more of that Old Janx Spirit

No, don't you give me none more of that Old Janx Spirit For my head will fly,  

my tongue will lie, my eyes will fry and I may die

Won't you pour me one more of that sinful Old Janx Spirit

 

Nice. Few people get it. I should have expected it from this group, though. :D

Link to comment
Share on other sites

Chris,

 

I know this is off topic, but Douglas Adams is a real hero of mine (Despite his penchant for Mac computers - yikes flame wars.)

 

From the TV version my favourite funny quote, Arthur Dent meeting slartyfartbast for the first time.

 

Arthur looked down at Marvin, who now made an equally big show of turning round laboriously and trudging off down into the crater again muttering sour nothings to himself.

 

``Come,'' called the old man, ``come now or you will be late.''

 

``Late?'' said Arthur. ``What for?''

 

``What is your name, human?''

 

``Dent. Arthur Dent,'' said Arthur.

 

``Late, as in the late Dentarthurdent,'' said the old man, sternly. ``It's a sort of threat you see.'' Another wistful look came into his tired old eyes. ``I've never been very good at them myself, but I'm told they can be very effective.''

 

Arthur blinked at him.

 

``What an extraordinary person,'' he muttered to himself.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Chris,

 

To get back to the real world, and yoyr shipping problems.

 

In checkout_shipping.php look for this line

 

  $total_count = $cart->count_contents();

 

It's line 64 in my version.

 

Try changing it to

 

  $total_count = $cart->count_contents_virtual();

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Hi Ian

i am not sure why this is happining but the coupon code is working fine when you are readiming and it deduct the amount at the final step .,

however the gift voucher say it has been redeemed but there is nothing deducted ,

pls help

 

thanks

I.O

Link to comment
Share on other sites

Chris,

 

To get back to the real world, and yoyr shipping problems.

 

In checkout_shipping.php look for this line

 

  $total_count = $cart->count_contents();

 

It's line 64 in my version.  

 

Try changing it to  

 

  $total_count = $cart->count_contents_virtual();

 

Ian,

 

That didn't do the trick. :? Also tried switching to Flat Rate Shipping, thinking that my table based shipping mod was conflicting somehow, but no. Anything else I might try?

 

Thanks,

Chris

Link to comment
Share on other sites

Hello,

 

I have the same shipping problem. I changed the code as mentioned

 

$total_count = $cart->count_contents_virtual();

 

When I give the vouchers no weight at all, no shipping method shows up. That's okay so far. But then no tax is calculated. The price is the 4.31 Euro instead of 5 Euro. It should be 5 Euro including 16% German Tax. It shows the price without tax.

 

When I give my vouchers a weight (0.01 for example), tax is calculated the way it should be, 5 Euro including tax (0.69 Euo) but the you can select a shipping method.

 

Does anybody have this problem too?

 

Devon

Link to comment
Share on other sites

Hi Devon,

denke Du kannst Deutsch;-)

 

Ja, das Problem ist bekannt, es gibt auch noch jede Menge weitere Bugs.

Ian wollte bis Heute ein update einstellen. Evtl. wird es auch erst sp?ter????

 

G??e

Mike

 

Hello,

 

I have the same shipping problem. I changed the code as mentioned

 

$total_count = $cart->count_contents_virtual();  

 

When I give the vouchers no weight at all, no shipping method shows up. That's okay so far. But then no tax is calculated. The price is the 4.31 Euro instead of 5 Euro. It should be 5 Euro including 16% German Tax. It shows the price without tax.

 

When I give my vouchers a weight (0.01 for example), tax is calculated the way it should be, 5 Euro including tax (0.69 Euo) but the you can select a shipping method.

 

Does anybody have this problem too?

 

Devon

Link to comment
Share on other sites

Thanks Mike,

 

then I will wait for the 5.04. Except the shipping problem and no queue is working everything is okay with the gift voucher.

 

Devon

 

Tja, englisches Forum Mike, was will man machen. :)

Link to comment
Share on other sites

Ian,

Have a new one for ya. I have a very strange problem with 5.02. The coupon percent off is not being recognized (I.E. I insert a coupon for 15% off and it turns out to be $15 off).

 

Gift Vouchers work great. HELP! Already lost $9 from this error and have had to disable my coupons. ARGH!

 

Should I just install 5.03 or wait for 5.04?

 

Regards,

David.

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.

 Share

×
×
  • Create New...