Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Discount Coupon Codes


kgt

Recommended Posts

There is a "Price Sensitive Discount" contribution that might do what you want:

http://addons.oscommerce.com/info/204

 

 

 

This is a wonderful contribution. You did an awesome job!!! =)

 

I was wondering if there is a chance that somehow there will one day be an addition to this contribution, such as an automatic discount after a certain minimum price is achieved at checkout? And not having it entered manually by a customer.

 

I'm currently looking for this right now, such as 15% off any order $35.00 and over. However, I'm not having any luck.

 

Any help would be greatly appreciated!!!

 

Have a wonderful day!

~Tracy
 

Link to comment
Share on other sites

I don't have this issue in my store. If you PM me with your email address I would be happy to send you whatever file you would like to compare. Keep in mind I do have a lot of contributions installed, so you will most likely find code you don't need, but maybe it will help you to find if there is any missing or mis-placed code ;)

 

 

Sorry to have to post this again, but it's driving me nuts. I just can't figure out why anything that has had a discount applied to it cannot be edited afterwards... Please Help me Guys

~Tracy
 

Link to comment
Share on other sites

Hey,

 

it seems I have found a slight problem:

 

If I include a % in the discount code (eg. '10%off' ) then I am not able to edit the details of the coupon. Whenever I click on that coupon to edit it I get this message:

 

Not Acceptable

An appropriate representation of the requested resource /admin/coupons.php could not be found on this server.

 

Is there a way to get around this? Im not sure if we would have the same problem when including other symbols.

Link to comment
Share on other sites

Hey guys,

 

I just installed a clean version of this add-on and receive this error on /checkout_confirmation.php

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/tasleems/public_html/shop/includes/boxes/categories.php:12) in /home/tasleems/public_html/shop/includes/boxes/categories.php on line 12

 

Your help would be greatly appreciated.

 

thanks!

Link to comment
Share on other sites

Hey Guys,

I just did a manual install of this contribution and all went well.

I was able to install the contribution and go to admin/modules and set up the discout coupon stuff. Next it said to go to catalog/discount coupons which is where I run in to problems - there is no option for 'discount coupons' at all - the destructions say to check that these 2 certain files are uploaded(which they are), but I'm still not getting any joy.

Anyone tell me what I missed out installing it to make the options not appear in the admin section after installing the module?

I can still see and edit the module its self just can t creat e teh discount codes etc.

 

Any help would be greatly appreciated.

 

B.

Bryndog, a lone crusader charged with not messing up

Thanks to any an all for your help and advice.

Link to comment
Share on other sites

You don't need to include the % sign- you simply enter it as a decimal (ie. .10 for 10%, .05 for 5%) and choose the "Percentage Discount" option rather than the "Fixed Amount". If you enter .50 for example, and choose the "Shipping Discount" option, it will take 50% off shipping. If you choose the "Percentage Discount" option, it will take 50% off of the subtotal before shipping.

 

Hope that helps :thumbsup:

 

Hey,

 

it seems I have found a slight problem:

 

If I include a % in the discount code (eg. '10%off' ) then I am not able to edit the details of the coupon. Whenever I click on that coupon to edit it I get this message:

Is there a way to get around this? Im not sure if we would have the same problem when including other symbols.

~Tracy
 

Link to comment
Share on other sites

Did you edit your Admin/includes/boxes/catalog.php file to include this at the bottom:

//BOF Discount Coupon Codes
							   '<a href="' . tep_href_link(FILENAME_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DISCOUNT_COUPONS . '</a>' );
							   //EOF Discount Coupon Codes

 

Also - are you making sure you are uploading your files in ASCII mode (not Binary) ?

 

 

Hey Guys,

I just did a manual install of this contribution and all went well.

I was able to install the contribution and go to admin/modules and set up the discout coupon stuff. Next it said to go to catalog/discount coupons which is where I run in to problems - there is no option for 'discount coupons' at all - the destructions say to check that these 2 certain files are uploaded(which they are), but I'm still not getting any joy.

Anyone tell me what I missed out installing it to make the options not appear in the admin section after installing the module?

I can still see and edit the module its self just can t creat e teh discount codes etc.

 

Any help would be greatly appreciated.

 

B.

~Tracy
 

Link to comment
Share on other sites

sorry, it seems I havent explained myself properly.

 

Im having no problems applying the actualy discount, its just that I found a problem when I entered a % sign in the "Coupon Code" box, not in the "Discount Amount ".

 

I hope that explains it better,

 

Ben

Link to comment
Share on other sites

Previously in this forum there is this note regarding this issue when someone else had it:

 

You've got a template, and for some reason template makers seem to like putting things in places they don't belong. However, that's not really your problem. It's looks like your real problem is that you uploaded admin/includes/boxes/categories.php to catalog/includes/boxes/categories.php. That file should be in the admin directory. You'll need to restore categories.php from a backup and re-upload admin/includes/boxes/categories.php to the correct directory.

 

Just a tip - you can go to http://www.google.com and in the search box type:

site:www.oscommerce.com/forums

 

press space and then enter your search terms. In this case I entered:

"Discount Coupons" +"Fatal error: Cannot redeclare tep_show_category() (previously declared"

 

This tip has been a major help for me when installing various contributions as most errors I've had have been one's that other people had as well and the answers were already posted. Saved me from trying to read through hundreds of pages in a forum to try to find it :thumbsup:

 

Hey guys,

 

I just installed a clean version of this add-on and receive this error on /checkout_confirmation.php

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/tasleems/public_html/shop/includes/boxes/categories.php:12) in /home/tasleems/public_html/shop/includes/boxes/categories.php on line 12

 

Your help would be greatly appreciated.

 

thanks!

~Tracy
 

Link to comment
Share on other sites

I'm not sure why you would want it in the Coupon Code box? That is where you put the code you want someone to enter to receive a discount - such as AD1107. This is an alphanumeric field, I don't think it works with other characters. You can put the % sign in the "Description" field. So, for example, let's say I have coupon code AD1107 and it's a 10% discount coupon, so I put "10% Discount" in the "Description" field and "AD1107" in the "Coupon Code" field.

 

Hope that helps ;)

 

sorry, it seems I havent explained myself properly.

 

Im having no problems applying the actualy discount, its just that I found a problem when I entered a % sign in the "Coupon Code" box, not in the "Discount Amount ".

 

I hope that explains it better,

 

Ben

~Tracy
 

Link to comment
Share on other sites

Previously in this forum there is this note regarding this issue when someone else had it:

Just a tip - you can go to http://www.google.com and in the search box type:

site:www.oscommerce.com/forums

 

press space and then enter your search terms. In this case I entered:

"Discount Coupons" +"Fatal error: Cannot redeclare tep_show_category() (previously declared"

 

This tip has been a major help for me when installing various contributions as most errors I've had have been one's that other people had as well and the answers were already posted. Saved me from trying to read through hundreds of pages in a forum to try to find it :thumbsup:

 

Thanks! that worked, but now there seems to be a formatting error. Like once you get into the checkout process things look a bit off/weird.

 

If someone doesn't mind taking a look: www.tasleemsvideo.com/shop

 

Please let me know.

 

Thanks!

Link to comment
Share on other sites

hey, yes it does help

 

I guess that field just doesnt work with symbols. I wanted to make it easy for my customer's so they could type in something which was meaningful rather than just random numbers or letters.

 

Thanks anyway,

 

Ben

 

I'm not sure why you would want it in the Coupon Code box? That is where you put the code you want someone to enter to receive a discount - such as AD1107. This is an alphanumeric field, I don't think it works with other characters. You can put the % sign in the "Description" field. So, for example, let's say I have coupon code AD1107 and it's a 10% discount coupon, so I put "10% Discount" in the "Description" field and "AD1107" in the "Coupon Code" field.

 

Hope that helps ;)

Link to comment
Share on other sites

You could use words or abbreviations - such as PACKET or BUNDLE or DSCNT - etc... :)

 

hey, yes it does help

 

I guess that field just doesnt work with symbols. I wanted to make it easy for my customer's so they could type in something which was meaningful rather than just random numbers or letters.

 

Thanks anyway,

 

Ben

~Tracy
 

Link to comment
Share on other sites

Things are a bit off on your homepage even. I did a "view source" on the home page and found a misplaced </td> and also found that you have a height setting on everything as well. I wouldn't suggest a height setting for the content area of your pages as it needs to be able to grow or shrink with the amount of information pulled from the database for that page.

 

You need to go through and review where you have added code relative to your tables /rows / td's / etc... as it seems somewhere your HTML is being thrown off.

 

 

Thanks! that worked, but now there seems to be a formatting error. Like once you get into the checkout process things look a bit off/weird.

 

If someone doesn't mind taking a look: www.tasleemsvideo.com/shop

 

Please let me know.

 

Thanks!

~Tracy
 

Link to comment
Share on other sites

Things are a bit off on your homepage even. I did a "view source" on the home page and found a misplaced </td> and also found that you have a height setting on everything as well. I wouldn't suggest a height setting for the content area of your pages as it needs to be able to grow or shrink with the amount of information pulled from the database for that page.

 

You need to go through and review where you have added code relative to your tables /rows / td's / etc... as it seems somewhere your HTML is being thrown off.

 

Hi Tracy,

 

Unfortunately I'm not too good with PHP. I don't really know where to look or what might be the issue.

 

If you could help me one step further that would be great.

 

Thanks!

Link to comment
Share on other sites

Did you edit your Admin/includes/boxes/catalog.php file to include this at the bottom:

//BOF Discount Coupon Codes
							   '<a href="' . tep_href_link(FILENAME_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DISCOUNT_COUPONS . '</a>' );
							   //EOF Discount Coupon Codes

 

Also - are you making sure you are uploading your files in ASCII mode (not Binary) ?

 

 

Hey TracyS,

Just wanted to say thanks - you got it straight away - just missed out the extra code.

Thanks for your swift response, Star.

 

B.

Bryndog, a lone crusader charged with not messing up

Thanks to any an all for your help and advice.

Link to comment
Share on other sites

OK next problem.

I believe this to be a version problem and nothing to do with this contribution but I thought I'd just check and make sure with you guys first.

 

I can now create a coupon and enter it when paying for stuff but when I go to 'confirm' after entering my code i get this

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or z2g.zone_id = 0 or z2g.zone_id IS NULL ) ' at line 5

SELECT dc2z.geo_zone_id FROM discount_coupons_to_zones dc2z LEFT JOIN zones_to_geo_zones z2g USING( geo_zone_id ) WHERE ( z2g.zone_id= or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id= or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="0GTRV9"

 

I think its a osc version problem that I have but wondered if anyone has an easy way around it or can confirm this for me.

Thanks in advance.

 

B.

Bryndog, a lone crusader charged with not messing up

Thanks to any an all for your help and advice.

Link to comment
Share on other sites

I may not know the easiest method to fix this, but I had the same problem initially and it was because I had not yet setup my shipping zones in my Admin. They are in a weird place and it is very time consuming to do, but:

 

Go to Admin > Locations / Taxes > Tax Zones

 

Once there, you need to create your zones. I have two zones setup for our store - "US" and "All Others".

 

Once you create a zone, you then need to click on the folder next to the zone's name

 

From there, you click on "Insert" and you select a Country to include in that zone.

 

Unfortunately, there are a lot of Countries to go through and "insert" into each of your zones :'(

 

If someone knows of an easier way around this it would be wonderful if they share :thumbsup:

 

If not - that's what fixed the below error for me :blush:

 

 

 

OK next problem.

I believe this to be a version problem and nothing to do with this contribution but I thought I'd just check and make sure with you guys first.

 

I can now create a coupon and enter it when paying for stuff but when I go to 'confirm' after entering my code i get this

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or z2g.zone_id = 0 or z2g.zone_id IS NULL ) ' at line 5

SELECT dc2z.geo_zone_id FROM discount_coupons_to_zones dc2z LEFT JOIN zones_to_geo_zones z2g USING( geo_zone_id ) WHERE ( z2g.zone_id= or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id= or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="0GTRV9"

 

I think its a osc version problem that I have but wondered if anyone has an easy way around it or can confirm this for me.

Thanks in advance.

 

B.

~Tracy
 

Link to comment
Share on other sites

I would love to, but I have limited time at the moment. Are you using a template system? What program do you use to edit the code on your pages? Have you used a comparison program (such as WinMerge) to compare your files with the files that come in the contributions you have installed - or to compare with someone else's files who is running the same contributions on their site?

 

 

 

Hi Tracy,

 

Unfortunately I'm not too good with PHP. I don't really know where to look or what might be the issue.

 

If you could help me one step further that would be great.

 

Thanks!

~Tracy
 

Link to comment
Share on other sites

I may not know the easiest method to fix this, but I had the same problem initially and it was because I had not yet setup my shipping zones in my Admin. They are in a weird place and it is very time consuming to do, but:

 

Go to Admin > Locations / Taxes > Tax Zones

 

In this sql SELECT dc2z.geo_zone_id FROM discount_coupons_to_zones dc2z LEFT JOIN zones_to_geo_zones z2g USING( geo_zone_id ) WHERE ( z2g.zone_id= or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id= or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="0GTRV9"

 

Notice that the WHERE clause has z2g.zone_id= or (so there is no zone_id) that is what causes the sql error I believe.

Same problem is in the AND statement z2g.zone_country_id= or

 

Perhaps a general fix in the contribution could be to not do the look up if the zone information is blank.

 

But in anycase, I would have expected zone details for the customer but if as Tracys said it was due to shipping zones not being set up that makes sense.

 

there is a contribution that I use that sets up a shipping zone for the 'Rest of the World' automatically which is very helpful because as TracyS notes adding the countrys one at a tile to a zone is a bit painful.

 

the contribution can be found here

http://addons.oscommerce.com/info/4431

 

There are a few others that you can look at to if you do a search on "rest of the world" in the OSCommerce Contributions site.

Link to comment
Share on other sites

I have an issue with this. It works great but I am have a problem offering free shipping with the assigned coupon. We are using a FedEx module for shipping. The discount does not show or get applied. If I add a coupon for for a discount for for a fixed rate it works correctly. Does anyone have any ideas about what the problem may be? Can I use the shipping discounts with the FedEx module?

 

Any help will be greatly appreciated...

 

Jason

Link to comment
Share on other sites

Hi,

 

All seems to be working good except EXCLUSIONS.

 

None seem to be working.

 

I created a discounted shipping code for 1 product. I excluded all other manufacturers, categories and products.

 

But I can apply the code to all products.

 

Thanks.

Link to comment
Share on other sites

Hi there,

 

I just completed the install. I'm getting the following error in the admin section of the coupon module:

 

1146 - Table 'boschett_p_os2.TABLE_DISCOUNT_COUPONS' doesn't exist

 

select count(*) as total from TABLE_DISCOUNT_COUPONS cd

 

[TEP STOP]

 

I saw early on in this post that this meant the tables did not get created. I don't believe they were. I got no error when updating/installing the module and I did not see anywhere that the tables were being created.

 

Where I saw this post it also gave instructions on creating the database tables, but there are more tables in the current instructions (I think it may have been an answer for an older version). Anyway, I ran the SQL queries in phpMyAdmin, but still no change.

 

I noticed that there are no records in each of the new tables, I don't know if this means anything.

 

I'll attempt to go through the remaining pages of the 83 to find some help, If anyone can help me I'd truly appreciate it.

 

Thanks.

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