Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * - - 3 votes

[add-on] Discount Code (support)


107 replies to this topic

#101 polepositions

  • Community Member
  • 37 posts
  • Real Name:Carlene Spiteri

Posted 19 April 2012, 10:37

I have downloaded the package and installed the files..

I'm now trying to do the following:


1. Perform the SQL query to your osCommerce database.

ALTER TABLE `discount_codes` ADD `exclude_specials` TINYINT( 1 ) NOT NULL AFTER `order_info` ;
Can someone give me some guidance on how to do this, I'm a newby at the stuff..
I have gone into phpMyAdmin and opened the database I need, but not sure what to do next..

#102 Yeti-Erotik

  • Community Member
  • 3 posts
  • Real Name:Nico
  • Gender:Male

Posted 06 May 2012, 15:15

Hello

I'm using osCommerce Online Merchant v2.3.1 and tried to install the Discount Code.

After applying everything, it was working fine to create discount codes. But when a customer has put some articles into the shopping cart, he was not able to checkout. So he was able to display the shopping cart, but when he was clicking on "checkout" then nothing happened, just the page reloaded...

Can anyone help me please?

Thank you!!!

#103 Yeti-Erotik

  • Community Member
  • 3 posts
  • Real Name:Nico
  • Gender:Male

Posted 06 May 2012, 16:15

I took some backup files and now it's working again...

#104 Yeti-Erotik

  • Community Member
  • 3 posts
  • Real Name:Nico
  • Gender:Male

Posted 06 May 2012, 19:11

Everything's set now, but the discount doesn't get calculated at the end :mellow:

I'm now sitting the whole sunday in front of this addon and it's not getting to an end, could anyone help me please? What could be the problem?

In the instruction there is written the following:
7. Modify the catalog/checkout_process.php file.
Find:
//------insert customer choosen option eof ----
    $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
    $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
    $total_cost += $total_products_price;
    $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
  }
Add after:
  // Discount Code 2.3 - start
  if (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true') {
    if (!empty($discount)) {
	  $discount_codes_query = tep_db_query("select discount_codes_id from " . TABLE_DISCOUNT_CODES . " where discount_codes = '" . tep_db_input($sess_discount_code) . "'");
	  $discount_codes = tep_db_fetch_array($discount_codes_query);
	  tep_db_perform(TABLE_CUSTOMERS_TO_DISCOUNT_CODES, array('customers_id' => $customer_id, 'discount_codes_id' => $discount_codes['discount_codes_id']));
	  tep_db_query("update " . TABLE_DISCOUNT_CODES . " set number_of_orders = number_of_orders + 1 where discount_codes_id = '" . (int)$discount_codes['discount_codes_id'] . "'");
	  tep_session_unregister('sess_discount_code');
    }
  }
  // Discount Code 2.3 - end

But in my checkout_process.php file there is no code like this, it's looking a bit different:
//------insert customer choosen option eof ----
    $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
  }

could it be related to this? what do I need to do so that it will finally work?

#105 jamessk

  • Community Member
  • 16 posts
  • Real Name:James Kelly

Posted 14 May 2012, 15:04

Hi, I have the same problem, does anyone know how to resolve this? It seems the discount codes are not being recognised when input during the checkout process

Please help

#106 jamessk

  • Community Member
  • 16 posts
  • Real Name:James Kelly

Posted 14 May 2012, 21:03

Is it possible to change the discount code from a 8 character code to a 10 character code? Thanks

#107 mikendeb1202

  • Community Member
  • 2 posts
  • Real Name:Michael Santos

Posted 21 May 2012, 01:41

I can tell you it is because it is "skipping" the order total.php when you use the paypal express module. I am having the same problem. It was quick and easy to install and set up but it's not set up to be used with the PP module. I just contacted the creators of the add-on and I am awaiting a response.

#108 mikendeb1202

  • Community Member
  • 2 posts
  • Real Name:Michael Santos

Posted 21 May 2012, 22:09

The creators of the module just wrote back to me, and just need to install the PalPal support update on this page:
http://high-quality-php-coding.com/discount_code_for_oscommerce_2.3.1.html