Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted (edited)

I was beginning to wonder if it was a problem with Register Globals set to 'off' because the script wasn't written to deal with that (the original script is quite a few years old). Register Globals 'on' should not be a problem for CCGV(trad).

 

What version of php are you using (4 or 5)?

 

Vger

I just installed a fresh oscommerce store and added CCGV trad and the same issues occurred - however I did note from the admin/server info that regsiter globals are set to : ON but this has never ever affected any functions of my demo sites in the past. Customers can create accounts, receive auto emails, etc etc... barring the issue I mentioned above that has appeared since installing CCGV trad, everything works.

 

Can anyone please tell me how important is the register globals ON/OFF issue actually is? If it is a matter of high significance then I'll ask the host to turn it off but is there any other way that it can be substitued by osC coding?

 

Looking forward to see if Fredrik says his register globals are ON or OFF - that'll clarify it slightly for me

Edited by Vger
Posted (edited)

I think that a lot (if not all) of these problems are down to misunderstanding the way in which the system works - for instance:

 

so much so that my actual order total before checkout was not calculating correctly! The % wasn't calculating correctly until I de-selected the free shipping and removed the categories/products limitations.

 

That is actually the way that it works. If you enable Free Shipping it overrides and replaces any amount you set (percentage or otherwise), merely abiding to the minimum order amount. See below, quoted from the Coupon Admin page.

 

The coupon gives free shipping on an order. Note. This overrides the coupon_amount figure but respects the minimum order value

 

So, you can either have Free Shipping on an item (product list or category list or all), or you can give a set discount (percentage or flat rate), but not both.

 

If a percentage sign is applied to a coupon then this does not show in the database, but does calculate correctly. It does not show when you return to edit the coupon, but is still in effect. However, when you apply an edit you do need to re-enter the percentage sign if you wish it to remain a percentage coupon, otherwise it will become a flat rate coupon.

 

With regard to Uses Per Coupon and Uses Per Customer the way it works is:

 

a. Uses Per Coupon - if you leave blank it will default to zero (unlimited use), and will show up as zero next time you go to edit.

b. Uses Per Customer will show a default of 1 on the edit/setup page (only one use for each customer), otherwise it will show whatever limit you set from 1 upwards. If you set it to zero it will show up as zero in the database, but show as a default of 1 if you go back to edit that coupon (it will still show as zero in the database, unless or until you apply the edit).

 

This last is hardcoded into admin/coupon_admin.php on lines 609-610:

// set some defaults
if (!$coupon_uses_user) $coupon_uses_user=1;

 

I am testing this again, but so far it is testing correctly.

 

Vger

Edited by Vger
Posted (edited)
I was beginning to wonder if it was a problem with Register Globals set to 'off' because the script wasn't written to deal with that (the original script is quite a few years old). Register Globals 'on' should not be a problem for CCGV(trad).

 

What version of php are you using (4 or 5)?

 

Vger

 

I am using version 4.0.25-standard but that won't be aprt of the problem or solution....

 

ONE - Here's my checkout page with a 10% coupon on orders over 5 and 1 product valid (item 37) thats in the cart:

 

Sub-Total: ?11.95

Table Rate (Best Way): ?8.50

Discount Coupons:e9d441: -?0.85

Total: ?19.60

 

 

TWO - Here's exactly the same but with free shipping enabled:

 

Sub-Total: ?11.95

Table Rate (Best Way): ?8.50

Discount Coupons:e9d441: -?18.50

Total: ?1.95

 

 

THREE - Here's another one thats idential to above but the products list (item 37) taken out:

 

Sub-Total: ?11.95

Table Rate (Best Way): ?8.50

Discount Coupons:e9d441: -?18.50

Total: ?1.95

 

 

FOUR - And the last one is exactly the same but with the free shipping disabled and product 37 taken out :

 

Sub-Total: ?11.95

Table Rate (Best Way): ?8.50

Discount Coupons:e9d441: -?2.05

Total: ?18.40

 

Number Four is the only one showing up correctly and thats only when product lists are not selected and free shipping not selected.

 

One other thing.. even though the 'preview page' showed up % or ? correctly, in coupon admin (like stated earlier) it does show incorrectly if free shipping is added or prods/cats added.

 

Something is not right. Fredrik and I have both the same issues.

 

I've also just created a 7% discount to orders with product 7 in a fresh install osC and CCGV trad (nothing but those two).

 

This is with free shipping selected:

 

Sub-Total: $34.99

Flat Rate (Best Way): $5.00

Discount Coupons:3c6a78: -$5.00 (should be 2.45@7% so 5+2.45)

Total: $34.99

 

As soon I de-select the free shipping, this happens:

 

Sub-Total: $34.99

Flat Rate (Best Way): $5.00

Discount Coupons:3c6a78: -$2.80 (correct)

Total: $37.19

 

the above correct result also happens when I have no shipping and no valid cats/prods

 

It seems that the error only occurs when shipping is enabled, whether valid cats/prods are selected or not.

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted (edited)

(sorry for the back to back posts but I lost the edit function!)

 

Vger you're spot on, I read your last post after posting my mammoth post - sorry.

 

I have tested it with free shipping alone (not alongside coupon codes) and it is like you said basically one or the other.... is there a way to incorporate both for some future release?

 

It's amazing that I had CCGV installed all that time but didn't realise it was one or the other!

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted
This is with free shipping selected:

 

Sub-Total: $34.99

Flat Rate (Best Way): $5.00

Discount Coupons:3c6a78: -$5.00 (should be 2.45@7% so 5+2.45)

Total: $34.99

 

Yes, that's absolutely correct. Enabling Free Shipping does not mean that you get Free Shipping on the item plus the discount. If Free Shipping is ticked then you get Free Shipping only. The Minimum Amount is kept to, but Free Shipping takes the place of any Coupon Amount (whether percentage or flat rate). It's all there in the text on the Coupon Admin page next to the Free Shipping tick box.

 

Vger

Posted (edited)

Our posts are crossing. There are other ways of getting Free Shipping plus keeping the coupons. Simply enable Downloads (making sure all physical products have a weight given to them), and then, if you wish to promote a particular product, change it so that it has zero weight. Shipping won't then be applied.

 

When I posted this contribution the main purposes were two-fold:

1. To give people a simple working module

2. To provide a support thread for it - because the support thread for the other versions had vanished (now back again).

 

It wasn't really intended to be a development version. I don't mind incorporating minor modifications, and I did add some features of my own to it to make it work better 'out of the box', but I don't want to get involved in it as a major development project.

 

Vger

Edited by Vger
Posted

Yes I will, but clarify one thing for me first please. Go to osCommerce admin --> Tools --> Server Info and look for Register Globals. If it says they are Off, then Search for all files called php.ini. There may be more than one (but usually it's the one in C:/Windows), and edit it to Register Globals On, stop and restart the server and then see if you still have the problem.

 

This is based on an old contribution and it wasn't built to work with Register Globals set to Off in php.ini

 

Vger

 

Vger

Posted

Hey, thanks Rhea for this clean CCGV contrib. I installed without a hitch, thanks for the detailed instructions.

 

Here are a few things that I noticed and may be revised for the next version of CCGV trad:

 

1) I noticed that the ccgv.gif image file was not included in the package (its needed for the account page), but was easy to find on google though.

 

2) In admin section, "Coupon Admin" is showing up as its php equivilent and had to define it in the language file.

 

Everything looks good so far.

Posted (edited)
Our posts are crossing. There are other ways of getting Free Shipping plus keeping the coupons. Simply enable Downloads (making sure all physical products have a weight given to them), and then, if you wish to promote a particular product, change it so that it has zero weight. Shipping won't then be applied.

Thanks for the reply. I got it :-)

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted

Thank you for this improved contribution... I always thought I installed the original wrong - as it turns out everyone had the same problems. Thanks again.

 

Anyway - everything worked for me except I created a javascript error and it seems no one else had the same problem. Can anyone tell me what might be conflicting or causing this error? I can post a list of the modifications - all contributions and less than 10.

 

Error code pasted below:

Warning: Missing argument 1 for javascript_validation() in /home/yourid/public_html/ims-osc/includes/classes/payment.php on line 108

Posted

They should have been resolved on the last update, but I guess not. I have now removed the call to the image (not needed) and updated the admin/includes/boxes/gv_admin.php file with the correct link - which is actually already there in admin/includes/add_ccgvdc_english.php

 

Vger

Hey, thanks Rhea for this clean CCGV contrib. I installed without a hitch, thanks for the detailed instructions.

 

Here are a few things that I noticed and may be revised for the next version of CCGV trad:

 

1) I noticed that the ccgv.gif image file was not included in the package (its needed for the account page), but was easy to find on google though.

 

2) In admin section, "Coupon Admin" is showing up as its php equivilent and had to define it in the language file.

 

Everything looks good so far.

Posted

Those lines should read like this:

 

$js .= "\n" . '  if (payment_value == null && submitter != 1) {' . "\n" . // This line edited for CCGV
		   '	error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" .
		   '	error = 1;' . "\n" .
		   '  }' . "\n\n" .
		   '  if (error == 1 && submitter != 1) {' . "\n" . // This line edited for CCGV

 

Vger

Thank you for this improved contribution... I always thought I installed the original wrong - as it turns out everyone had the same problems. Thanks again.

 

Anyway - everything worked for me except I created a javascript error and it seems no one else had the same problem. Can anyone tell me what might be conflicting or causing this error? I can post a list of the modifications - all contributions and less than 10.

 

Error code pasted below:

Warning: Missing argument 1 for javascript_validation() in /home/yourid/public_html/ims-osc/includes/classes/payment.php on line 108

Posted

Hi, Have you got the following JS code on lines 95-100 of checkout_payment.php?

 

<?php /* following jscript function ICW ADDED FOR CCGV */ ?>
var submitter = null;
function submitFunction() {
  submitter = 1;
  }
<?php /* END OF ICW ADDED FOR CCGV */ ?>

 

Vger

Rhea, I have run it with register_globals set to both on and off, the same thing happens both times.

 

Ian

Posted

Is zero in "uses per coupon" and "uses per customer" always the same as unlimited uses then?

 

With regard to Uses Per Coupon and Uses Per Customer the way it works is:

 

a. Uses Per Coupon - if you leave blank it will default to zero (unlimited use), and will show up as zero next time you go to edit.

b. Uses Per Customer will show a default of 1 on the edit/setup page (only one use for each customer), otherwise it will show whatever limit you set from 1 upwards. If you set it to zero it will show up as zero in the database, but show as a default of 1 if you go back to edit that coupon (it will still show as zero in the database, unless or until you apply the edit).

Posted

I wanted someone to confirm this, did I do something wrong during installation or is "valid categories" a real issue;

 

It gets wrong when a product is assigned to several categories. For example; I choosed category "Our favourites" as valid. The product I was added to cart and tried to redeem is in category "Our favourites" but it's "main category" is "skin care". It was added to "skin care" and then copied/linked to "Our Favourites" (not duplicated). When I choosed "Skin Care" as valid in coupon admin it worked... This is an issue I do not know how to solve. Also, there are no error messages like "The code you are trying to redeem are not valid for the products in your cart" (or something like that)

Posted (edited)
I am continuing to develop this, and there is still a problem with redeeming a gift voucher when it is sent to the customer from within 'admin'.

 

I will also look at incorporating a 'Confirm Deletion' button on the GV Queue page.

 

Vger

 

Hello Again Vger!

 

I have an osCommerce template I purchased and have had some issues with trying to use some contributions that are based soley on the original MS2 layout. With my limited php understanding, (by the way per your previous recommendation to me, I've purchased books on php and mysql so thanks) I wanted to know if it is okay to use this contribution on a templated oscommerce store? Are there any special configurations I need to pay special attention to?

 

 

Thanks again,

Selma ;)

Edited by selmaboyd
Posted (edited)

Paragraph B, which you have quoted, gives you the answer to that question.

 

Vger

Is zero in "uses per coupon" and "uses per customer" always the same as unlimited uses then?
Edited by Vger
Posted

I can't guarantee it, but provided that the template is not based on the Basic Template System (few commercial templates are based on BTS) then it should be alright.

 

Vger

Hello Again Vger!

 

I have an osCommerce template I purchased and have had some issues with trying to use some contributions that are based soley on the original MS2 layout. With my limited php understanding, (by the way per your previous recommendation to me, I've purchased books on php and mysql so thanks) I wanted to know if it is okay to use this contribution on a templated oscommerce store? Are there any special configurations I need to pay special attention to?

Thanks again,

Selma ;)

Posted

Valid Categories is not an issue. If you wish to use this feature then the product must exist in both Categories and not just aliased from one to the other.

 

Vger

I wanted someone to confirm this, did I do something wrong during installation or is "valid categories" a real issue;

 

It gets wrong when a product is assigned to several categories. For example; I choosed category "Our favourites" as valid. The product I was added to cart and tried to redeem is in category "Our favourites" but it's "main category" is "skin care". It was added to "skin care" and then copied/linked to "Our Favourites" (not duplicated). When I choosed "Skin Care" as valid in coupon admin it worked... This is an issue I do not know how to solve. Also, there are no error messages like "The code you are trying to redeem are not valid for the products in your cart" (or something like that)

Posted

Great contribution. Switched to this one from CCGV 5.16 because I was having issues and now everything except for one little tax issue works great.

 

On the CCGV contribution, there is a 'CCGV Tax System Fix V1.1', whereby the tax is recalculated properly. It would be great to see the same sort of fix incorporated here, in the ot_coupon.php file.

 

I dont know if this is a difficult task for you Vger?

 

All the best, Luke

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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