Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

hi again. i am selling tickets on behalf of small theatres. most theatres have a student/military/etc. discount. i will deal with these in attributes. now then, i need to limit coupon usage to "General Admission" attributed products only. you cannot combine discounts.

 

another great mod would be to set the number of products ordered against the coupon. my theatres could sell "Frequent Flyer" passes taht would allow a 25% discount that could be used for 10 seats.

 

TIA.

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Hey, I hit a snag when running a test transaction with my gift certs. Here's the situation ... when adding a cert to my shopping cart, I get several errors (listed below) but it appears that the cert still gets placed in my shopping cart. All of these errors appear on the shopping_cart.php page at the time I add the cert into the cart.

 

Warning: Variable passed to each() is not an array or object in ... /www/catalog/shopping_cart.php on line 65

 

Warning: reset(): Passed variable is not an array or object in ... /www/catalog/includes/modules/order_details.php on line 83

 

Warning: Variable passed to each() is not an array or object in ... /www/catalog/includes/modules/order_details.php on line 84

$25.00

Warning: reset(): Passed variable is not an array or object in ... /www/catalog/includes/modules/order_details.php on line 105

 

Warning: Variable passed to each() is not an array or object in ... /www/catalog/includes/modules/order_details.php on line 106

 

Other than these errors when adding the gift cert to the cart, it looks like I have no problems running the transaction.

 

I do have one other question ... how do you keep shipping from being added to gift cert transactions if I am using the flat rate module?

 

Any ideas? Thanks in advance!

Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Link to comment
Share on other sites

does it happen when you add regular products to it also? what about if you have something else in your cart before you put the gv in the cart? what versions of everything are you running.

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

Link to comment
Share on other sites

Yes, as you suspected, it is happening when I add other products to the cart. In fact, the errors repeat no matter what item I add to the cart, even if there are other items already in it. I didn't have these errors prior to the install of the mod.

 

I am using a post ms2 snapshot, but not quite 2.2.2.

Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Link to comment
Share on other sites

well hmmm .... I haven't kept up with the changes in the dev for a while now... what changes were made in the cvs that you have compared to ms2?

which version of gv_dc are you using?

the errors you gave don't actually match the errors that would be at those line numbers so we need a little bit more information.

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

Link to comment
Share on other sites

I am using the 5.04 version of GV. I made the necessary fixes that have been posted on the contribution page (bumping up to 5.05). I don't know the exact date of the snapshot I used, but it was after the 5/19/03 changes that made the 5.03 GV obsolete and before the mid-july time table given on the contribution page for the 5.04 release.

 

http://www.oscommerce.com/community/contributions,282

 

What specific information do you need from me that will help fix this?

 

I'll be happy to e-mail you files or do whatever it takes to get it resolved.

 

Thanks again!

Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Link to comment
Share on other sites

well let's see .... for one I don't have the file

 

/www/catalog/includes/modules/order_details.php

and that is why I wanted to know a little bit more .. you said you were using post ms2 yet I don't know .. did they deprecate then reprocate(are these even words) the file /www/catalog/includes/modules/order_details.php

I wouldn't think so.

In the order details I do have from ms1 lines 105-106 are

}

} else {

and this doesn't add up to Variable passed to each() is not an array or object

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

Link to comment
Share on other sites

Okay, let me try to be more specific ...

 

/includes/modules/order_details.php is as follows:

 

80 $attributes_exist = ((isset($products[$i]['attributes'])) ? 1 : 0);

81

82 if ($attributes_exist == 1) {

83 reset($products[$i]['attributes']);

84 while (list($option, $value) = each($products[$i]['attributes'])) {

85 echo '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';

86 }

87 }

 

and also in the same file:

 

104 if ($attributes_exist == 1) {

105 reset($products[$i]['attributes']);

106 while (list($option, $value) = each($products[$i]['attributes'])) {

107 if ($products[$i][$option]['options_values_price'] != 0) {

108 if (!strstr($PHP_SELF, FILENAME_ACCOUNT_HISTORY_INFO)) {

 

catalog/shopping_cart.php is as follows:

 

64 if (isset($products[$i]['attributes'])) {

65 while (list($option, $value) = each($products[$i]['attributes'])) {

66 echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);

 

The common thread is the attributes. I hope that this information is helpful.

Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Link to comment
Share on other sites

By the way, I am using the snapshot dated 20030605 or June 6,2003. This should fall beyond the MS2 Release but not quite up to the 2.2 release dated 7/12.

 

Again, I hope that this will help you see what might be the problem and what needs to be done to fix it.

Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Link to comment
Share on other sites

Hi,

 

Contribution was installed about 3 weeks ago into the latest snapshot at that time and worked perfectly (not bothered with gv's, only using the discount coupon codes).

 

Noticed today that dcc's no longer work. The box is there - it refuses invalid codes, but if a correct code is entered it just moves onto the checkout_confirmation page with no mention of any discounts.

 

On checking code history report in admin, I can see that the last code was succesfully redeemed on the 28th August (the site is still in development).

 

The sort order etc is 100% correct.

 

OK, so what's happened since the 28th?

The site is being rapidly developed, so there are daily changes being made, but the important ones as I see them are ....

 

1) Around 28th, all shipping, payment modules etc were "lost" - they just vanished. This was fixed by reinstalling the site and moving it to a new hosted server (as I was about to do anyway).

 

2) The lev_discount module (gives 10% off orders over a certain amount, 20% off a higher amount etc) was installed since then. Can't see how it could interfere with dcc unless the sort order was wrong (which it's not).

I've uninstalled this module (as well as the gv and dcc ones) to see if that helps - it doesn't :?

 

I've read through all 19 pages of this thread several times, compared all relevant files to ones from earlier backups and I'm at a complete loss as to what's going on ... I don't know where to look next!

 

Any ideas anyone?

 

Cheers,

 

Ali.

Link to comment
Share on other sites

Wwhat verion of php are you running and what is your os.

Why do you keep saying that the sort order is correct? I have found what I thought was correct wasn't and what shouldn't have worked did. But that is just me.

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

Link to comment
Share on other sites

Thanks for replying so quickly Strider :)

 

It's on a shared hosting package so I don't have any say in what's used PHP wise, but it says in admin that it's :

 

PHP Version: 4.0.6 (Zend: 1.0.6)

Linux 2.4.19C9_V

MySQL 3.23.56-Max

 

You may well be right about the sort order, it's just that the order hasn't changed since it was working properly (with the exception of the lev_discount module which has since been uninstalled)

 

Discount Coupons 3

Gift Wrap 2

Gift Vouchers (currently not used but I've tried it as 740)

Low Order Fee (not used)

Shipping 4

Sub-Total 1

Tax 5

Total 6 (also tried 99)

 

The combination of Giftwrap/Coupons has also previously worked properly using these settings.

 

Does this help?

 

Ali :)

Link to comment
Share on other sites

I think it is the php

for some reason it needs to be above the 4.22 or close there of... I am thinking because of the sessions and the way they are handled, but I am not for sure. I have just seen so far that old versions of php don't seem to play very well.

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

Link to comment
Share on other sites

I've installed the contribution successfully. Works like a treat! Thanks to all who contributed!!!

 

I'm just wondering. I would like to change it so that the gift voucher actually apply towards the shipping cost as well.

 

How would I make it do this?

 

Thanks for any advice,

 

Thomas

Link to comment
Share on other sites

well you can just put them here if you would .. I can't see them .. what is your php version it needs to be like 4.2.2 or above try the page with netscape and see if you see the button .. if you can then I think it is your php version

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

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