1. marko-l
  2. RO CSVI
  3. Friday, 16 November 2018
  4.  Subscribe via email
Hi,
I would like to modify the price during import.

The XML file gives a price for one pack.
You can also buy the item in a carton.
The XML file also indicates the number of packages in the carton.

Now I want to create the article as a whole packaging unit.

Example:
<Item_no> 15421 </ item_no>
<Price> 2.00 </ price>
<Pack_per_unit> 6 </ pack_per_unit>

Now CSVI should multiply the price with pack_per_unit:
6x2.00 = 12.00

Is that possible?

Thanks a lot,
Marko
Accepted Answer Pending Moderation
Hello Marko,
Thank you for your review :)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello,
I wanted to thank you again, for the great support.

Of course, I also submitted a review.

Kind regards,
Marko
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Marko,
Glad to know that patch is working. Please leave us a review on Joomla Extension Directory.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello Tharuna,

wow, now it works,you are the greatest.

Thousand Thanks.

Kind regards,
Marko
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Marko,
Thank you for sending the requested details. Field combine plugin had a condition to check if it is a valid number and then perform the operation. The price to be multiplied had a comma and was not accepted by this condition. I have added code to clean the number before any operation is performed. Can you give a try with the attached modified plugin and check your import? As before you need to install this using Joomla Extension manager.

plg_fieldcombine_modified.zip
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello Tharuna,

Attached are screenshots of the rule and the import preview.
Also a backup of the template and a truncated XML file.

Kind regards,
Marko

csvi_templates_20181121.xml import.xml Screenshot_20181121_105348.png Screenshot_20181121_105429.png
Attachments (4)
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Marko,
Can you post screenshots on how you have your rule setup? What values you see on import preview page? It would also be good if you can send me a backup of your template by going to Maintenance -> CSVI Pro -> Backup template. Post the XML file along with sample of your import file so i can test it with your template.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello Tharuna,
Thank you for your help.

I have the plugin installed and tested.
Unfortunately, it does not multiply.
If I choose "Perform Arithmetic" in "Combine or Operations", only one value will be taken from the two fields. It does not multiply these 2 values.
When I select "only combine" in "Combine or Operations", it combines but not multiply.


Kind regards,
Marko
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Marko,
Performing arithmetic operations on fields is a good addition to CSVI core and so we have extended CSVI Field combine plugin to handle this. Do the following.

1. Load the modified Field combine plugin file using Joomla Extension manager. CSVI Field combine extension will get update by doing so.
2. You can then create a new rule using CSVI Field combine plugin. In your rule, set your Source fields to be price, pack_per_unit fields, Target field as Price, Combine or Operations field as Perform Arithmetic Operation and finally set Perform Operation field to Multiplication.
3. Apply this rule on Price field in your template fields.
4. Run the import.

Kindly note that i have mentioned fields as price, pack_per_unit as per your example but you need to set these fields as per your template fields in your rule.

Test this and let me know on how it goes.

plg_fieldcombine_modified.zip
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello tharuna & rolandd,

yes, I have already tried the margin plugin.
But as you already write, I can only specify the price field, but no further field, just another value.

Would not it be possible to create a patch for this rule, or to change that rule?

As Tharuna already wrote, I can create my own rules.
I've already looked at it, but I do not understand enough of PHP for that.

Could you not help me one last time?

Many Thanks,
Marko
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello Marko,

[strike]Unfortunately the above answer is not completely correct. We do have the Margin plugin, you can use that to apply a margin to a price field on export. Have you tried the Margin plugin?[/strike]

You can't use the Margin plugin as you need to multiply 2 fields.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello Marko,
We do not have any option to perform arithmetic operations on fields. You can either create an override for your import and write custom code to do the multiplication of price or write you rule plugin for the same.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 12
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!