centrios40 Posted October 22, 2008 Posted October 22, 2008 this error is reference to the Credit Class & Gift Voucher Contribution: http://addons.oscommerce.com/info/282 any help will be much appreciated. thanks in advance so i've installed this, and i'm testing it, i'v already had some errors before this, so i'm dealing with as i go along. As you can see i didn't get far. I just added an item to my cart, and was headed toward check out. right before checkout (where u see all ur products) i get this error Fatal error: Call to a member function calculate_price() on a non-object in /home2/ghillieg/public_html/includes/classes/shopping_cart.php on line 249 This is what the installation tells me to do: 12) catalog/includes/classes/shopping_cart.php Right Below: $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } (around line 295) Add: // Start - CREDIT CLASS Gift Voucher Contribution $this->total_virtual += $currencies->calculate_price($products_price, $products_tax, $qty * $no_count); $this->weight_virtual += ($qty * $products_weight) * $no_count; // End - CREDIT CLASS Gift Voucher Contribution This is what I have: products_id = '" . (int)$products_id . "'"); $gv_result = tep_db_fetch_array($gv_query); if (ereg('^GIFT', $gv_result['products_model'])) { $no_count = 0; } $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } $this->total_virtual += $currencies->calculate_price($products_price, $products_tax, $qty * $no_count); $this->weight_virtual += ($qty * $products_weight) * $no_count; $this->total += tep_add_tax($products_price, $products_tax) * $qty; $this->weight += ($qty * $products_weight); } // attributes price if (isset($this->contents[$products_id]['attributes'])) {
FIMBLE Posted October 22, 2008 Posted October 22, 2008 The lines are a guide and not always spot on depending on an other contributions added. Have you searched the page for the text? By the look of that you already have a gift contribution installed? Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
centrios40 Posted October 22, 2008 Author Posted October 22, 2008 The lines are a guide and not always spot on depending on an other contributions added.Have you searched the page for the text? By the look of that you already have a gift contribution installed? I understand the line suggestion is just a guide, and if take a look i did install the lines in the correct place. anyways. I don't think i do have a gift contribution installed, other than this. in my admin, there are four links under "Vouchers/Coupons" which wasn't there before, there are errors for each section. when you click on: "Coupon Admin" you get this error: 1146 - Table 'ghillieg_datbase1.coupons' doesn't exist select count(*) as total from coupons where coupon_active='Y' and coupon_type != 'G' "Gift Voucher Queue" you get this error: 1146 - Table 'ghillieg_datbase1.coupon_gv_queue' doesn't exist select c.customers_firstname, c.customers_lastname, gv.unique_id, gv.date_created, gv.amount, gv.order_id from customers c, coupon_gv_queue gv where (gv.customer_id = c.customers_id and gv.release_flag = 'N') "Gift Vouchers sent" you get this error: 1146 - Table 'ghillieg_datbase1.coupons' doesn't exist select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, c.coupon_id from coupons c, coupon_email_track et where c.coupon_id = et.coupon_id nowhere in the installation file does it take about mysql database stuff. ADDITIONALLY when i go to Modules>Payment> I see "Credit Class Error", and where the install button is, i get: "Credit Class Error, needed with Gift Voucher"
centrios40 Posted October 22, 2008 Author Posted October 22, 2008 UPDATE i was able to remove errors in "Vouchers/Coupons", i didn't run the mysql file. oooppps mybad. now i still can't figure out that error when you checkout, im assuming it has something to do with adding up the total
centrios40 Posted October 22, 2008 Author Posted October 22, 2008 im going through the test, finding errors and trying to solve as i see them, but not now i get this error: Parse error: syntax error, unexpected T_STRING in /home2/ghillieg/public_html/includes/classes/payment.php on line 89 this was step 11) catalog/includes/classes/payment.php in the installation process. i had to Replace the whole fuction: (staring at about line 80) function javascript_validation() { $js = ''; if (is_array($this->modules)) { $js = '<script language="javascript"><!-- ' . "\n" . 'function check_form() {' . "\n" . ' var error = 0;' . "\n" . ' var error_message = "' . JS_ERROR . '";' . "\n" . ' var payment_value = null;' . "\n" . ' if (document.checkout_payment.payment.length) {' . "\n" . ' for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" . ' if (document.checkout_payment.payment[i].checked) {' . "\n" . ' payment_value = document.checkout_payment.payment[i].value;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' } else if (document.checkout_payment.payment.checked) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' } else if (document.checkout_payment.payment.value) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' }' . "\n\n"; reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $js .= $GLOBALS[$class]->javascript_validation(); } } $js .= "\n" . ' if (payment_value == null) {' . "\n" . ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n\n" . ' if (error == 1) {' . "\n" . ' alert(error_message);' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '//--></script>' . "\n"; } return $js; } (around line 80) WITH // Start - CREDIT CLASS Gift Voucher Contribution // function javascript_validation() { function javascript_validation($coversAll) { //added the $coversAll to be able to pass whether or not the voucher will cover the whole //price or not. If it does, then let checkout proceed when just it is passed. $js = ''; if (is_array($this->modules)) { if ($coversAll) { $addThis='if (document.checkout_payment.cot_gv.checked) { payment_value='cot_gv'; } else '; } else { $addThis=''; } // End - CREDIT CLASS Gift Voucher Contribution $js = '<script language="javascript"><!-- ' . "\n" . 'function check_form() {' . "\n" . ' var error = 0;' . "\n" . ' var error_message = "' . JS_ERROR . '";' . "\n" . // Start - CREDIT CLASS Gift Voucher Contribution ' var payment_value = null;' . "\n" .$addThis . // End - CREDIT CLASS Gift Voucher Contribution ' if (document.checkout_payment.payment.length) {' . "\n" . ' for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" . ' if (document.checkout_payment.payment[i].checked) {' . "\n" . ' payment_value = document.checkout_payment.payment[i].value;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' } else if (document.checkout_payment.payment.checked) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' } else if (document.checkout_payment.payment.value) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' }' . "\n\n"; reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $js .= $GLOBALS[$class]->javascript_validation(); } } // Start - CREDIT CLASS Gift Voucher Contribution // $js .= "\n" . ' if (payment_value == null) {' . "\n" . $js .= "\n" . ' if (payment_value == null && submitter != 1) {' . "\n" . // CCGV Contribution ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n\n" . // ' if (error == 1) {' . "\n" . ' if (error == 1 && submitter != 1) {' . "\n" . // End - CREDIT CLASS Gift Voucher Contribution ' alert(error_message);' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '//--></script>' . "\n"; } return $js; } line 89 is this (in bold): // Start - CREDIT CLASS Gift Voucher Contribution // function javascript_validation() { function javascript_validation($coversAll) { //added the $coversAll to be able to pass whether or not the voucher will cover the whole //price or not. If it does, then let checkout proceed when just it is passed. $js = ''; if (is_array($this->modules)) { if ($coversAll) { $addThis='if (document.checkout_payment.cot_gv.checked) { [b] payment_value='cot_gv';[/b] } else '; } else { $addThis=''; } // End - CREDIT CLASS Gift Voucher Contribution
centrios40 Posted October 23, 2008 Author Posted October 23, 2008 does anyone have a solution this is contribution. im trying to get my store functional, and i know as soon as i solve this error, there will be a new one as soon as i refresh the page... thanks
centrios40 Posted October 23, 2008 Author Posted October 23, 2008 anyone? i really want this solved, because im just sitting around till this gets resolved. i know someone knows how to solve this out there?
crazy_r Posted November 7, 2008 Posted November 7, 2008 help, please! I know the feeling. I've got the same error.
crazy_r Posted November 7, 2008 Posted November 7, 2008 anyone? i really want this solved, because im just sitting around till this gets resolved. i know someone knows how to solve this out there? I found the problem and solved it. I seems like that bug "CCGV5.19 bug fix2" has been undo. You need to change payment_value='cot_gv'; to payment_value=cot_gv; alert ('hey yo'); This solved my problem :D
clintonb Posted November 8, 2008 Posted November 8, 2008 $addThis="if (document.checkout_payment.cot_gv.checked) { payment_value='cot_gv'; } else ";
minipassat Posted October 7, 2009 Posted October 7, 2009 this error is reference to the Credit Class & Gift Voucher Contribution: http://addons.oscommerce.com/info/282 any help will be much appreciated. thanks in advance so i've installed this, and i'm testing it, i'v already had some errors before this, so i'm dealing with as i go along. As you can see i didn't get far. I just added an item to my cart, and was headed toward check out. right before checkout (where u see all ur products) i get this error Fatal error: Call to a member function calculate_price() on a non-object in /home2/ghillieg/public_html/includes/classes/shopping_cart.php on line 249 This is what the installation tells me to do: 12) catalog/includes/classes/shopping_cart.php Right Below: $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } (around line 295) Add: // Start - CREDIT CLASS Gift Voucher Contribution $this->total_virtual += $currencies->calculate_price($products_price, $products_tax, $qty * $no_count); $this->weight_virtual += ($qty * $products_weight) * $no_count; // End - CREDIT CLASS Gift Voucher Contribution This is what I have: products_id = '" . (int)$products_id . "'"); $gv_result = tep_db_fetch_array($gv_query); if (ereg('^GIFT', $gv_result['products_model'])) { $no_count = 0; } $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } $this->total_virtual += $currencies->calculate_price($products_price, $products_tax, $qty * $no_count); $this->weight_virtual += ($qty * $products_weight) * $no_count; $this->total += tep_add_tax($products_price, $products_tax) * $qty; $this->weight += ($qty * $products_weight); } // attributes price if (isset($this->contents[$products_id]['attributes'])) { Hello, I have this issue too. I install Fast Easy Checkout V1.6 module (with purchase account version) with CCGV (29 Aug 2009 by chibibotoons90 ). I was able to creadt a coupone code and send it to my email. From my email I click the coupone code to redeem the coupon. After click shopping_cart, I got this same error message. Have you resolve this issue? Could you share how you did it? Thank you very much!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.