Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Discount Coupon Codes


kgt

Recommended Posts

Just a guess but did you maybe overwrite one of your admin files? I'm new to this too but that's my guess.

 

I dont think so. I made a complete copy of my store and went in and edited each file. So, theres not really anyway to overwrite anything. What I am thinking is that one of the files I edited in the admin folder was done wrong. (wrong place within file, etc.) Thats my only guess. Thanks for your input. Anyone have any other ideas?

Edited by legrand18
Link to comment
Share on other sites

I dont think so. I made a complete copy of my store and went in and edited each file. So, theres not really anyway to overwrite anything. What I am thinking is that one of the files I edited in the admin folder was done wrong. (wrong place within file, etc.) Thats my only guess. Thanks for your input. Anyone have any other ideas?

 

There are only five files to edit in the admin side so it shouldn't be too much to go back and recheck them.

 

Be sure to do all the edits in each file. Some have more than one set of edits.

Link to comment
Share on other sites

Hi,

I get the following error on the confirmation page if I try to enter the correct code:

1054 - Unknown column 'geo_zone_id' in 'from clause'

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=88 or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id=81 or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="XXX"

[TEP STOP]

What does it mean?

Thank you!

Hi,

fixed in the latest update!

Greets!

Link to comment
Share on other sites

The most stable version without any database bug is http://www.oscommerce.com/community/contributions,4269. Its being installed by several user and we already helped the other users in installations.

 

regards

saju

 

I am very disturbed by what seems to be some turf war on this contribution. Am I mistaken or is there several versions now and it's getting confusing as to which one is being supported and by whom. To my knowledge KGT is the support but doesn't seem to be doing that.

 

I've installed this contribution twice and am about to try a third version but for the life of me I don't know what to do. You assume we have installed a version from May 2007 for the upgrade but there have been many other versions since. As good as this contribution looks it may be a little too hot to handle if things don't settle down to "ONE" right version.

 

Sorry I just feel that I've been waisting a lot of my time.

Link to comment
Share on other sites

I am very disturbed by what seems to be some turf war on this contribution. Am I mistaken or is there several versions now and it's getting confusing as to which one is being supported and by whom. To my knowledge KGT is the support but doesn't seem to be doing that.

 

I've installed this contribution twice and am about to try a third version but for the life of me I don't know what to do. You assume we have installed a version from May 2007 for the upgrade but there have been many other versions since. As good as this contribution looks it may be a little too hot to handle if things don't settle down to "ONE" right version.

 

Sorry I just feel that I've been waisting a lot of my time.

 

Okay, I've had my coffee and cooled off.

 

My question is that since my last install which was the version from Dec. 2008 by tarkhorani, there have been five files put up for download. By the way, many of the versions I've looked at here don't have an SQL file to import. Is this something that was overlooked or is it necessary in all versions? See what I mean about confusion.

 

Which file(s) do I need to download to get a full stable version? Can you put together a single download with all the fixes and sql file that might be needed? PLEASE?

Link to comment
Share on other sites

Hi,

I get the following error on the confirmation page if I try to enter the correct code:

1054 - Unknown column 'geo_zone_id' in 'from clause'

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=88 or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id=81 or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="XXX"

[TEP STOP]

What does it mean?

Thank you!

Hi together,

saju from wontonetech solved my problems very fast and good!

Download the latest version, all problems should be solved.

 

Greetings!

Edited by Jan Zonjee
Link to comment
Share on other sites

for kemi

 

the most stable version is this

---

 

The most stable version without any database bug is http://www.oscommerce.com/community/contributions,4269. Its being installed by several user and we already helped the other users in installations.

 

wontonesaju 30 Jan 2009 this will include full version you can also see the user comments who already successfully install that. Yes the original author is KGT.

---

 

it also include the database installers. Please ignore the files which was uploaded by dynamoeffects . That having a bug and thats without the db installer.

Link to comment
Share on other sites

for kemi

 

the most stable version is this

---

 

The most stable version without any database bug is http://www.oscommerce.com/community/contributions,4269. Its being installed by several user and we already helped the other users in installations.

 

wontonesaju 30 Jan 2009 this will include full version you can also see the user comments who already successfully install that. Yes the original author is KGT.

---

 

it also include the database installers. Please ignore the files which was uploaded by dynamoeffects . That having a bug and thats without the db installer.

 

Thank you, I'll give it a try and see if it works better than the version I installed with no database sql file from Dec. 2008.

 

Kemi

Link to comment
Share on other sites

Hi to everybody.

 

I have a problem with this great contribution. I have osc 2.2ms and php4 in my server

 

When the customer put the discount coupon number, if there are any error in this number (it's a finished coupon, it's not minium oder, ...., any reason), don't show the error, he log out the customer and go to the log-in page.

 

Do you know where can be the problem.

 

Thank you to all for read me.

 

Cesar

Link to comment
Share on other sites

Hi,

does anyone have an idea how to change the code to display the subtotal WITHOUT the discount?!

Because my free shipping modul won`t work with that...

Here`s the code:

//kgt - discount coupons
	if( is_object( $this->coupon ) ) {
	  $applied_discount = 0;
	  $discount = $this->coupon->calculate_discount( $this->products[$index], $valid_products_count );
	  if( $discount['applied_discount'] > 0 ) $valid_products_count++;
	  $shown_price = $this->coupon->calculate_shown_price( $discount, $this->products[$index] );
	  $this->info['subtotal'] += $shown_price['shown_price'];
	  $shown_price = $shown_price['actual_shown_price'];
	} else {
	  $shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
	  $this->info['subtotal'] += $shown_price;
	}
	//end kgt - discount coupons

Thank you!

Link to comment
Share on other sites

Hi all

 

I am in the process of installing the discount coupon addon but I am stuck.

 

I have done something wrong as now the whole admin panel does not show.

 

HELP! what have I done? I have had to edit the editable pages manually but I am sure I was careful.

Edited by dvharrison

Debbie Harrison

 

Link to comment
Share on other sites

I used the last update from 31 January from wontonesaju I never did the bug fix that has since come in from the same person, could that have been why?

 

I have other add-ons on the site so I have had to edit some of the pages before.

 

I have the latest version of PHP on my server so PHP5.

 

Basically the whole admin panel disabled and all you could see was the configuration menu.

 

Hope this helps.

Debbie Harrison

 

Link to comment
Share on other sites

Hi,

Anyone could help with Minimum Order problem?

 

I have set minimum order amount for my codes. But If products total is less than coupon amount, the minimum order amount restriction works. If it is equal or lager than coupon amount, minimum order amount does not work.

 

For example, if I order "10 x K030001=$30", Code "H38K" which is $30 coupon with mini order for $60 will apply to this order. The mini order amount did not restrict this order. But if it was less than $30, it will show on the top with Mini Order have to be $60.

Any help please?????!!!!!!!! I passed whole bunch of coupons already. :-(

 

Thanks,

here is the website:

www.osgmyart.com

You could use test visa card: 4111 1111 1111 1111 to try.

Thanks!!!!!!!!!!!

Link to comment
Share on other sites

Hi,

Anyone could help with Minimum Order problem?

 

I have set minimum order amount for my codes. But If products total is less than coupon amount, the minimum order amount restriction works. If it is equal or lager than coupon amount, minimum order amount does not work.

 

For example, if I order "10 x K030001=$30", Code "H38K" which is $30 coupon with mini order for $60 will apply to this order. The mini order amount did not restrict this order. But if it was less than $30, it will show on the top with Mini Order have to be $60.

Any help please?????!!!!!!!! I passed whole bunch of coupons already. :-(

 

Thanks,

here is the website:

www.osgmyart.com

You could use test visa card: 4111 1111 1111 1111 to try.

Thanks!!!!!!!!!!!

i have oscommerce 2.2, php 4.4.7. discount coupon code 3.31

thanks!!

Link to comment
Share on other sites

Thanks Saju you were right. I had another go this evening and I have had to adjust the catalog.php to:

 

<?php

/*

$Id: catalog.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- catalog //-->

<tr>

<td>

<?php

$heading = array();

$contents = array();

 

$heading[] = array('text' => BOX_HEADING_CATALOG,

'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'));

 

if ($selected_box == 'catalog') {

$contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .

//kgt - discount coupons

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' .

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

/***************

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' );

***************/

//end kgt - discount coupons

/* Optional Related Products (ORP) */

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

//ORP:end

}

 

$box = new box;

echo $box->menuBox($heading, $contents);

?>

</td>

</tr>

<!-- catalog_eof //-->

 

As I also have optional related products listed at the bottom of the catalog box.

 

This leaves the link in the catalog box displayed as BOX_CATALOG_DISCOUNT_COUPONS

 

Then I changed the reports.php and again nothing could be viewed on the admin screen except for the boxes on the left (this time all of them)

 

With the amendments, my reports.php looks like:

 

<?php

/*

$Id: reports.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- reports //-->

<tr>

<td>

<?php

$heading = array();

$contents = array();

 

$heading[] = array('text' => BOX_HEADING_REPORTS,

'link' => tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, 'selected_box=reports'));

 

if ($selected_box == 'reports') {

$contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_VIEWED . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_PURCHASED . '</a><br>' .

//kgt - discount coupons report

'<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a><br>'

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

/*************

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

*************/

//end kgt - discount coupons report

}

 

$box = new box;

echo $box->menuBox($heading, $contents);

?>

</td>

</tr>

<!-- reports_eof //-->

 

What am I doing wrong? Please help. :(

Debbie Harrison

 

Link to comment
Share on other sites

Change this block of code to this and see if that fixes it:

 

  //kgt - discount coupons
 if( tep_session_is_registered( 'coupon' ) && is_object( $order->coupon ) ) {
  $sql_data_array = array( 'coupons_id' => $order->coupon->coupon['coupons_id'],
						 'orders_id' => $insert_id );
  tep_db_perform( TABLE_DISCOUNT_COUPONS_TO_ORDERS, $sql_data_array );
 }
 //end kgt - discount coupons

 

Hello KGT,

I have gone through most of yours and others post but i cannot seem to find an answer for above error. In my case table discount_coupons_to_orders field order_id never gets populated with customer order_id and stays at 0 (Zero) that has been defined while creating a table. Following are few things that i was concern with and wanted to see if you can help me and others here:

 

1. what should i do to get order_id field in table discount_coupons_to_orders populated with current customer order id.

2. if a new customer pays with paypal and does not have an account with paypal and say they do not return back to our site after payment, this is what happens: in my case discount_coupons_to_orders does not increment i do not know about others and if say if this was second order using a coupon code it throws 1062 error as what insert query finds is a duplicate record with 0 already in order_id.

 

Am i going wrong somewere i have osCommerce Online Merchant v2.2 RC 2a with latest ot_discount_coupon_codes_3_32 modue. Need help...

 

Thanks

Link to comment
Share on other sites

Hi there,

I got it!

Now it`s possible to install the coupon code AND the free shipping modul together!

If you want to know how, ask me!

I don`t charge any money for helping out other guys with their problems...(like wontonesaju for example) :rolleyes:

Greetings!

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