Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

function format_raw(. problems


Recommended Posts

Posted

For a constructive response you'll need to supply more information about what you've done, what the results are, what version (and presumably customisation) you are using etc etc. Otherwise, I'm reduced to telling you: it's not working cos you're doing it wrong! 😛

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Posted

I am trying to use the functions of discount_codes in order_editor.  

this function is not in the currencies class in the admin section. it is available in the catalog section so I copied it to the admin side

$global_tax_correction = $this->format_raw($order->products[$i]['qty']*(( $order->products[$i]['final_price']/$order->info['subtotal'])*$discount)+(($order->products[$i]['qty']* $order->products[$i]['final_price']/$order->info['subtotal'])*$discount) * ($order->products[$i]['tax'] / 100));
                     

this line dose not work, if I remove the format _raw I get the result and it works .

Phoenix latest order editor php7.2 

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Posted

If the same line of code works in one place and not the other then the context is likely different.

Perhaps $currency is not set

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Posted

Ok thanks, this problem solved. Now it correctly calculates the value of the order and tax and almost ready. Only one issue remaining and that is to figure out the discount code that the customer used in the original order.  If it has to be changed I need that number to adjust the discount codes table.

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...