Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

function format_raw(. problems


Recommended Posts

hi 

I am trying to use this function in the admin section. I have moved it to the currencies.php in the admin section but it still don't work. any idea as to why?

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

thanks. everything works now. I have the discount code working exactly as it is supposed to do using its own function.

I am also working to do the points and rewards and ccgv it should be easy now. 

 

i

 

 

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...