Jump to content
Sign in to follow this  
mitchsb

Discount Coupon Code addon

Recommended Posts

OK, as I'm fairly new to Oscommerce and I don't know how to install addons, I have questions.

 

I tried to install the Discount Coupon Code addon today. I did as the instructions say, but I can't get it to work. It said to install these files:

 

catalog/admin/discount_codes.php

catalog/admin/includes/languages/english/discount_codes.php

catalog/includes/modules/order_total/ot_discount.php

 

And to modify catalog/includes/modules/order_total/ot_tax.php file to go from:

 

function process() {

global $order, $currencies, $tax_discount; // Discount Code 3.1.1

 

reset($order->info['tax_groups']);

while (list($key, $value) = each($order->info['tax_groups'])) {

if (!empty($tax_discount[$key])) $value -= $tax_discount[$key]; // Discount Code 3.1.1

if ($value > 0) {

 

to:

 

function process() {

global $order, $currencies;

 

reset($order->info['tax_groups']);

while (list($key, $value) = each($order->info['tax_groups'])) {

if ($value > 0) {

 

I did all of this. However, I can't figure out where to go to install the module. I think I found the place, but I'm not sure. I went to "order total" and installed "MODULE_ORDER_TOTAL_DISCOUNT_TOTAL". I have no idea if this is the right one. But when I looked at it, I got the following:

 

Warning: include(/home/content/88/9452888/html/cart2/catalog/includes/languages/english/modules/order_total/ot_discount.php) [function.include]: failed to open stream: No such file or directory in /home/content/88/9452888/html/cart2/catalog/admin/modules.php on line 129

 

And this:

 

Warning: include() [function.include]: Failed opening '/home/content/88/9452888/html/cart2/catalog/includes/languages/english/modules/order_total/ot_discount.php' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in /home/content/88/9452888/html/cart2/catalog/admin/modules.php on line 129

 

Please help.

Share this post


Link to post
Share on other sites

The errors tells that you have eighter not added the language files for the add-on or you have added them in the wrong place.

Share this post


Link to post
Share on other sites

I've uploaded the same file, discount_codes.php, to the same place, catalog/admin/includes/languages/english/, 4 times now, and I still get the same error.

Share this post


Link to post
Share on other sites

This is the one which is missing

catalog/includes/languages/english/modules/order_total/ot_discount.php

Share this post


Link to post
Share on other sites

OK, I put that in and now I get this:

 

Fatal error: include() [<a href='function.include'>function.include</a>]: Cannot redeclare class ot_discount in /home/content/88/9452888/html/cart2/catalog/admin/modules.php on line 130

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
Sign in to follow this  

×