Jump to content
kgt

[Contribution] Discount Coupon Codes

Recommended Posts

OK, solved... I copied the wrong ot_discount_coupon.php under languages :-

Edited by davidedp

Share this post


Link to post
Share on other sites

Trying to install on 2.3.3

 

I have it all working, however I had to fiddle with this step:

OPEN catalog/checkout_payment.php
FIND on line 269:
 <h2><?php echo TABLE_HEADING_COMMENTS; ?></h2>
<div class="contentText">
<?php echo tep_draw_textarea_field('comments', 'soft', '60', '5', $comments); ?>
</div>
<?php
ADD this code after:
/* kgt - discount coupons */
if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) {
?>
<h2><?php echo TABLE_HEADING_COUPON; ?></h2>
<div class="contentText">
</div>

 <div class="contentText">
 <?php echo ENTRY_DISCOUNT_COUPON.' '.tep_draw_input_field('coupon', '', 'size="32"', $coupon); ?>
</div>

<?php
}
/* end kgt - discount coupons */

 

In 2.3.3, the last <?php isn't there. I removed the ?> and <?php from the code to add, and the contribution appears to work, however on checkout_payment.php I can see the code "//* kgt - discount coupons */ if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) { ?>" and "} //* end kgt - discount coupons */"

 

Would I be ok to remove that line and the comments, or will my world implode??

 

Thanks

Share this post


Link to post
Share on other sites
<?php
}
?>

</table>

<?php
$radio_buttons++;
}
?>

</div>

<h2><?php echo TABLE_HEADING_COMMENTS; ?></h2>

<div class="contentText">
<?php echo tep_draw_textarea_field('comments', 'soft', '60', '5', $comments); ?>
</div>
//* kgt - discount coupons */
if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) {
?>
<h2><?php echo TABLE_HEADING_COUPON; ?></h2>

<div class="contentText">
</div>

 <div class="contentText">
 <?php echo ENTRY_DISCOUNT_COUPON.' '.tep_draw_input_field('coupon', '', 'size="32"', $coupon); ?>
</div>


}
//* end kgt - discount coupons */

<div class="contentText">
<div style="float: left; width: 60%; padding-top: 5px; padding-left: 15%;">
 <div id="coProgressBar" style="height: 5px;"></div>

 <table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
	 <td align="center" width="33%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
	 <td align="center" width="33%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
	 <td align="center" width="33%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
 </tr>
 </table>
</div>

<div style="float: right;"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></div>
</div>
</div>

<script type="text/javascript">
$('#coProgressBar').progressbar({
value: 66
});
</script>

</form>

<?php
require(DIR_WS_INCLUDES . 'template_bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

Share this post


Link to post
Share on other sites

Your code has to look like this:

 

<?php
}
?>

</table>

<?php
$radio_buttons++;
}
?>

</div>

<h2><?php echo TABLE_HEADING_COMMENTS; ?></h2>

<div class="contentText">
<?php echo tep_draw_textarea_field('comments', 'soft', '60', '5', $comments); ?>
</div>

<?php
//* kgt - discount coupons */
if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) {
?>

<h2><?php echo TABLE_HEADING_COUPON; ?></h2>

<div class="contentText">
 <?php echo ENTRY_DISCOUNT_COUPON.' '.tep_draw_input_field('coupon', '', 'size="32"', $coupon); ?>
</div>

<?php
}
//* end kgt - discount coupons */
?>

<div class="contentText">
<div style="float: left; width: 60%; padding-top: 5px; padding-left: 15%;">
 <div id="coProgressBar" style="height: 5px;"></div>

 <table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
	 <td align="center" width="33%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
	 <td align="center" width="33%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
	 <td align="center" width="33%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
 </tr>
 </table>
</div>

<div style="float: right;"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></div>
</div>
</div>

<script type="text/javascript">
$('#coProgressBar').progressbar({
value: 66
});
</script>

</form>

<?php
require(DIR_WS_INCLUDES . 'template_bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

Share this post


Link to post
Share on other sites

@@abbott75

 

I just corrected the part of code that you posted. I don't now how you modified the file and also not what error you get, that may have other reasons.

 

What you need to do is to add

<?php
// kgt - discount coupons 
if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) {
?>
<h2><?php echo TABLE_HEADING_COUPON; ?></h2>
<div class="contentText">
<?php echo ENTRY_DISCOUNT_COUPON.' '.tep_draw_input_field('coupon', '', 'size="32"', $coupon); ?>
</div>
<?php
}
// end kgt - discount coupons
?>

 

to anywhere where you want the discount coupon input field to appear, this can be after the comments area, so, after

<h2><?php echo TABLE_HEADING_COMMENTS; ?></h2>
<div class="contentText">
<?php echo tep_draw_textarea_field('comments', 'soft', '60', '5', $comments); ?>
</div>

 

If you are getting any errors, you need to say what errors and under what conditions

Edited by multimixer

Share this post


Link to post
Share on other sites

Thanks, the error seems to be fixed now. There must have been some small error in my copying somewhere, and its fixed now.

 

Thanks for your help.

Share this post


Link to post
Share on other sites

Hi

 

I need you help... I insalled this contribution on oscommerce 2.3.3, and now I have a problem.

Everything works fine the first time a customer use coupon discount, the problem appear when the same customer try to close a second order using a different coupon code, in this case he cannot use te coupon. In both cases I didn't set any max use, the coupons are unlimited.

No error message appear....

is there someboby facing with the same problem?

 

Many many thanks

Share this post


Link to post
Share on other sites

Hi!

 

I have just started with osc and the whole php thing, so I guess I have made some small mistake somewhere. The thing is that I can add coupons that work and all that, but my admin page looks... well, not that good. The dot in the radio button does not move when I click something else, and there is no "check" mark when I push "Include discount code in the order info" or "Exclude specials".

Also, as the picture shows, the message boxes are quite small and only shows one option per box. You don't have to fix my upper right, those "buttons" work although it looks ugly, but those are only included if they can give a hint to what is causing this to look odd. And yes, I know that english is mixed with swedish there ;)

 

Oh, and I use the 3,2 verson of discount codes, and the new 2,3,2 of osc.

 

post-313766-0-85644800-1342879852_thumb.jpg

 

Has nobody figured out what is wrong with my admin section of this? :P

 

Oh, and another thing: I assume that if I create a code and put in "1 use per customer" everyone who knows the code can use it, right? So it's not just one code, one time per customer?

Edited by Duroniel

Share this post


Link to post
Share on other sites

Hi Guys!

 

I tried searching the thread but couldn't find any relevant answers, but forgive me if this has been brought up before.

 

Is it possible for the discount coupon to be applied on the shopping cart page?

So instead of the code being applied and calculated through checkout_process.php, I'd like it to be on the shopping cart since my shop only checks out through PayPal Express and hence skips the checkout page.

 

Anyone have any ideas on how to achieve that?

 

All help is greatly appreciated!!!

Share this post


Link to post
Share on other sites

Hi,

 

I have added the paypal express fix.

 

If a percentage rate is used for the discount the correct about shows at paypal.

If a fixed rate is used for the discount, no discount is passed to paypal.

 

Has anyone a fix for this.

 

Thanks

Share this post


Link to post
Share on other sites

I now have another problem, kind of like the Paypal one, but reverse... I use a payment provider called Payson, and when I use a discount coupon the customer is charged the right amount and all that from Payson, but when the customer looks in the past orders, and the same when I do from admin, the discount is not registered. Is this an error from your side, or from Paysons side?

Share this post


Link to post
Share on other sites

Hi there. Just wondering if the latest version of this contribution will work with Oscommerce 2.2 rca2.

 

I found this contribution because I use SPPC and desperately need a voucher discount system

as well, but it seems the latest history update for this contribution (that works with SPPC) is also for Oscommerce 2.3.

 

I couldn't find any confirmation in the text files so I thought I would check here. Sorry if this is a stupid question but I am running

out of time to get my discount system happening. I have already tried 3-4 contributions without success before restoring the site.

Share this post


Link to post
Share on other sites

Or if anyone here is a coder that can make this work with Oscomerce 2.2rca I would be happy to pay you to install it for me.

Share this post


Link to post
Share on other sites

I am having the following issues with this Discount Coupon module on a wine site:

 

1. I want to apply minimum quantity AND minimum price on the coupon. Is that possible?

ie: I want the free shipping coupon applied when customers order 12 bottle (1 case) of wine with a minimum total of $120.

 

2. I found that with a product exclusions coupon, if I have a cart filled with some products that are excluded from the coupon, and some products that are included in the coupon, the coupons applies to all products. However, I only want the disount coupon to be applied to the included products. How can this be fixed?

 

Thank you!

Share this post


Link to post
Share on other sites

I've been using this module just fine for years then I noticed something recently.

 

I have about 12000 customers in which I would like to exclude about 11990 of them from using a coupon code. The problem is that it seems the limit is 10000 customers maximum maybe be excluded from using the coupon code. Is there a way to increase this limit?

Share this post


Link to post
Share on other sites

I installed this module but i can't get it to work , i don't know why , the guys who made my site i think they had made some modifications . After i copied all the files and modified the existing ones , i installed the module , all went right , no error , the database tables were created , but i can't see the field for coupon code on checkout . It has a unique sort number , i tried to change the sort numbers at all modules but nothing changed on the checkout page , so i added in catalog/shopping_cart.php

 

/* kgt - discount coupons */
if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) {
?>
<h2><?php echo TABLE_HEADING_COUPON; ?></h2>
<div class="contentText">
</div>

 <div class="contentText">
 <?php echo ENTRY_DISCOUNT_COUPON.' '.tep_draw_input_field('coupon', '', 'size="32"', $coupon); ?>
</div>

<?php
}
/* end kgt - discount coupons */

 

After this the field is there on the checkout page but i don't have a button to use it . Please help

 

Anyone who want to see please look , add a product and go to shopping cart . I think here is the problem because it redirects me always to shopping cart and from there i finalize the order . I don't have checkout button or anything else

 

my site is www.ecig-vapo.com

Edited by cretbogdan

Share this post


Link to post
Share on other sites

Hello,

 

I am using this module and like it.

 

Can someone tell me if its possible to select users by a specific article the bought.

I want to send a discont coupon to users who bought a specific article.

Now i have to manual select ech customer.

 

Can anybody tell me if this is possible, or perhaps the maker is willing to implement this (pm me please)


Greetings,

 

Henk Bartels

Share this post


Link to post
Share on other sites

Can someone help??

 

I installed over a fresh copy of version 2.3.3

 

im getting this error:

 

1054 - Unknown column 'delivery_date' in 'field list'

 

insert into orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, delivery_date, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, currency, currency_value) values ('1', '##### ####', '', '4234 st nw', '', 'wker', '44', 'Michigan', 'United States', '415-853-4420', .com', '2', 'dos leld', '', '4234ard st nw', '', 'wer', '44', 'Michigan', 'United States', '2', '', 'dlefld', '', '42t nw', '', 'wer', '44', 'Michigan', 'United States', '2', 'Cash on Delivery', '', '', '', '', now(), '1', 'USD', '1.00000000')

 

[TEP STOP]

 

i deleted my personal info....

 

any ideas??!?

Share this post


Link to post
Share on other sites

I am completely new to adding modules. I'm using v2.2 RC2. I have uploaded the files as best I could. In the readme, it says to upload 3 files under 'catalog>...' --- does this mean there should be a catalog directory on my site? Because there isn't. I uploaded those to the root, where I found identical directories when dropping the 'catalog' directory.

 

I was able to find the module under the "modules>order total" directory, and set it up. However, now the instructions are to go login to Admin, then go to Catalog>Discount Coupons to create the coupons. I'm totally stuck. Nowhere in my uploaded store (this is from a template) do I find any directory for Catalog. Any insights?

Share this post


Link to post
Share on other sites

I am completely new to adding modules. I'm using v2.2 RC2. I have uploaded the files as best I could. In the readme, it says to upload 3 files under 'catalog>...' --- does this mean there should be a catalog directory on my site? Because there isn't. I uploaded those to the root, where I found identical directories when dropping the 'catalog' directory.

 

I was able to find the module under the "modules>order total" directory, and set it up. However, now the instructions are to go login to Admin, then go to Catalog>Discount Coupons to create the coupons. I'm totally stuck. Nowhere in my uploaded store (this is from a template) do I find any directory for Catalog. Any insights?

 

some stores use domain.com/catalog some don't, I use mydomain.com/loja , it doesnt matter since you put that files on your store root directory (where index.php product_info.php shopping_cart.php goes)

as far as I know, this is the best coupon contrib for oscommerce 2.2 but its not meant for 2.3 @@dnl07 !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×