× [JOOMLA 2.5 IS NO LONGER SUPPORTED]
Looking for a useful answer?

Read this first and make sure you checked all steps: www.csvimproved.com/frequently-asked-questions/635-troubleshooting-import-errors

Don't just say it doesn't work but describe in detail what is happening and add the following information:
* VirtueMart version
* CSVI version (Latest is not a version number)
* Sample of the file being imported
* Collected debug information

Without this information you won't get a useful answer. If no debug log is attached, you will get a request to post it.

Where to get the debug information?

A tutorial ( www.csvimproved.com/frequently-asked-questions/390-how-to-collect-debug-information ) has been written to help you collect your debug information.

Order report for each manufacturer

More
3 years 4 months ago #47082 by rolandd
rolandd replied the topic: Order report for each manufacturer
Hello Francesco,

Did I do something wrong?

You have the field product_item_price twice, so that may be the cause why it is applied twice. Why is this field there twice?

Kind regards,

RolandD

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory

Please Log in or Create an account to join the conversation.

  • studiocurci
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
3 years 4 months ago #47087 by studiocurci
studiocurci replied the topic: Order report for each manufacturer
Hi Rolandd,
I need the product item price and the commission calculated on it for manufacturers.
Unfortunatly nothing changes if I delete the product_item_price without rules, in other words if I only use once product_item_price using the replacement and if I write str_ireplace(',', '.', '\1')*3, having the original value as 1, I still have as result 900
If I write str_ireplace(',', '.', '\1')*sqrt(3)
I have as result in Openoffice '2.99644789709420 (please note the apostrophe before 2)
I have as result in Note Pad 2.99644789709420 (without apostrophe before 2)

In any case 2.996... or '2.966... are ok because If in Openoffice I find a replace . with , the apostrophe disappears.
The conclusion is I still have an export that applies the rule twice

I made a test replacement using the method regular text and the rule was applied once (correct).
I made a test replacement using str_ireplace('a', 'aa', '\1') and it works fine
Only str_ireplace(',', '.', '\1')*3 is applied twice.
I also made this test: one filed simple export, then I add the same field but at the second one I applied the rule str_ireplace('e', 'u', '\1') and it worked fine, it was applied only once.

If you think i did not make mistakes and there is no solution for it I will use this function sqrt().

In another of your kind answers to me you said after str_ireplace(',', '.', '\1')*1.70 I have to replace the result to convert again . as ,
I apply the second rule str_ireplace('.', ',', '\1') to the field product_item_price but the result is rounded
If I don' apply the second rule I have this correct number (it is a real case) 26.2279309134370
If apply the second rule to convert again . in , I have this wrong number 25,9306768134

You are the Guru :-) please let me know your opinion and if you have suggestions?

Many thanks
Francesco

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #47090 by rolandd
rolandd replied the topic: Order report for each manufacturer
Hello Francesco,

You are the Guru

You are talking to the wrong guy when it comes to regular expressions :silly:

What I do know is that all this has been removed in PHP 7, so we can't use it at all anymore there. I also know that in CSVI 6, there is a rules plugin to do these kind of operations.

So in your case if sqrt() works for you, just use that.

Kind regards,

RolandD

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory

Please Log in or Create an account to join the conversation.

  • studiocurci
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
3 years 4 months ago #47094 by studiocurci
studiocurci replied the topic: Order report for each manufacturer
Thank you Rolandd
Best regards
Francesco

Please Log in or Create an account to join the conversation.