sandwick Posted January 28, 2009 Share Posted January 28, 2009 I migrated my Oscommerce site from mysql 3.23 to 5 PHP 4.4 to 4.9 and now I get the following errer can anyone tell me how to resolve this issue, see image for error! The error happens during the Checkout_process.php and accessing the scripts listed in the error. any help or directions would be appreciated !!! Link to comment Share on other sites More sharing options...
juniorprg Posted January 28, 2009 Share Posted January 28, 2009 check in your currencies section in admin panel under localization l8ter Link to comment Share on other sites More sharing options...
sandwick Posted January 28, 2009 Author Share Posted January 28, 2009 When I check in ADMIN/LOCALIZATION I have USD set to 1, what am I looking for ? I have only one currency available which is USD with a value of 1 Link to comment Share on other sites More sharing options...
juniorprg Posted January 28, 2009 Share Posted January 28, 2009 ok in your error its referring to display_price function in the currencies.php page the display_price is looking for 3 arguments function display_price($products_price, $products_tax, $quantity = 1) { //yours may vary now in checkout_process.php you should be able to see this line $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"; again your codes may vary but this will give you some idea l8ter Link to comment Share on other sites More sharing options...
sandwick Posted January 29, 2009 Author Share Posted January 29, 2009 I do have the following code listed below in my OScommerce setup. $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"; and function display_price($products_price, $products_tax, $quantity = 1) { return $this->format($this->calculate_price($products_price, $products_tax, $quantity)); } We do not TAX our items on the web site, can I change the Function call to this and not affect anything or have it not check for the 2 argument? Or can I just remove display price from checkout_process ? function display_price($products_price, $products_tax =1 , $quantity = 1) { return $this->format($this->calculate_price($products_price, $products_tax, $quantity)); } Thanks // Larry Link to comment Share on other sites More sharing options...
sandwick Posted January 30, 2009 Author Share Posted January 30, 2009 Any help here ? Link to comment Share on other sites More sharing options...
CybrWzrd7 Posted February 12, 2009 Share Posted February 12, 2009 I switched the php server and mysql server also and am now dealing with that same issue. unfortunately i still cannot figure out a solution. I removed the display_price from the checkout_process file and checkout_process worked fine without getting that error. BUT - having the price on the emailed response is sort of a necessary feature. Any expert help in regards to this subject would be much appreciated. Thank You In Advance Link to comment Share on other sites More sharing options...
sandwick Posted February 12, 2009 Author Share Posted February 12, 2009 Because we do not use TAX on are web site and I could not get any help from this forum, I managed to munge the code into working for me! I really wish I could fix it the right way. This is the piece of code that fails for what ever reason . . . in currencies.php function display_price($products_price, $products_tax, $quantity = 1) { return $this->format($this->calculate_price($products_price, $products_tax, $quantity)); } and changed it to the following !!! function display_price($products_price, $products_tax = 1, $quantity = 1) { return $this->format($this->calculate_price($products_price, $products_tax, $quantity)); } I do not know if this will fix your problem, but for now this has resolved mine, I hope this help you out !!! Link to comment Share on other sites More sharing options...
CybrWzrd7 Posted February 12, 2009 Share Posted February 12, 2009 Thank you very much for your solution to this issue! That was a much easier and much better solution to my problem than what i had come up with. I also do not use tax so therefore setting the products_tax =1 was the perfect solution. I tried to define $products_tax = 1; elsewhere but that did not work didnt even think to add that to the display_price() on currencies class. My own personal solution to this problem prior to your assistance was editing checkout_process.php original $products_ordered .= $order->products[$i]['name'] . ' - Qty. ' . $order->products[$i]['qty'] . ' x ' . $currencies->display_price($order->products[$i]['price'] ) . ' Each = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n"; } which was refering to the currencies class display_price() function and changing it to $products_ordered .= $order->products[$i]['name'] . ' - Qty. ' . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['price'] . ' Each = ' . $order->products[$i]['final_price'] . $products_ordered_attributes . "\n"; } Both ways work - BUT your solution is much better and way more friendly with other currency contributions I am sure. Major kudos to you and your your intelligence. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.