1. nkarner
  2. RO CSVI
  3. Friday, 03 April 2020
  4.  Subscribe via email
Hi,

I want update an (virtuemart-)order status in dependency of it's status in database.
e.g an order with status "A" should be set to "B",
and an order with status "C" should be set to "D"


My idea: Import: import custom-table with 2 fields - order number and status,
and a rule for replacement ot the status-field.
I tried conditional, compare - but I had no sucess.

Is it possible to solve this problem with rules?

Best regards,
Norbert
Accepted Answer Pending Moderation
Hello Norbert,
Can you share a screenshot of your Conditional rule? I tried a rule like the attached screenshot and it does work.

My idea: Import: import custom-table with 2 fields - order number and status,

VirtueMart has only few order status so i think you don't need to have a custom table. You can have one Conditional rule to replace multiple order status.
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. # 1
Accepted Answer Pending Moderation
Hi Tharuna,
I have now tried an import of virtuemart-order,
with 2 fields: virtuemart_order_id and order_status,

for order_status I defined a rule like yours, exceptionally that I used only "X" and "U" as order_status (like it is saved in database) instead af the full name (cancelled, confirmed,...)

but the field order-status is always set to the value of the input-file - "X"

The input-file looks like this:

5925;X
7177;X
5315;X

In the log-file (see attatched) I can't find anything concerning the rule I have definded for the field order_status

What I'm doing wrong?

Best regards
Norbert
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Norbert,
As per the screenshot you have the conditional rule created for finding value U and replace it with Y but in your import file you have value X for order_status and so the rule is not working. Change the Value U to X in your rule and check the import.
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,
ok in this way

So unfortunately my problem is for example

set the order_status to "X" then it is "U" in the database (update virtuemart_orders set order_status = 'X' where order_status='U')

So the import (update) should depend on the old value of order_status in the database

Is this possible?

Best regards
Norbert
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Norbert,
RO CSVI cannot update values based on what is stored in database but can process values based on import file. What you can do is export the order status using VirtueMart Order export template and either correct the values in export file or use the Conditional rule to correct the order status on import and import the export file using VirtueMart Order import 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. # 5
  • Page :
  • 1


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