Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] CCGV (trad)


Vger

Recommended Posts

Make sure that in osCommerce Admin under Modules --> Order Total that both Discount Coupons and Gift Vouchers are actually installed. Without this you won't see any Redeem box on the checkout_payment.php page.

 

Vger

Ok, I installed the contrib. a while ago, and was getting an error message after entering the code and cliking continue. Vger recommended that I remove it and reload it, and so I took it all off of my site. I then reloaded it onto my site, and now everything on the Admin side is working beautifully, but there is no box to enter the code into in the checkout process.

 

If I remember right, it was on the checkout_payment.php page, just before the customer comments? There is some code there that I added as per the install instructions:

 

"<?php

echo $order_total_modules->credit_selection(); // CCGV

?>"

 

but when I look at the source code, nothing shows up there where that should be. I have the code loaded onto that page that the string refers to:

 

" require(DIR_WS_CLASSES . 'order.php');

$order = new order;

require(DIR_WS_CLASSES . 'order_total.php');// CCGV

$order_total_modules = new order_total;// CCGV

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

 

$total_weight = $cart->show_weight();

$total_count = $cart->count_contents();

$total_count = $cart->count_contents_virtual(); // CCGV"

 

Am I missing something obvious?

Link to comment
Share on other sites

Having looked at your site and seen just how heavily modified it is I can't even begin to guess where the problem may be.

 

Vger

Okay, I completely re-uploaded CCGV(trad), I edited the files that needed to be edited.

 

I am now getting the redeem coupon button now, and all the things needed in the admin area.

I tested the emial coupon number with the product that it applies to. It does not reduce

the product price by the amount of the coupon.

 

I do not even see it being applied in the checkout_confirmation.php form.

Link to comment
Share on other sites

...when I load in the CCGV trad file I get the option of paypal of visa, but it is still a zero-dollar charge -- ick... gotta keep following that line and see where I end up -- LOL

 

Thanks! Will let you know what I figure, looking forward to resolving this!!

 

Lori

 

Well, I re-edited and re-uploaded every file, same thing... <_<

so I have had to restore backups. :-" I love the idea of this mod and will try again :thumbsup: -- LOL

 

Lori

Link to comment
Share on other sites

Hey Everyone,

 

Installed the CCGV (trad) a while back and it works great, however since I am in Canada, I have also downloaded the Canadian Tax Contrib. Just notice that if I create a coupon for 100% off with free shipping and no tax, the coupon discounts everything but the tax. I tried to install the German Tax fix, but that didn't work. Any suggestions?

 

THX

Link to comment
Share on other sites

You can set whether to include Tax or not, the Tax Zone etc. within Modules --> Order Totals --> Discount Coupons.

 

Vger

Hey Everyone,

 

Installed the CCGV (trad) a while back and it works great, however since I am in Canada, I have also downloaded the Canadian Tax Contrib. Just notice that if I create a coupon for 100% off with free shipping and no tax, the coupon discounts everything but the tax. I tried to install the German Tax fix, but that didn't work. Any suggestions?

 

THX

Edited by Vger
Link to comment
Share on other sites

Hello again,

 

I am back with my problem, which after after much drilling down I have almost worked out ...

In checkout shipping there is this line to change:

 

  if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) { // Edited for CCGV

instead of

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

 

If I live that change off, then it is working .... Tax is being displayed and calculated correctly...

 

This hinted me into looking into the weight of the products, that are all at 0 (!!). It is software the shop is selling and all have been set at 0, some will stay that way because they will be downloadable, others will have a weight.

 

Now putting back the code in checkout_shipping as it should be (with CCGV Mod), I tested again.

 

If I check out with only products that have a weight ... all is ok

If I check out with mixed products (weight and not weight)... all is ok

However if i check out with only products with no weight, checkout_shipping is skipped (redirected to checkout_payment), then on confirmation, the tax is not displayed anymore !!

 

Now is this normal behaviour for downloadable products ?? Why should tax skipped for this type of products ?

Did I just discover a bug or is it a simple configuration problem ?

Any insight would be appreciated since this is very easily reproduceable

Link to comment
Share on other sites

Try reordering tax in the list under Order Totals. Make sure especially that it comes before Total.

 

Your other problems were simply caused by not bothering to read the Install instructions. All of the information about other products having to have a weight attached to them is all in there. I even explain how to quickly update (via MySQL) a large list of products that have no weight.

 

Please try reading the Install instructions - all of them.

 

Vger

Link to comment
Share on other sites

Geeee, maybe you should also read my explanations and realise that the problem is not as simple as it looks !!

 

I have read the instructions, I also have NO PROBLEM with the calculation or re-calculation of the tax...

The problem that GV introduced is that REAL downloadable products with 0 weight are then treated as non taxable products.

Debugging the process and forcing the tax group to display for this products then return as "VAT GRoup Not Found". before making change in the shopping_cart class htis was working ok.

 

And yeah the manual say:

BE AWARE! Once Enable Downloads is set to True all of your non-virtual products MUST have a weight attached to them in osCommerce Admin --> Catalog

 

I do not see in any way this saying that after this REAL virtual products wont be taxed anymore ....

Link to comment
Share on other sites

There has been a debate about the use of 'virtual' or 'virtual_weight', but if 'virtual' works for you then use it. Can you confirm that the use of 'virtual' resolves all of your problems, because if it doesn't then I will take a look at it.

 

Vger

Link to comment
Share on other sites

I will download and take a look at the Canadian Tax Contribution - just to find out what it's all about, and why it's even necessary. osCommerce should be able to handle a new tax zone without having to install any contribution for it. There are three of them, so can you confirm which one you are using?

 

Vger

Hey Everyone,

 

Installed the CCGV (trad) a while back and it works great, however since I am in Canada, I have also downloaded the Canadian Tax Contrib. Just notice that if I create a coupon for 100% off with free shipping and no tax, the coupon discounts everything but the tax. I tried to install the German Tax fix, but that didn't work. Any suggestions?

 

THX

Edited by Vger
Link to comment
Share on other sites

Hey Vger,

 

It is the Canadian Tax Display contrib.. Here is the link http://www.oscommerce.com/community/contri...ch,canadian+tax

 

The reason I need it is because if a customer is from ontario (my provice), I need to charge them GST & PST, if they are not in my provice BUT in Canada, I need to charge them just GST, if they are from another country I need to not charge them any tax.

 

thx

Link to comment
Share on other sites

Indeed, by not using the virtual_weight condition and only the virtual (ie by not making the change on this line in checkout_shipping) ..then when getting to checkout_confirmation, tax is displayed as it should.

 

However doing so then shipping is added even if you only try to buy downloadable product or a gift ..therefore this is still not a good correction.

There seems to be some problems in the logic behind the checking of the virtual_weight to see if shipping is required or not ..this skip or delete some vital information to do with the tax class of the product but I have not found the culprit yet.

 

Let me know if you have any luck ..to reproduce this simply add a virtuial product with weight 0 associated to a tax class and try to buy it. Actually having a gift voucher with a tax class produce the same problem (ie, u set up a GV with a tax at 19.6% and a price of 41.8060, with the current code only that sum is asked, not 50.)

Link to comment
Share on other sites

Okay, I can identify the problem for you - but it will be up to you to sort it out, because it's not the fault of CCGV(trad). The contribution you have installed modifies order_total.php to use order_total_gst_value, but CCGV references order_total.

 

Vger

Hey Vger,

 

It is the Canadian Tax Display contrib.. Here is the link http://www.oscommerce.com/community/contri...ch,canadian+tax

 

The reason I need it is because if a customer is from ontario (my provice), I need to charge them GST & PST, if they are not in my provice BUT in Canada, I need to charge them just GST, if they are from another country I need to not charge them any tax.

 

thx

Link to comment
Share on other sites

Hi! REALLY GREAT CONTRIBUTION!

 

I installed this a few weeks ago on my heavily modified site so I did everything by hand. I uploaded all the changed pages, and ran the SQL file. Unfortunately, my first attempt was BUST!!

 

So, I restored my old database from the OsCommerce admin, and CAREFULLY went through and made the changes again, and lo and behold, It WORKS! But I didn't re-run the SQL file....

 

Yet when I looked at my database, it seems as though the tables that were created from the first SQL run are still there... I'm not really very experienced with databases yet, so I guess those tables remain unless I manually delete them.. :huh:

 

Here's my question... Although I haven't done extensive testing, everything seems to be working except for the

option in admin to set the automatic emails that get sent when a customer creates an account, etc.

 

Can I run the entire SQL file again with no ill effects or will it double the tables that are already there? Do I need to just run the section of the SQL file that deals with that email function and what part of the file would that be?

 

I thank you so much for your time to answer my question! :thumbsup:

Link to comment
Share on other sites

If you run the sql file again then all items in the 'configuration' table will get added a second time.

 

Under 'My Store' in your osCommerce admin panel you need to enter your email address three times, twice near the top and then once again under 'Send Extra Order Emails To'. Your email settings must be correctly set up either for SMTP or Sendmail under your email settings.

 

Your email address must be based on your domain e.g. [email protected] and not [email protected]

 

Vger

Link to comment
Share on other sites

Thanks for the reply, Vger! I realize I should have done a better job explaining myself in my earlier post. I apologize... My brain was overextended!

 

My built-in store email functions are all configured and do work properly. My problem is with the coupon/voucher automatic emails... When I tried my first go round with the install, I noticed in admin, under configuration, an option to set up a welcome gift voucher amount (you also reference this in your install instructions). But now that isn't there.

 

I must have forgotten SOMETHING but what? Everything else seems to be in order...

 

As for databases, are you saying that even though I restored my database to a "pre-gift voucher installation" time, I do not need to re-run the SQL file? All of that information remains in the database even after a restore to an earlier time?

 

The more I learn, the more I realize I don't know.... I thank you again for your time and patience!

 

:thumbsup:

Link to comment
Share on other sites

Even if you restored your database to a pre-Gift Voucher state all you need to do is to go to your admin panel --> go to Modules --> Order Total and check to see if Gift Vouchers and Discount Coupons are installed. If you just see a green Install button then click on it and it will add the correct tables to the database.

 

If you wish to offer a discount upon Sign Up then you must first set up a discount coupon and then add the number of that coupon when you set up the Welcome Coupon.

 

Vger

Link to comment
Share on other sites

Even if you restored your database to a pre-Gift Voucher state all you need to do is to go to your admin panel --> go to Modules --> Order Total and check to see if Gift Vouchers and Discount Coupons are installed. If you just see a green Install button then click on it and it will add the correct tables to the database.

 

If you wish to offer a discount upon Sign Up then you must first set up a discount coupon and then add the number of that coupon when you set up the Welcome Coupon.

 

Vger

 

Ok, now I'm thinking I'm just looney! Gift Vouchers and Discount Coupons are installed and a coupon is available. I can send it via email manually and it works great. But I don't see anything ANYWHERE about a "Welcome Voucher"- to enable it or set an amount, etc.!

 

This is what I see in my admin panel under configuration. Am I crazy or is there supposed to be a heading for the "Welcome Voucher" at the bottom ? I'm almost positive I saw it the first time...

 

Configuration

My Store

Minimum Values

Maximum Values

Images

Customer Details

Shipping/Packaging

Product Listing

Stock

Logging

Cache

E-Mail Options

Download

GZip Compression

Sessions

 

Here's what I see under Certificates/ Coupons

 

Certificates/Coupons

Coupon Admin

Gift Certificate Queue

Mail Gift Certificate

Gift Certificates Sent

 

I know I must have missed something... I'll go through it all again and check it out. Thanks! :thumbsup:

Link to comment
Share on other sites

PROBLEM SOLVED!

 

I ran this section of the SQL file again:

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Welcome Gift Voucher Amount', 'NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0', 'Welcome Gift Voucher Amount: If you do not wish to send a Gift Voucher in your create account email put 0 for no amount else if you do place the amount here i.e. 10.00 or 50.00 no currency signs', 1, 31, NULL, '2003-12-05 05:01:41', NULL, NULL);

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Welcome Discount Coupon Code', 'NEW_SIGNUP_DISCOUNT_COUPON', '', 'Welcome Discount Coupon Code: if you do not want to send a coupon in your create account email leave blank else place the coupon code you wish to use', 1, 32, NULL, '2003-12-05 05:01:41', NULL, NULL);

 

 

and THERE IT IS! In admin, under MY Store I see:

 

Welcome Gift Voucher Amount 0

Welcome Discount Coupon Code

 

So clearly, for whatever reason, these values were deleted when I restored my database to the "pre-CCGV" state, even thought the tables created remained.... I wonder what other values may need to be re-run in this situation? I'll be sure and let you know if I find any others.

 

Thanks, again Vger! :thumbsup:

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