Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Discount Coupon Codes


kgt

Recommended Posts

Any chance that someone who speaks German could do an updated language pack for this contrib? The German pack up on the contrib page is many versions old, and missing a number of definitions.

 

Thanks in advance, anyone who takes this on! :-)

Link to comment
Share on other sites

I am on a tight deadline and need to install this but am not sure how to install it and get it working ASAP.

 

Looking at the contribution download page there is V3.31 and LOTS of later patches. There are 54 pages in this thread and I do not have time to read ??? pages to work out what is/isn't needed. Do I install V3.31 + all subsequent?

 

Is it time for a re-release with all the required patches?

 

Cheers. Paul.

Link to comment
Share on other sites

Never mind, I found out the issue.

 

So what was the issue? I have a similar issue, but it seems like maybe there's a setting that allows a + or - of $5. I have set my minimum order amount to $50, but when I order a $45 item, it allows the discount. I thought it might be shipping, but the shipping was $3.67 leaving the total under $50 at $48.67. Anyone know what's happening? Is there a setting I've missed?

Link to comment
Share on other sites

I am on a tight deadline and need to install this but am not sure how to install it and get it working ASAP.

 

Looking at the contribution download page there is V3.31 and LOTS of later patches. There are 54 pages in this thread and I do not have time to read ??? pages to work out what is/isn't needed. Do I install V3.31 + all subsequent?

 

Is it time for a re-release with all the required patches?

 

Cheers. Paul.

 

I installed this yesterday, so I suppose I haven't seen possible bugs, but V3.31 (by itself) seems to be working great. From what I've seen of the later patches, they are, for the most part, optional. I would just install V3.31, then look over the later patches and see if any of the described scenarios apply to your situation.

 

Hope this helps. BTW, my non-live site is at www.mafgiftshop.org

Edited by mafadmin
Link to comment
Share on other sites

I installed this yesterday, so I suppose I haven't seen possible bugs, but V3.31 (by itself) seems to be working great. From what I've seen of the later patches, they are, for the most part, optional. I would just install V3.31, then look over the later patches and see if any of the described scenarios apply to your situation.

 

Hope this helps. BTW, my non-live site is at www.mafgiftshop.org

 

Thanks for that. Coincidentally, I have just finished downloading everything and will start in a couple of minutes.

 

Did you know your horizontal menu does not work? It gives a 404 with a 404 page not fund. Looks good other than that.

Edited by GwilliamP
Link to comment
Share on other sites

Double Post?

 

I have installed the V3.31 contribution by following the Install, edit existing files method and have so far had no nasty errors apart from this;

 

The admin/includes/boxes/catalog.php creates a link that is pointing to the wrong place.

 

Admin, Catalog, Discount Coupons links to /admin/coupons.php

href="' . tep_href_link(FILENAME_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DISCOUNT_COUPONS . '</a>' );

Reports does the same.

Both the files are in /admin/includes/languages/english

 

None of the subsequent patches appear to address this so I am assuming I have messed up somewhere ;-( Can anyone spot the deliberate mistake and put me right?

Link to comment
Share on other sites

Hey Josh

I too have been trolling through the osCommerce Support Forums looking for suggestions on how to solve the same issue you are/were experiencing (described below). Unfortunately, I was unable to find a solution posted to the forum and was wondering if you ever received a response to your inquiry that solved the issue?

 

Thanks,

-paul

 

 

 

Hi, I've scanned this thread trying to find an answer to the problem we're having and haven't had any luck.

 

We installed this module roughly 6 months ago for a client. She just created a discount that's supposed to take 10% off of an entire order. It works as intended if a customer doesn't buy multiple quantities of the same product. However, if a customer tries to purchase 2 or more of the same product, the 10% is taken off multiple times. For example:

 

4 x Product A : $139.96

Discount Coupon : - 14.00 //displaying correct amount

Sub-Total : 83.98 //incorrect sub-total

 

What appears to be happening is the quantity is multiplying the discount and then subtracting from the total, like this:

4 quantity * 10% = 40%

139.96 - 40% = 83.98

 

Has anyone else experienced this error? If so, could you please point me in the right direction as to how to fix it? Thanks so much for your help.

-Josh

Edited by postrows
Link to comment
Share on other sites

pls somebody Help !!!! Help !!!!!

 

I came across your post and wondering how to achieve this "If you want to get even fancier, you could make the coupon good for a free product that automatically gets populated into your cart."

 

I dont seem to find an easy way in "Discount Coupon system" to do this. I'm on a tight deadline and need to get it done ASAP and don't know if there's an easy way out there which I wasn't aware of.

 

Your immediate help in this regard is much appreciated.

Edited by anushams
Link to comment
Share on other sites

Sorry for inconvinience, I didn't read all pages.

 

I've got an error when I confirm an order :

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /xxx/xxx/www/includes/functions/database.php:13) in /xxx/xxx/www/includes/functions/database.php on line 13

 

Please Help me to solve this prob

 

 

Thx

Link to comment
Share on other sites

Hi

 

I've installed the contrib and after adding the sub-total fix, all is OK apart from a few little probs. The first is probaby easy, after the coupon expires I get the standard "Not valid" message and not the "No longer valid" message.

 

For the second I have excluded 1 product as a test and no error or warning message show. The debug info is below. Product [0] with id 383 is the excluded one.

 

The last prob is the way that error messages are displayed. The ones included in this contrib don't match the design of my site so I have changed them. The error messages are now in the main body of my page and are based on a table layout similar to Amazon. Exclaimation mark, colored background etc. Will this cause any probs or is it the reason prob 2 is happening.

 

Sorry to lump them all into 1 post

 

Hope someone can help

 

Ian

 

<!-- Discount Coupons DEBUG
order Object
(
[info] => Array
	(
		[order_status] => 1
		[currency] => GBP
		[currency_value] => 1.00000000
		[payment_method] => Pay by Cheque
		[cc_type] => 
		[cc_owner] => 
		[cc_number] => 
		[cc_expires] => 
		[shipping_method] => Royal Mail International Airmail   (Ships normally within 5 to 7 days)
		[shipping_cost] => 5.95
		[subtotal] => 44.0025
		[tax] => 0
		[tax_groups] => Array
			(
				[Unknown tax rate] => 0
			)

		[comments] => 
		[total] => 46.285
	)

[totals] => Array
	(
	)

[products] => Array
	(
		[0] => Array
			(
				[qty] => 1
				[name] => Franke Pharoah
				[title] => Understand This Groove
				[media] => 12"
				[label] => Cheeky Records
				[catno] => CHEEKY 01
				[model] => ICR28098
				[tax] => 0
				[tax_description] => Unknown tax rate
				[price] => 33.00
				[final_price] => 33
				[weight] => 0.190
				[id] => 383
			)

		[1] => Array
			(
				[qty] => 1
				[name] => DJ Alan X
				[title] => Lost
				[media] => 12"
				[label] => Xtrax
				[catno] => XTRAX 010
				[model] => ICR27543
				[tax] => 0
				[tax_description] => Unknown tax rate
				[price] => 3.67
				[final_price] => 3.67
				[weight] => 0.190
				[id] => 322
			)

		[2] => Array
			(
				[qty] => 1
				[name] => Gina Go Go
				[title] => I Can't Face The Fact
				[media] => 12"
				[label] => Capitol Records
				[catno] => V 15396
				[model] => ICR27803
				[tax] => 0
				[tax_description] => Unknown tax rate
				[price] => 11.00
				[final_price] => 11
				[weight] => 0.190
				[id] => 387
			)

	)

[customer] => Array
	(
		[firstname] => 1st Name
		[lastname] => 2nd name
		[company] => 
		[street_address] => 28 Billing Road
		[suburb] => Manchester
		[city] => tertee
		[postcode] => M12 9DJ
		[state] => Adana
		[zone_id] => 3380
		[country] => Array
			(
				[id] => 215
				[title] => Turkey
				[iso_code_2] => TR
				[iso_code_3] => TUR
			)

		[format_id] => 1
		[telephone] => 
		[email_address] => [email protected]
	)

[delivery] => Array
	(
		[firstname] => 1st Name
		[lastname] => 2nd name
		[company] => 
		[street_address] => 28 Billing Road
		[suburb] => Manchester
		[city] => tertee
		[postcode] => M12 9DJ
		[state] => Adana
		[zone_id] => 3380
		[country] => Array
			(
				[id] => 215
				[title] => Turkey
				[iso_code_2] => TR
				[iso_code_3] => TUR
			)

		[country_id] => 215
		[format_id] => 1
	)

[content_type] => physical
[coupon] => discount_coupon Object
	(
		[messages] => Array
			(
				[debug] => Array
					(
						[0] => INFO: DISPLAY_PRICE_WITH_TAX = false
						[1] => INFO: MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING = false
						[2] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS = true
						[3] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_SORT_ORDER = 5
						[4] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_TYPE = true
						[5] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL = false
						[6] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_TAX = None
						[7] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_EXCLUDE_SPECIALS = true
						[8] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_RANDOM_CODE_LENGTH = 6
						[9] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_LINES = false
						[10] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_ALLOW_NEGATIVE = false
						[11] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_USE_LANGUAGE_FILE = false
						[12] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_CONFIG = Discount Coupon [code] applied
						[13] => INFO: MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG = true
						[14] => INFO: Product 383 failed product exclusion check
						[15] => INFO: Product 383 failed product exclusion check
						[16] => INFO: Excluded product 383. Discount of 0 not applied.
						[17] => INFO: Discount of 0 applied to product 383 ($33).
						[18] => INFO: Calculating tax on 33.  Displayed price 33.
						[19] => INFO: Product 322 passed exclusion check.  Discount 0.9175 applied. (percent)
						[20] => INFO: Discount of 0.9175 applied to product 322 ($3.67).
						[21] => INFO: Calculating tax on 2.7525.  Displayed price 2.7525.
						[22] => INFO: Product 387 passed exclusion check.  Discount 2.75 applied. (percent)
						[23] => INFO: Discount of 2.75 applied to product 387 ($11).
						[24] => INFO: Calculating tax on 8.25.  Displayed price 8.25.
						[25] => INFO: Discount of 3.6675 applied to order total.
					)

			)

		[coupon] => Array
			(
				[coupons_id] => test123
				[coupons_description] => Sale now on
				[coupons_discount_amount] => 0.250000000000
				[coupons_discount_type] => percent
				[coupons_date_start] => 2008-07-26 00:00:00
				[coupons_date_end] => 2008-08-01 00:00:00
				[coupons_max_use] => 0
				[coupons_min_order] => 5.0000
				[coupons_min_order_type] => price
				[coupons_number_available] => 0
			)

		[applied_discount] => Array
			(
				[Unknown tax rate] => 3.6675
			)

		[cart_info] => Array
			(
				[valid_products] => Array
					(
						[count] => 2
						[line_items] => 2
						[total] => 14.67
					)

				[total_products] => Array
					(
						[count] => 3
						[line_items] => 3
						[total] => 47.67
					)

				[exclusions] => Array
					(
						[categories] => Array
							(
							)

						[products] => Array
							(
								[0] => 28
								[1] => 383
							)

						[manufacturers] => Array
							(
								[0] => 13
							)

					)

			)

		[discount_tax] => Array
			(
				[Unknown tax rate] => 0
			)

	)

[billing] => Array
	(
		[firstname] => 1st Name
		[lastname] => 2nd name
		[company] => 
		[street_address] => 28 Billing Road
		[suburb] => Manchester
		[city] => tertee
		[postcode] => M12 9DJ
		[state] => Adana
		[zone_id] => 3380
		[country] => Array
			(
				[id] => 215
				[title] => Turkey
				[iso_code_2] => TR
				[iso_code_3] => TUR
			)

		[country_id] => 215
		[format_id] => 1
	)

)

End Discount Coupons DEBUG-->

Hi, Me again

 

It's been almost 2 months, I think I've been patient. Is this the wishlist support thread??? I am in the right thread?? Can someone kindly sort this out for me. All I want is for a message to show when an excluded item is added to the cart. My debug info is attached. Why did that product fail??

 

Cheers

 

Ian

Link to comment
Share on other sites

Apologies if this has been answered elsewhere here. I have spent ages trying to find an answer but with no joy.

 

I have been running this contribution for some time with no problems, but now I want to restrict a discount code to a few categories. I found the reply about adding and calling a new function 'tep_get_product_full_path' and have done that, but with no luck.

 

The problem I am having is slightly different to what I have read elsewhere. When I specify a category for the coupon any discount is applied only if all the items in the basket are eligible for discount. In my shop I want to apply discounts to prints but not frames but can not get this to work.

 

Has anybody else had and solved this problem?

 

Thanks

 

Ian

Link to comment
Share on other sites

Actually forget that previous post. It just isn't applying the discount to anything but the postage if there are any categories specified in the coupon. I have added the get_product_full_path function and am calling that, but it doesn't seem to be working.

 

Help would be great thanks.

Link to comment
Share on other sites

I added this contribution and it won't add my shipping and the cc# will not go through. I did a new install of oscommerce and just added this to it. Any suggestions?

 

 

I have the same problem with the CC# not working. I get an error no matter what he CC is. anybody have any clue what could be causing this?

Link to comment
Share on other sites

Hi, Me again

 

It's been almost 2 months, I think I've been patient. Is this the wishlist support thread??? I am in the right thread?? Can someone kindly sort this out for me. All I want is for a message to show when an excluded item is added to the cart. My debug info is attached. Why did that product fail??

 

Cheers

 

Ian

Solved this one too. I am just too good.

 

Ian

Link to comment
Share on other sites

I just installed this for the third time, hoping that I did something wrong during the installation. However I am getting the same bug each time. Essentially when I click on an order to view the packing slip it is only displaying the page down to the discount portion. When I looked in the source it is showing that it has published the code inside an unclosed comment tag. This would be easy enough to fix if I could isolate the file that has this problem. Any assistance would be greatly appreciated!

 

The Source looks like this:

          <tr class="dataTableRow">
           <td class="dataTableContent" valign="top" align="right">2 x</td>
           <td class="dataTableContent" valign="top">New Product1            </td>

           <td class="dataTableContent" valign="top"></td>
           <td class="dataTableContent" align="right" valign="top">0%</td>
           <td class="dataTableContent" align="right" valign="top"><b>$19.99</b></td>
           <td class="dataTableContent" align="right" valign="top"><b>$19.99</b></td>
           <td class="dataTableContent" align="right" valign="top"><b>$39.98</b></td>
           <td class="dataTableContent" align="right" valign="top"><b>$39.98</b></td>

         </tr>
         <tr>
           <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
             <tr>
               <td align="right" class="smallText">Discount Coupon grandopening applied:</td>
               <td align="right" class="smallText">-$4.00

<!-- Discount Coupons DEBUG
order Object
(
   [info] => Array
       (
           [order_status] => 1
           [currency] => USD
           [currency_value] => 1.00000000
           [payment_method] => Credit Card
           [cc_type] =></td>
             </tr>
             <tr>
               <td align="right" class="smallText">Sub-Total:</td>
               <td align="right" class="smallText">$35.98</td>
             </tr>
             <tr>
               <td align="right" class="smallText">Table Rate (Best Way):</td>
               <td align="right" class="smallText">$5.50</td>
             </tr>
             <tr>
               <td align="right" class="smallText">Total:</td>
               <td align="right" class="smallText"><b>$41.48</b></td>
             </tr>
           </table></td>
         </tr>
       </table></td>

Link to comment
Share on other sites

I just installed this for the third time, hoping that I did something wrong during the installation. However I am getting the same bug each time. Essentially when I click on an order to view the packing slip it is only displaying the page down to the discount portion. When I looked in the source it is showing that it has published the code inside an unclosed comment tag. This would be easy enough to fix if I could isolate the file that has this problem. Any assistance would be greatly appreciated!

 

The Source looks like this:

          <tr class="dataTableRow">
           <td class="dataTableContent" valign="top" align="right">2 x</td>
           <td class="dataTableContent" valign="top">New Product1            </td>

           <td class="dataTableContent" valign="top"></td>
           <td class="dataTableContent" align="right" valign="top">0%</td>
           <td class="dataTableContent" align="right" valign="top"><b>$19.99</b></td>
           <td class="dataTableContent" align="right" valign="top"><b>$19.99</b></td>
           <td class="dataTableContent" align="right" valign="top"><b>$39.98</b></td>
           <td class="dataTableContent" align="right" valign="top"><b>$39.98</b></td>

         </tr>
         <tr>
           <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
             <tr>
               <td align="right" class="smallText">Discount Coupon grandopening applied:</td>
               <td align="right" class="smallText">-$4.00

<!-- Discount Coupons DEBUG
order Object
(
   [info] => Array
       (
           [order_status] => 1
           [currency] => USD
           [currency_value] => 1.00000000
           [payment_method] => Credit Card
           [cc_type] =></td>
             </tr>
             <tr>
               <td align="right" class="smallText">Sub-Total:</td>
               <td align="right" class="smallText">$35.98</td>
             </tr>
             <tr>
               <td align="right" class="smallText">Table Rate (Best Way):</td>
               <td align="right" class="smallText">$5.50</td>
             </tr>
             <tr>
               <td align="right" class="smallText">Total:</td>
               <td align="right" class="smallText"><b>$41.48</b></td>
             </tr>
           </table></td>
         </tr>
       </table></td>

 

Never mind I fixed this for some reason the debug was printing out the content in the source even though debug mode was set to false. I inserted another comment tag inside the admin/orders.php file to fix it. If you have this problem I would suggest doing the same until someone has the time to fix this bug.

Link to comment
Share on other sites

I have coded a solution for this but given I am not a web guy it is a bit sloppy.

 

Basically I have made up and added a new module in payments call PayPal Account (which is based on moneyorder.php with some words changed)

 

They user can then select this as a payment method on the checkout_payment.php screen ( i have removed the Paypal checkout express link altogether) which then takes us to checkout_confirmation.php.

 

Here i check if the user is paying by payal account I replace the confirm order button with the Check out with paypal link.

 

At this point the coupon discount has been applied and the amount is correct.

 

All seems to be working perfect.

 

Mike

 

Is this downloadable somwhere? I have this problem aswell and you rsolution sounds good enough :)

Link to comment
Share on other sites

I have the same problem with the CC# not working. I get an error no matter what he CC is. anybody have any clue what could be causing this?

 

 

I would suggest to reinstall by manually entering all the code and to double check everything. I had troubles a few times but got it working in the end.

Link to comment
Share on other sites

I would suggest to reinstall by manually entering all the code and to double check everything. I had troubles a few times but got it working in the end.

 

yeah, i ended up reinstalling everything a third time. it works correctly now.

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