ramel_l2 Posted November 1, 2006 Share Posted November 1, 2006 Here is the order page $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID, 'currency' => $currency, 'currency_value' => $currencies->currencies[$currency]['value'], 'payment_method' => $payment, 'cc_type' => (isset($GLOBALS['cc_type']) ? $GLOBALS['cc_type'] : ''), 'cc_owner' => (isset($GLOBALS['cc_owner']) ? $GLOBALS['cc_owner'] : ''), 'cc_number' => (isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : ''), 'cc_expires' => (isset($GLOBALS['cc_expires']) ? $GLOBALS['cc_expires'] : ''), 'shipping_method' => $shipping['title'], 'shipping_cost' => $shipping['cost'], 'subtotal' => 0, 'tax' => 0, 'tax_groups' => array(), //kgt - discount coupons 'coupon' => (isset($GLOBALS['coupon']) = $GLOBALS['coupon'] : ''), 'applied_discount' => array(), //end kgt - discount coupons 'comments' => (isset($GLOBALS['comments']) ? $GLOBALS['comments'] : '')); if (isset($GLOBALS[$payment]) && is_object($GLOBALS[$payment])) { $this->info['payment_method'] = $GLOBALS[$payment]->title; if ( isset($GLOBALS[$payment]->order_status) && is_numeric($GLOBALS[$payment]->order_status) && ($GLOBALS[$payment]->order_status > 0) ) { $this->info['order_status'] = $GLOBALS[$payment]->order_status; } } $this->customer = array('firstname' => $customer_address['customers_firstname'], 'lastname' => $customer_address['customers_lastname'], 'company' => $customer_address['entry_company'], 'street_address' => $customer_address['entry_street_address'], 'suburb' => $customer_address['entry_suburb'], 'city' => $customer_address['entry_city'], 'postcode' => $customer_address['entry_postcode'], 'state' => ((tep_not_null($customer_address['entry_state'])) ? $customer_address['entry_state'] : $customer_address['zone_name']), 'zone_id' => $customer_address['entry_zone_id'], 'country' => array('id' => $customer_address['countries_id'], 'title' => $customer_address['countries_name'], 'iso_code_2' => $customer_address['countries_iso_code_2'], 'iso_code_3' => $customer_address['countries_iso_code_3']), 'format_id' => $customer_address['address_format_id'], 'telephone' => $customer_address['customers_telephone'], 'email_address' => $customer_address['customers_email_address']); $this->delivery = array('firstname' => $shipping_address['entry_firstname'], 'lastname' => $shipping_address['entry_lastname'], 'company' => $shipping_address['entry_company'], 'street_address' => $shipping_address['entry_street_address'], 'suburb' => $shipping_address['entry_suburb'], 'city' => $shipping_address['entry_city'], 'postcode' => $shipping_address['entry_postcode'], 'state' => ((tep_not_null($shipping_address['entry_state'])) ? $shipping_address['entry_state'] : $shipping_address['zone_name']), 'zone_id' => $shipping_address['entry_zone_id'], 'country' => array('id' => $shipping_address['countries_id'], 'title' => $shipping_address['countries_name'], 'iso_code_2' => $shipping_address['countries_iso_code_2'], 'iso_code_3' => $shipping_address['countries_iso_code_3']), 'country_id' => $shipping_address['entry_country_id'], 'format_id' => $shipping_address['address_format_id']); $this->billing = array('firstname' => $billing_address['entry_firstname'], 'lastname' => $billing_address['entry_lastname'], 'company' => $billing_address['entry_company'], 'street_address' => $billing_address['entry_street_address'], 'suburb' => $billing_address['entry_suburb'], 'city' => $billing_address['entry_city'], 'postcode' => $billing_address['entry_postcode'], 'state' => ((tep_not_null($billing_address['entry_state'])) ? $billing_address['entry_state'] : $billing_address['zone_name']), 'zone_id' => $billing_address['entry_zone_id'], 'country' => array('id' => $billing_address['countries_id'], 'title' => $billing_address['countries_name'], 'iso_code_2' => $billing_address['countries_iso_code_2'], 'iso_code_3' => $billing_address['countries_iso_code_3']), 'country_id' => $billing_address['entry_country_id'], 'format_id' => $billing_address['address_format_id']); $index = 0; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $this->products[$index] = array('qty' => $products[$i]['quantity'], 'name' => $products[$i]['name'], 'model' => $products[$i]['model'], 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'price' => $products[$i]['price'], 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), 'weight' => $products[$i]['weight'], 'id' => $products[$i]['id']); if ($products[$i]['attributes']) { $subindex = 0; reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $attributes_query = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'"); $attributes = tep_db_fetch_array($attributes_query); $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options_name'], 'value' => $attributes['products_options_values_name'], 'option_id' => $option, 'value_id' => $value, 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price']); $subindex++; } } //kgt - discount coupon if( !empty( $this->info['coupon'] ) ) { if( !isset( $this_coupon ) ) { require_once( DIR_WS_CLASSES . 'discount_coupon.php' ); $this_coupon = new discount_coupon( $this->info['coupon'] ); } $applied_discount = $this_coupon->calculate_discount( $this->products[$index], $n ); if( isset( $this->info['applied_discount'][$this->products[$index]['tax_description']] ) ) { $this->info['applied_discount'][$this->products[$index]['tax_description']] += $applied_discount; } else { $this->info['applied_discount'][$this->products[$index]['tax_description']] = $applied_discount; } $this_actual_shown_price = null; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax $this_actual_shown_price = ( tep_add_tax( $this->products[$index]['final_price'], $this->products[$index]['tax'] ) * $this->products[$index]['qty'] ) - $applied_discount; $applied_discount = 0; } } $shown_price = ( tep_add_tax( $this->products[$index]['final_price'], $this->products[$index]['tax'] ) * $this->products[$index]['qty'] ) - $applied_discount; $this->info['subtotal'] += $shown_price; //if we need to display the subtotal without the discount applied, then add the shown price to the subtotal, then change shown price to the price with the applied discount in order to properly calculate taxes if( isset( $this_actual_shown_price ) ) $shown_price = $this_actual_shown_price; //end kgt - discount coupon $products_tax = $this->products[$index]['tax']; $products_tax_description = $this->products[$index]['tax_description']; if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->info['tax'] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); if (isset($this->info['tax_groups']["$products_tax_description"])) { $this->info['tax_groups']["$products_tax_description"] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); } else { $this->info['tax_groups']["$products_tax_description"] = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); } } else { $this->info['tax'] += ($products_tax / 100) * $shown_price; if (isset($this->info['tax_groups']["$products_tax_description"])) { $this->info['tax_groups']["$products_tax_description"] += ($products_tax / 100) * $shown_price; } else { $this->info['tax_groups']["$products_tax_description"] = ($products_tax / 100) * $shown_price; } } $index++; } if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost']; } else { $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost']; } //kgt - discount coupon if( !empty( $this->info['coupon'] ) && MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { foreach( $this->info['applied_discount'] as $discount ){ $this->info['total'] -= $discount; } } //end kgt - discount coupon } } ?> Quote Link to comment Share on other sites More sharing options...
kgt Posted November 1, 2006 Author Share Posted November 1, 2006 Here is the order page $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID, 'currency' => $currency, 'currency_value' => $currencies->currencies[$currency]['value'], 'payment_method' => $payment, SNIP I have no way of knowing what line the error is happening on because you neither marked it, nor gave me the whole file. So I'd have to look through every line of what you posted and make a guess. Please either mark the line on which the error is occurring or send the whole thing. Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
ramel_l2 Posted November 1, 2006 Share Posted November 1, 2006 (edited) Sorry about that I marked it in red its Line 167 where the if statement is thanks for the help. error message: Parse error: parse error, unexpected T_IF, expecting ')' in /home/blingtee/public_html/store/catalog/includes/classes/order.php on line 167 $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID, 'currency' => $currency, 'currency_value' => $currencies->currencies[$currency]['value'], 'payment_method' => $payment, 'cc_type' => (isset($GLOBALS['cc_type']) ? $GLOBALS['cc_type'] : ''), 'cc_owner' => (isset($GLOBALS['cc_owner']) ? $GLOBALS['cc_owner'] : ''), 'cc_number' => (isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : ''), 'cc_expires' => (isset($GLOBALS['cc_expires']) ? $GLOBALS['cc_expires'] : ''), 'shipping_method' => $shipping['title'], 'shipping_cost' => $shipping['cost'], 'subtotal' => 0, 'tax' => 0, 'tax_groups' => array(), //kgt - discount coupons 'coupon' => (isset($GLOBALS['coupon']) = $GLOBALS['coupon'] : ''), 'applied_discount' => array(), //end kgt - discount coupons 'comments' => (isset($GLOBALS['comments']) ? $GLOBALS['comments'] : '')); if (isset($GLOBALS[$payment]) && is_object($GLOBALS[$payment])) {$this->info['payment_method'] = $GLOBALS[$payment]->title; if ( isset($GLOBALS[$payment]->order_status) && is_numeric($GLOBALS[$payment]->order_status) && ($GLOBALS[$payment]->order_status > 0) ) { $this->info['order_status'] = $GLOBALS[$payment]->order_status; } } $this->customer = array('firstname' => $customer_address['customers_firstname'], 'lastname' => $customer_address['customers_lastname'], 'company' => $customer_address['entry_company'], 'street_address' => $customer_address['entry_street_address'], 'suburb' => $customer_address['entry_suburb'], 'city' => $customer_address['entry_city'], 'postcode' => $customer_address['entry_postcode'], 'state' => ((tep_not_null($customer_address['entry_state'])) ? $customer_address['entry_state'] : $customer_address['zone_name']), 'zone_id' => $customer_address['entry_zone_id'], 'country' => array('id' => $customer_address['countries_id'], 'title' => $customer_address['countries_name'], 'iso_code_2' => $customer_address['countries_iso_code_2'], 'iso_code_3' => $customer_address['countries_iso_code_3']), 'format_id' => $customer_address['address_format_id'], 'telephone' => $customer_address['customers_telephone'], 'email_address' => $customer_address['customers_email_address']); $this->delivery = array('firstname' => $shipping_address['entry_firstname'], 'lastname' => $shipping_address['entry_lastname'], 'company' => $shipping_address['entry_company'], 'street_address' => $shipping_address['entry_street_address'], 'suburb' => $shipping_address['entry_suburb'], 'city' => $shipping_address['entry_city'], 'postcode' => $shipping_address['entry_postcode'], 'state' => ((tep_not_null($shipping_address['entry_state'])) ? $shipping_address['entry_state'] : $shipping_address['zone_name']), 'zone_id' => $shipping_address['entry_zone_id'], 'country' => array('id' => $shipping_address['countries_id'], 'title' => $shipping_address['countries_name'], 'iso_code_2' => $shipping_address['countries_iso_code_2'], 'iso_code_3' => $shipping_address['countries_iso_code_3']), 'country_id' => $shipping_address['entry_country_id'], 'format_id' => $shipping_address['address_format_id']); $this->billing = array('firstname' => $billing_address['entry_firstname'], 'lastname' => $billing_address['entry_lastname'], 'company' => $billing_address['entry_company'], 'street_address' => $billing_address['entry_street_address'], 'suburb' => $billing_address['entry_suburb'], 'city' => $billing_address['entry_city'], 'postcode' => $billing_address['entry_postcode'], 'state' => ((tep_not_null($billing_address['entry_state'])) ? $billing_address['entry_state'] : $billing_address['zone_name']), 'zone_id' => $billing_address['entry_zone_id'], 'country' => array('id' => $billing_address['countries_id'], 'title' => $billing_address['countries_name'], 'iso_code_2' => $billing_address['countries_iso_code_2'], 'iso_code_3' => $billing_address['countries_iso_code_3']), 'country_id' => $billing_address['entry_country_id'], 'format_id' => $billing_address['address_format_id']); $index = 0; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $this->products[$index] = array('qty' => $products[$i]['quantity'], 'name' => $products[$i]['name'], 'model' => $products[$i]['model'], 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'price' => $products[$i]['price'], 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), 'weight' => $products[$i]['weight'], 'id' => $products[$i]['id']); if ($products[$i]['attributes']) { $subindex = 0; reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $attributes_query = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'"); $attributes = tep_db_fetch_array($attributes_query); $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options_name'], 'value' => $attributes['products_options_values_name'], 'option_id' => $option, 'value_id' => $value, 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price']); $subindex++; } } //kgt - discount coupon if( !empty( $this->info['coupon'] ) ) { if( !isset( $this_coupon ) ) { require_once( DIR_WS_CLASSES . 'discount_coupon.php' ); $this_coupon = new discount_coupon( $this->info['coupon'] ); } $applied_discount = $this_coupon->calculate_discount( $this->products[$index], $n ); if( isset( $this->info['applied_discount'][$this->products[$index]['tax_description']] ) ) { $this->info['applied_discount'][$this->products[$index]['tax_description']] += $applied_discount; } else { $this->info['applied_discount'][$this->products[$index]['tax_description']] = $applied_discount; } $this_actual_shown_price = null; if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax $this_actual_shown_price = ( tep_add_tax( $this->products[$index]['final_price'], $this->products[$index]['tax'] ) * $this->products[$index]['qty'] ) - $applied_discount; $applied_discount = 0; } } $shown_price = ( tep_add_tax( $this->products[$index]['final_price'], $this->products[$index]['tax'] ) * $this->products[$index]['qty'] ) - $applied_discount; $this->info['subtotal'] += $shown_price; //if we need to display the subtotal without the discount applied, then add the shown price to the subtotal, then change shown price to the price with the applied discount in order to properly calculate taxes if( isset( $this_actual_shown_price ) ) $shown_price = $this_actual_shown_price; //end kgt - discount coupon $products_tax = $this->products[$index]['tax']; $products_tax_description = $this->products[$index]['tax_description']; if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->info['tax'] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); if (isset($this->info['tax_groups']["$products_tax_description"])) { $this->info['tax_groups']["$products_tax_description"] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); } else { $this->info['tax_groups']["$products_tax_description"] = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax))); } } else { $this->info['tax'] += ($products_tax / 100) * $shown_price; if (isset($this->info['tax_groups']["$products_tax_description"])) { $this->info['tax_groups']["$products_tax_description"] += ($products_tax / 100) * $shown_price; } else { $this->info['tax_groups']["$products_tax_description"] = ($products_tax / 100) * $shown_price; } } $index++; } if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost']; } else { $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost']; } //kgt - discount coupon if( !empty( $this->info['coupon'] ) && MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { foreach( $this->info['applied_discount'] as $discount ){ $this->info['total'] -= $discount; } } //end kgt - discount coupon } } ?> Edited November 1, 2006 by ramel_l2 Quote Link to comment Share on other sites More sharing options...
kgt Posted November 1, 2006 Author Share Posted November 1, 2006 Sorry about that I marked it in red its Line 167 where the if statement is thanks for the help.error message: Parse error: parse error, unexpected T_IF, expecting ')' in /home/blingtee/public_html/store/catalog/includes/classes/order.php on line 167 $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID, 'currency' => $currency, 'currency_value' => $currencies->currencies[$currency]['value'], 'payment_method' => $payment, 'cc_type' => (isset($GLOBALS['cc_type']) ? $GLOBALS['cc_type'] : ''), 'cc_owner' => (isset($GLOBALS['cc_owner']) ? $GLOBALS['cc_owner'] : ''), 'cc_number' => (isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : ''), 'cc_expires' => (isset($GLOBALS['cc_expires']) ? $GLOBALS['cc_expires'] : ''), 'shipping_method' => $shipping['title'], 'shipping_cost' => $shipping['cost'], 'subtotal' => 0, 'tax' => 0, 'tax_groups' => array(), //kgt - discount coupons 'coupon' => (isset($GLOBALS['coupon']) = $GLOBALS['coupon'] : ''), 'applied_discount' => array(), This last line is the problem. You must have edited it at some point, since I double-checked the install instructions and they look correct. The line should be: 'coupon' => (isset($GLOBALS['coupon']) ? $GLOBALS['coupon'] : ''), 'applied_discount' => array(), Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
ramel_l2 Posted November 2, 2006 Share Posted November 2, 2006 Thanks I changed it but it still gives the error--- Parse error: parse error, unexpected T_IF, expecting ')' in /home/blingtee/public_html/store/catalog/includes/classes/order.php on line 167 Is it the IF? Quote Link to comment Share on other sites More sharing options...
ramel_l2 Posted November 2, 2006 Share Posted November 2, 2006 I played around with it and it works thanks Quote Link to comment Share on other sites More sharing options...
nudylady Posted November 3, 2006 Share Posted November 3, 2006 Posted by: kgt Jun 14 2006, 12:00 AM Since you're using the itemized function, you're allowing Paypal to recalculate the shopping cart total. Not only will the subtotal be wrong, but so will tax. In order for this to work, you either need to use the Aggregate cart for Paypal, or change the code for your Paypal payment module to send the discounted products prices. This would mean that the confirmation page on your site would look like this: 1 x Item 1 $9.99 ------------------- Discount: -$1.00 Subtotal: $8.99 Tax (assume 5%): $0.45 S&H: $5.00 Total: $14.44 And this is how it would look in Paypal: 1 x Item 1 $8.99 ------------------- Tax: $0.45 S&H: $5.00 Total: $14.44 So Paypal would display a different product price in order to trick it into calculating the correct total. I want to use itemised function passing to paypal. I am using oscommerce paypal_IPN contribution. Any one has the code for this paypal module? Quote Link to comment Share on other sites More sharing options...
kgt Posted November 3, 2006 Author Share Posted November 3, 2006 I want to use itemised function passing to paypal. I am using oscommerce paypal_IPN contribution. Any one has the code for this paypal module? I doubt it. I don't get the impression that anyone tried to get discounts working with itemized paypal carts. It's a problem for all discount contributions, since paypal doesn't have a way to specify a discount. Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
ACB-MWP Posted November 3, 2006 Share Posted November 3, 2006 You've probably uploaded something wrong. I'm not sure. Class ot_discount_coupon is not defined in includes/classes/discount_coupon.php. Hi Kristen, This is pretty baffling to me, too. I get a similar error, except it specifies line 0 in includes/classes/discount_coupon.php. I've read through the common_problems.txt file, and this entire support thread, and I've commented out the "require_once" lines but to no avail. I've even gone so far as to search the entire catalog installation for instances of ot_discount_coupon and only found it in catalog/includes/modules/order_total/ and in catalog/includes/modules/order_total. The weirdest thing is that if I completely delete both instances of the file, the error no longer appears and i can see the module in the control panel. I know I don't have one of these files anywhere else... -- Arden Quote Link to comment Share on other sites More sharing options...
kgt Posted November 3, 2006 Author Share Posted November 3, 2006 Hi Kristen, This is pretty baffling to me, too. I get a similar error, except it specifies line 0 in includes/classes/discount_coupon.php. I've read through the common_problems.txt file, and this entire support thread, and I've commented out the "require_once" lines but to no avail. I've even gone so far as to search the entire catalog installation for instances of ot_discount_coupon and only found it in catalog/includes/modules/order_total/ and in catalog/includes/modules/order_total. What is the exact error you get? Does includes/classes/discount_coupon.php have any code referring to ot_discount_coupon? Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
ACB-MWP Posted November 3, 2006 Share Posted November 3, 2006 What is the exact error you get? Does includes/classes/discount_coupon.php have any code referring to ot_discount_coupon? I think I found my error. I must have copied a single ot_discount_coupon.php to both places, instead of one of each unique-but-identically-named file to its respective location. Now that I reloaded the files to the correct locations everything seems to be working. Sorry for the false alarm, and thank you for putting the effort into not only developing this add-on, but for the obvious effort you're putting into supporting it. -- Arden Quote Link to comment Share on other sites More sharing options...
teksun Posted November 4, 2006 Share Posted November 4, 2006 Well I did an install on one website last week and it works great. The one this week is not cooperating. Seems to be doubling the price. Sorry if this has been addressed but I have now been up for 24 hours. Quote Link to comment Share on other sites More sharing options...
Jari646 Posted November 5, 2006 Share Posted November 5, 2006 Thank you for those who have developed this great contribution! I have just installed it, and I wonder is there possibility to give some specific discount, example 20 euros? Quote Link to comment Share on other sites More sharing options...
JamesS Posted November 6, 2006 Share Posted November 6, 2006 I have added this contribution and when I try to add a coupon I get this message: 1054 - Unknown column 'coupons_max_order' in 'field list' insert into discount_coupons ( coupons_id, coupons_description, coupons_discount_percent, coupons_date_start, coupons_date_end, coupons_max_use, coupons_min_order, coupons_max_order, coupons_number_available) values ('james', 'james', '1', "2006-07-20", "2007-07-20", 1, 5, 5, 0) Does anyone have any ideas? I could really use your help. Quote Link to comment Share on other sites More sharing options...
tomliuwhite Posted November 7, 2006 Share Posted November 7, 2006 Could we give a customer free shipping if they have a certain coupon code? Quote Link to comment Share on other sites More sharing options...
JamesS Posted November 7, 2006 Share Posted November 7, 2006 I have added this contribution and when I try to add a coupon I get this message: 1054 - Unknown column 'coupons_max_order' in 'field list' insert into discount_coupons ( coupons_id, coupons_description, coupons_discount_percent, coupons_date_start, coupons_date_end, coupons_max_use, coupons_min_order, coupons_max_order, coupons_number_available) values ('james', 'james', '1', "2006-07-20", "2007-07-20", 1, 5, 5, 0) Does anyone have any ideas? I could really use your help. To add to my last post: I also get this message when I run the query in MyPHPadmin - SQL query: ALTER TABLE discount_coupons CHANGE date_start coupons_date_start DATETIME DEFAULT NULL ; MySQL said: #1054 - Unknown column 'date_start' in 'discount_coupons' And every query thereafter except for the final query asked to run in the 2.0 update. Thanks for your help in fixing this issue. James Quote Link to comment Share on other sites More sharing options...
cxixer Posted November 7, 2006 Share Posted November 7, 2006 Ok, this is kind of an old thread but I just installed this contribution, and now when I go into customers and click edit, there is no info displayed for the customer, and at the top of the page it says this: Warning: reset(): Passed variable is not an array or object in /shop/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /shop/admin/includes/classes/object_info.php on line 18 What is this? Quote Link to comment Share on other sites More sharing options...
Pilly Posted November 7, 2006 Share Posted November 7, 2006 Lo all, Has anyone used this with Individual Shipping Options Contrib?? Im having problems as the Shipping Costs arent being included in the discount... Quote Link to comment Share on other sites More sharing options...
Guest Posted November 8, 2006 Share Posted November 8, 2006 Ahoi @ all, wonderful contrib - works without problems ('til now ;)) Regards Franz Quote Link to comment Share on other sites More sharing options...
kgt Posted November 8, 2006 Author Share Posted November 8, 2006 Thank you for those who have developed this great contribution! I have just installed it, and I wonder is there possibility to give some specific discount, example 20 euros? This is covered in the manual. You should be able to find it as a link from the coupons admin page in the upper right corner. Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
kgt Posted November 8, 2006 Author Share Posted November 8, 2006 Lo all,Has anyone used this with Individual Shipping Options Contrib?? Im having problems as the Shipping Costs arent being included in the discount... This could probably be made to work without too much effort. It would require you to edit includes/classes/discount_coupon.php. You would need to just add the shipping cost to the 'final_price' in the calculate_discount() function. Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
kgt Posted November 8, 2006 Author Share Posted November 8, 2006 Ok, this is kind of an old thread but I just installed this contribution, and now when I go into customers and click edit, there is no info displayed for the customer, and at the top of the page it says this:Warning: reset(): Passed variable is not an array or object in /shop/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /shop/admin/includes/classes/object_info.php on line 18 What is this? Since you're looking under customers, I'd be surprised if this was the cause of the error. This contribution doesn't change either the customers section or the object_info.php file. Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
kgt Posted November 8, 2006 Author Share Posted November 8, 2006 To add to my last post: I also get this message when I run the query in MyPHPadmin - SQL query: ALTER TABLE discount_coupons CHANGE date_start coupons_date_start DATETIME DEFAULT NULL ; MySQL said: #1054 - Unknown column 'date_start' in 'discount_coupons' And every query thereafter except for the final query asked to run in the 2.0 update. Thanks for your help in fixing this issue. James You've probably already made the changes. If you have successfully changed the column date_start to coupons_date_start and you try to run those statements, you would get exactly that error. Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
kgt Posted November 8, 2006 Author Share Posted November 8, 2006 Could we give a customer free shipping if they have a certain coupon code? Not yet. Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
on_way_to_fame Posted November 8, 2006 Share Posted November 8, 2006 This looks like a great contribution..I was just wondering, what does the "Number Available" field refer to? I guess it doesnt mean the number of times it can be used? because that is probably Max used? Or does Max used mean maximum use per customer? Any clarification would really help. Ash Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.