Jump to content
kgt

[Contribution] Discount Coupon Codes

Recommended Posts

Hi

I installed version 3.31 of this contribution.

I'm just wondering whether the discount is supposed to be applied to the sub-total including shipping? or should it be applied only to the product?

When I tested it, it applied discount to the product price and the shipping. Is this how it is supposed to work?

 

Rgds

mom2ashley

Share this post


Link to post
Share on other sites
The SQL should automatically be run - it is in the catalog/includes/modules/order_total/ot_discount_coupon.php file

 

In your Admin, when you click on "Modules -> Order Total" - is your Discount Coupons module installed with "enable discount coupon" set to true ?

 

I replied to this, but it seems to have vanished. Yes, it is set to True.

Share this post


Link to post
Share on other sites

Which version of osCommerce are you running? This contribution was designed using the 2.2ms2-060817 and it sounds like you are running RC1 ?

 

 

I installed the necessary files and began changing the existing pages. When I reached

-------------------------------------------------------

OPEN catalog/includes/classes/order.php

FIND on line 244:

$shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];

$this->info['subtotal'] += $shown_price;

------------------------------------------------------

Didn’t find “$shown_price = tep….” in the file. I did a search on the folder and couldn't find any line beginning that way.

Also didn't find

------------------

if (DISPLAY_PRICE_WITH_TAX == 'true')

-----------------------

on line 268

 

Can anyone advise?

Thank you.


~Tracy
 

Share this post


Link to post
Share on other sites

In your sites Admin -> Modules -> Order Total

 

The numbers you assign as "Sort Order" determine what order these things show up in on the checkout pages. Figured first we'd check and make sure it isn't just that the discount is being shown after shipping.

 

If the discount is being applied to both shipping and product price - then you need to also double check the coupon you created. Did you set it to a percentage or a fixed dollar amount or as a Shipping Discount?

 

If you set it up as a fixed dollar amount, it will just subtract that dollar amount from the total.

If you set it up as a percentage, it should just subtract that percentage from the subtotal.

If you set it up as a shipping discount then it should only subtract from the shipping amount.

 

 

 

Hi

I installed version 3.31 of this contribution.

I'm just wondering whether the discount is supposed to be applied to the sub-total including shipping? or should it be applied only to the product?

When I tested it, it applied discount to the product price and the shipping. Is this how it is supposed to work?

 

Rgds

mom2ashley


~Tracy
 

Share this post


Link to post
Share on other sites

Hmmm - well, if you are missing the tables in your database, then I'd manually run the SQL in the file I mentioned on your database and see if that helps :huh:

 

I replied to this, but it seems to have vanished. Yes, it is set to True.

~Tracy
 

Share this post


Link to post
Share on other sites
Hmmm - well, if you are missing the tables in your database, then I'd manually run the SQL in the file I mentioned on your database and see if that helps :huh:

 

Done that, doesn't seem to have done the trick.

 

I'm going to have to do something else for now: need to get this sorted tomorrow.

 

But I think the core problem is that the supplied files (as opposed to the ones I had to edit) don't work in this system.

Share this post


Link to post
Share on other sites

I have the module installed, and when I go to Catalog>Discount Coupons, this is the error code showing up.

1054 - Unknown column 'cd.coupons_date_end' in 'order clause'

 

select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit 0, 20

 

Help?

Share this post


Link to post
Share on other sites

Tracy: thanks for your help.

 

I have tracked down the lack of the "invalid coupon code" messages to a line of code on checkout_confirmation (as I guessed)

 

The line is right before your shipping and order_total modules are loaded and this is the line that is correct

 

  if( tep_not_null( $HTTP_POST_VARS['coupon'] ) && is_object( $order->coupon ) ) { //if they have entered something in the coupon field

 

This is what I had for that line of code:

 

  if( tep_not_null( $coupon ) && is_object( $order->coupon ) ) { //if they have entered something in the coupon field

 

Don't know how it happened or why, but it works now and it also is compatible with the paypal direct payments module.

 

Thanks for the source Tracy. You're a lifesaver.


Assault

If you want to find it you'll have to google "Assault T-Shirts" because posting my damn url in my signature is against the forum rules.

T-Shirts with an edge

Powered by OSCommerce + about 20 different custom addons and some Wordpress

Share this post


Link to post
Share on other sites
In your sites Admin -> Modules -> Order Total

 

The numbers you assign as "Sort Order" determine what order these things show up in on the checkout pages. Figured first we'd check and make sure it isn't just that the discount is being shown after shipping.

 

If the discount is being applied to both shipping and product price - then you need to also double check the coupon you created. Did you set it to a percentage or a fixed dollar amount or as a Shipping Discount?

 

If you set it up as a fixed dollar amount, it will just subtract that dollar amount from the total.

If you set it up as a percentage, it should just subtract that percentage from the subtotal.

If you set it up as a shipping discount then it should only subtract from the shipping amount.

 

Thanks for the reply Tracy.

Yes I've checked the 'sort order'. That just determine the order of the discount shown but does not effect the calculation of the discount i.e. applied to the product only or product+shipping. In this case no matter which order it is, the discount is applied, as a percentage to the price of the item and the shipping. - so it's supposed to work this way then?

 

When you said 'If you set it up as a percentage, it should just subtract that percentage from the subtotal." - what does subtotal mean? In my store, I don't charge any tax. It's just the price of the item + shipping. So in this case, which constitutes the sub-total? The price of the item only?

 

Thanks again Tracy.

Share this post


Link to post
Share on other sites

Your very welcome - glad to hear you got it working! Also wanted to say thanks for posting your solution as it will help others down the road :thumbsup:

 

 

Tracy: thanks for your help.

 

I have tracked down the lack of the "invalid coupon code" messages to a line of code on checkout_confirmation (as I guessed)

 

The line is right before your shipping and order_total modules are loaded and this is the line that is correct

 

  if( tep_not_null( $HTTP_POST_VARS['coupon'] ) && is_object( $order->coupon ) ) { //if they have entered something in the coupon field

 

This is what I had for that line of code:

 

  if( tep_not_null( $coupon ) && is_object( $order->coupon ) ) { //if they have entered something in the coupon field

 

Don't know how it happened or why, but it works now and it also is compatible with the paypal direct payments module.

 

Thanks for the source Tracy. You're a lifesaver.


~Tracy
 

Share this post


Link to post
Share on other sites

We don't charge tax either - so at least we know it has nothing to do with the calculations in the tax section :)

 

Your "subtotal" is the total of everything in the cart before shipping and handling charges are applied. So, if they only have one item in the cart, then yes, it the price of that item. If they have 10 items, it is the price of all 10 of those items added together.

 

When creating a coupon you can choose if you want to subtract a specific dollar amount from the entire order, or calculate a percentage discount based on the "subtotal" or "shipping" dollar amounts.

 

 

 

Thanks for the reply Tracy.

Yes I've checked the 'sort order'. That just determine the order of the discount shown but does not effect the calculation of the discount i.e. applied to the product only or product+shipping. In this case no matter which order it is, the discount is applied, as a percentage to the price of the item and the shipping. - so it's supposed to work this way then?

 

When you said 'If you set it up as a percentage, it should just subtract that percentage from the subtotal." - what does subtotal mean? In my store, I don't charge any tax. It's just the price of the item + shipping. So in this case, which constitutes the sub-total? The price of the item only?

 

Thanks again Tracy.


~Tracy
 

Share this post


Link to post
Share on other sites
I have the module installed, and when I go to Catalog>Discount Coupons, this is the error code showing up.

1054 - Unknown column 'cd.coupons_date_end' in 'order clause'

 

select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit 0, 20

 

 

Does anyone know if there is an answer to this?? Please!

Share this post


Link to post
Share on other sites

hello all,

 

I have the below problems with this contribution:

 

1/ when having a shipping cost and coupon value > order total, the order total is shown wrong.

 

2/ when setting percentage discount, prcentage is calculated wrong at all times

 

3/ when setting min order amount, this does not work, min order amount is ignored, (eg coupon = 10, min order is 20, when ordering one item with price 10, disount is applied)

 

I have the discount_coupon_codes_3.3 installed on an off-line server prior to going on-line.

 

I'd like this contri very much but just can't use it right now, can some-one pls help :'(

 

Many thanks

Brgds

Share this post


Link to post
Share on other sites
We don't charge tax either - so at least we know it has nothing to do with the calculations in the tax section :)

 

Your "subtotal" is the total of everything in the cart before shipping and handling charges are applied. So, if they only have one item in the cart, then yes, it the price of that item. If they have 10 items, it is the price of all 10 of those items added together.

 

When creating a coupon you can choose if you want to subtract a specific dollar amount from the entire order, or calculate a percentage discount based on the "subtotal" or "shipping" dollar amounts.

 

Hi Tracy

Ok I got it. It's working now i.e. discounts applied to cart total (excluding shipping). I configured the following under ADMIN-> MODULES->ORDER TOTAL-> DSICOUNT COUPON :

 

Display subtotal with applied discount?

false

 

Thanks so much Tracy!

Share this post


Link to post
Share on other sites
Which version of osCommerce are you running? This contribution was designed using the 2.2ms2-060817 and it sounds like you are running RC1 ?

Thanks for responding. I am very new at this...I didn't even see your response until now, and I've been checking daily, desperately!

And you are correct it's 2.2rc1. What are my options? Will I need to change all of the edited pages back to the originals? I have back-ups so I can do that.

 

No matter what I will still need a way to offer wholesale prices, so if you can point me to a solution, I'd be very grateful.

 

Thank you.

Share this post


Link to post
Share on other sites

First off, this is a great contribution. A BIG Thank you goes out to KGT.

 

Now....I am having 2 problems that I can not seem to solve.

 

1) I have the coupon set to use a percentage for the discount. When I do this, the percentage is being taken off of the shipping and not the product subtotal. I also get this message "Your calculated shipping charges have changed" and then it returns me back to the checkout_shipping.php page. This seems to be a never ending cycle. It continues to go to the checkout_payment and checkout_shipping pages. When I changed the option to discount the shipping everything worked ok. This is weird. PLEASE HELP!!

 

2) The other thing is the discount is not being forwarded to be processed. In other words, when it goes to the confirmation page the discount shows up, but when it goes to the payment processor (plugnpay) it does not show the discount being applied. What do I need to do in order for the amount that is forwarded to already be discounted with the discount?

 

Thanks for your help....I am in desperate need of these fixes ASAP!!!!

 

 

Regards,

J Free

Share this post


Link to post
Share on other sites
First off, this is a great contribution. A BIG Thank you goes out to KGT.

 

Now....I am having 2 problems that I can not seem to solve.

 

1) I have the coupon set to use a percentage for the discount. When I do this, the percentage is being taken off of the shipping and not the product subtotal. I also get this message "Your calculated shipping charges have changed" and then it returns me back to the checkout_shipping.php page. This seems to be a never ending cycle. It continues to go to the checkout_payment and checkout_shipping pages. When I changed the option to discount the shipping everything worked ok. This is weird. PLEASE HELP!!

 

2) The other thing is the discount is not being forwarded to be processed. In other words, when it goes to the confirmation page the discount shows up, but when it goes to the payment processor (plugnpay) it does not show the discount being applied. What do I need to do in order for the amount that is forwarded to already be discounted with the discount?

 

Thanks for your help....I am in desperate need of these fixes ASAP!!!!

Regards,

J Free

 

 

Something weird is happening now. When I turn on the debugging feature in the admin panel, the contribution works fine. It shows the correct discount and does not apply the discount to the shipping. Is it okay to just leave the debugging feature enabled? Will this hurt anything? #2 is still an issue.

 

Thanks,

J Free

Share this post


Link to post
Share on other sites

I have another problem with the discount coupons which I can't figure out. Been searching through the thread and found a person with the same problem but no one replied to them.

 

When in admin/customers/orders and I click on an order which has a discount coupon applied, I have no options underneath the order such as comments, pending, processing or delivered etc. I click on an order which has no discount coupon applied and the options are all there. The orders sit in there as pending....

 

Everything else with the discount coupons seem to be working fine.

 

Please help!!

 

(w00t)

Share this post


Link to post
Share on other sites
hello all,

 

I have the below problems with this contribution:

 

1/ when having a shipping cost and coupon value > order total, the order total is shown wrong.

 

2/ when setting percentage discount, prcentage is calculated wrong at all times

 

3/ when setting min order amount, this does not work, min order amount is ignored, (eg coupon = 10, min order is 20, when ordering one item with price 10, disount is applied)

 

I have the discount_coupon_codes_3.3 installed on an off-line server prior to going on-line.

 

I'd like this contri very much but just can't use it right now, can some-one pls help :'(

 

Many thanks

Brgds

 

Adding to the problem:

 

I don't get any fault message or so when entering a wrong and/or non existing coupon code.

 

I found something that might be realted to shipping cost / order total:

 

In the install instructions it is asked to alter the catalog/includes/modules/shipping/table.php file.

However, I dont use the table shipping method, I use the Multi Table Multi Shipping contribution which has a different code:

 

<?php
/*
 $Id: mzmt.php,v 1.100 2004-11-09 Josh Dechant Exp $

 Copyright © 2004 Josh Dechant

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Protions Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 class mzmt {
   var $code, $title, $description, $icon, $enabled, $num_zones, $num_tables, $delivery_geozone, $geozone_mode, $order_total;

   function mzmt() {
     global $order;

     $this->code = 'mzmt';
     $this->title = MODULE_SHIPPING_MZMT_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_MZMT_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_MZMT_SORT_ORDER;
     $this->tax_class = MODULE_SHIPPING_MZMT_TAX_CLASS;
     $this->enabled = ((MODULE_SHIPPING_MZMT_STATUS == 'True') ? true : false);

     $this->num_geozones = MODULE_SHIPPING_MZMT_NUMBER_GEOZONES;
     $this->num_tables = MODULE_SHIPPING_MZMT_NUMBER_TABLES;

     if ($this->enabled == true) {
       $this->enabled = false;
       for ($n=1; $n<=$this->num_geozones; $n++) {
         if ( ((int)constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID') > 0) && ((int)constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID') == $this->getGeoZoneID($order->delivery['country']['id'], $order->delivery['zone_id'])) ) {
           $this->enabled = true;
           $this->delivery_geozone = $n;
           break;
         } elseif ( ((int)constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID') == 0) && ($n == (int)$this->num_geozones) ) {
           $this->enabled = true;
           $this->delivery_geozone = $n;
           break;
         }
       }
     }
   }

// class methods
   function quote($method = '') {
     global $order;

     $this->quotes = array('id' => $this->code,
                           'module' => constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TEXT_TITLE') . ' (' . $shipping_weight . ' lbs)',
                           'methods' => array());

     $this->determineTableMethod(constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_MODE'));  

     if ($method) {
       $j = substr($method, 5);

       $shipping = $this->determineShipping(split("[:,]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j)));

       $this->quotes['methods'][] = array('id' => 'table' . $j,
                                          'title' => constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j . '_TEXT_WAY'),
                                          'cost' => $shipping + constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_HANDLING'));
     } else {
       for ($j=1; $j<=$this->num_tables; $j++) {
         if (!tep_not_null(constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j))) continue;

         $shipping = $this->determineShipping(split("[:,]" , constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j)));

         $this->quotes['methods'][] = array('id' => 'table' . $j,
                                            'title' => constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j . '_TEXT_WAY'),
                                            'cost' => $shipping + constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_HANDLING'));
       }
     }

     if ($this->tax_class > 0) {
       $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }

     if (tep_not_null(constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_ICON'))) $this->quotes['icon'] = tep_image(DIR_WS_ICONS . constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_ICON'), $this->title);

     return $this->quotes;
   }  

   function check() {
     if (!isset($this->_check)) {
       $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_MZMT_STATUS'");
       $this->_check = mysql_num_rows($check_query);
     }
     return $this->_check;
   }

   function install() {
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable MultiRegion MultiTable Method', 'MODULE_SHIPPING_MZMT_STATUS', 'True', 'Do you want to offer multi-region multi-table rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_MZMT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_MZMT_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");

     for ($n=1; $n<=$this->num_geozones; $n++) {
       tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('<hr />Geo Zone $n', 'MODULE_SHIPPING_MZMT_GEOZONE_{$n}_ID', '', 'Enable this for the following geo zone.', '6', '0', 'tep_get_zone_class_title', '_cfg_pull_down_geozones(', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Geo Zone $n Table Method', 'MODULE_SHIPPING_MZMT_GEOZONE_{$n}_MODE', 'weight', 'The shipping cost is based on the total weight, total price, or total count of the items ordered.', '6', '0', 'tep_cfg_select_option(array(\'weight\', \'price\', \'count\'), ', now())");

       for ($j=1; $j<=$this->num_tables; $j++) {
         tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Geo Zone $n Shipping Table $j', 'MODULE_SHIPPING_MZMT_GEOZONE_{$n}_TABLE_{$j}', '', 'Shipping table $j for this geo zone', '6', '0', now())");
       }

       tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Geo Zone $n Handling Fee', 'MODULE_SHIPPING_MZMT_GEOZONE_{$n}_HANDLING', '0', 'Handling Fee for this shipping geo zone', '6', '0', now())");
     }
   }

   function remove() {
     tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
   }

   function keys() {
     $keys = array('MODULE_SHIPPING_MZMT_STATUS', 'MODULE_SHIPPING_MZMT_TAX_CLASS', 'MODULE_SHIPPING_MZMT_SORT_ORDER');

     for ($n=1; $n<=$this->num_geozones; $n++) {
       $keys[] = 'MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID';
       $keys[] = 'MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_MODE';
       $keys[] = 'MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_HANDLING';

       for ($j=1; $j<=$this->num_tables; $j++) {
         $keys[] = 'MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_TABLE_' . $j;
       }
     }

     return $keys;
   }

   function determineTableMethod($geozone_mode) {
     global $total_count, $shipping_weight;

     $this->geozone_mode = $geozone_mode;

     if ($this->geozone_mode == 'price') {
             [b]$this->order_total = $_SESSION['cart']->show_total();[/b]
           } elseif ($this->geozone_mode == 'count') {
       $this->order_total = $total_count;
     } else {
       $this->order_total = $shipping_weight;
     }

     return true;    
   }

   function determineShipping($table_cost) {
     global $shipping_num_boxes;

     for ($i=0, $n=sizeof($table_cost); $i<$n; $i+=2) {
       if ($this->order_total >= $table_cost[$i]) {
         $shipping_factor = $table_cost[$i+1];
       }
     }

     if (substr_count($shipping_factor, '%') > 0) {
       $shipping = ((($this->order_total*10)/10)*((str_replace('%', '', $shipping_factor))/100));
     } else {
       $shipping = str_replace('$', '', $shipping_factor);
     }

     if ($this->geozone_mode == 'weight') {
       $shipping = $shipping * $shipping_num_boxes;
     }

     return $shipping;
   }

   function getGeoZoneID($country_id, $zone_id) {
     // First, check for a Geo Zone that explicity includes the country & specific zone (useful for splitting countries with zones up)
     $zone_query = tep_db_query("select gz.geo_zone_id from " . TABLE_GEO_ZONES . " gz left join " . TABLE_ZONES_TO_GEO_ZONES . " ztgz on (gz.geo_zone_id = ztgz.geo_zone_id) where ztgz.zone_country_id = '" . (int)$country_id . "' and ztgz.zone_id = '" . (int)$zone_id . "' and LOWER(gz.geo_zone_name) like 'shp%'");

     if (mysql_num_rows($zone_query)) {
       $zone = mysql_fetch_assoc($zone_query);
       return $zone['geo_zone_id'];
     } else {
       // No luck…  Now check for a Geo Zone for the country and "All Zones" of the country.
       $zone_query = tep_db_query("select gz.geo_zone_id from " . TABLE_GEO_ZONES . " gz left join " . TABLE_ZONES_TO_GEO_ZONES . " ztgz on (gz.geo_zone_id = ztgz.geo_zone_id) where ztgz.zone_country_id = '" . (int)$country_id . "' and (ztgz.zone_id = '0' or ztgz.zone_id is NULL) and LOWER(gz.geo_zone_name) like 'shp%'");

       if (mysql_num_rows($zone_query)) {
         $zone = mysql_fetch_assoc($zone_query);
         return $zone['geo_zone_id'];
       } else {
         return false;
       }
     }
   }

 }

 function _cfg_pull_down_geozones($zone_class_id, $key = '') {
   $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');

   $zone_class_array = array(array('id' => '0', 'text' => 'Rest of the World'));
   $zone_class_query = tep_db_query("select geo_zone_id, geo_zone_name from " . TABLE_GEO_ZONES . " where LOWER(geo_zone_name) like 'shp%' order by geo_zone_name");

   while ($zone_class = mysql_fetch_assoc($zone_class_query)) {
     $zone_class_array[] = array('id' => $zone_class['geo_zone_id'],
                                 'text' => $zone_class['geo_zone_name']);
   }

   return tep_draw_pull_down_menu($name, $zone_class_array, $zone_class_id);
 }
?>

 

The line in bold is what I believe needs to be changed, however I have been unsucsesful so far...

 

Any help would be greatly appriciated! :thumbsup:

Share this post


Link to post
Share on other sites
I am having trouble with getting error messages to return on any of the initial discount_coupon class errors as well as the ones that are supposed to be URL encoded. I do not receive errors when customers enter an invalid code, or when they enter a code that has a minimum amount when they haven't reached the minimum amount. I have installed the STS template system as well as the Paypal direct payments module.

 

The module does work if you enter a valid code and it deducts items automatically, but any incorrect codes simply return you to the checkout_confirmation.php with no errors or code discount...

 

As far as I can tell everything initializes properly, but no errors are echoing out. I've even added this line to my checkout_payment.php like the "common problems" of the readme tell you to:

 

This might be a stupid input, but I just found out myself that when you turn the debug mode of in admin, customers will see the error messages.

 

Although I currently still have problems with the minimum amount...

 

Hope this helps. :thumbsup:

Share this post


Link to post
Share on other sites
I have another problem with the discount coupons which I can't figure out. Been searching through the thread and found a person with the same problem but no one replied to them.

 

When in admin/customers/orders and I click on an order which has a discount coupon applied, I have no options underneath the order such as comments, pending, processing or delivered etc. I click on an order which has no discount coupon applied and the options are all there. The orders sit in there as pending....

 

Everything else with the discount coupons seem to be working fine.

 

Please help!!

 

(w00t)

 

 

Does anyone know how to fix this???????

Share this post


Link to post
Share on other sites

i have a problem right now... everything works fine but after checking out and redirecting to paypal, paypal didn't subtract the discounted rate... can u please help me?

Share this post


Link to post
Share on other sites

Have you tried this fix?

http://forums.oscommerce.com/index.php?s=&...st&p=953550

 

If that doesn't fix it - go to http://www.google.com

In the search box enter this

site:forums.oscommerce.com 1054 - Unknown column 'cd.coupons_date_end' in 'order clause'

 

There are 7 different results to review for possible answers :thumbsup:

 

 

Does anyone know if there is an answer to this?? Please!

~Tracy
 

Share this post


Link to post
Share on other sites

I've not yet started using the RC1 release, so I don't know how to modify the contributions to get them working correctly with rc1.

 

In the meantime - I know Separate Price Per Customer has a version released for RC1 - which would allow you to setup "retail" and "wholesale" groups on your website. That way, when a customer logs in, they will see the prices for their group. Maybe that is what you are looking for? I utilize SPPC along with DCC to allow for discounts specific to each price group as well ;)

 

Thanks for responding. I am very new at this...I didn't even see your response until now, and I've been checking daily, desperately!

And you are correct it's 2.2rc1. What are my options? Will I need to change all of the edited pages back to the originals? I have back-ups so I can do that.

 

No matter what I will still need a way to offer wholesale prices, so if you can point me to a solution, I'd be very grateful.

 

Thank you.


~Tracy
 

Share this post


Link to post
Share on other sites

Have you installed the additional bits for Paypal (downloadable on the Discount Coupon Codes Contribution Download page)

 

i have a problem right now... everything works fine but after checking out and redirecting to paypal, paypal didn't subtract the discounted rate... can u please help me?

~Tracy
 

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

×