1. Comenaranjas
  2. RO CSVI
  3. Wednesday, 01 February 2017
  4.  Subscribe via email
Hi, I have a sneaky one here.

I wonder if I'm not using all the posibilities of CSVI to manage this one or maybe is not possible.

Can CSVI with its plugins show values depending on conditions? I mean, replace values depending on the value of another field.

I guess an example would make it clearer.

So this is an export order template with fields:

19 order_total
20 custom
21 virtuemart_paymentmethod_id
22 virtuemart_paymentmethod_id
24 virtuemart_shipmentmethod_id


The "order total" value we need to show it only when the payment method is cash on delivery (virtuemart_paymentmethod_id= 1 in our case) for all the other payment methods the "order_total" should be empty. We do it this way cause the export template is for the shipping company and they only need the order total when is a cash on delivery.

Regards
Accepted Answer Pending Moderation
Hello,
Again there is no direct way of doing this but it is possible by writing an override file for order export. In order export override file look for case statement for order_total (around line 1176) and put a condition like if ($fieldname === 'order_total'){....} as there are other field included and inside this you can write a query to select the virutuemart_payment_id for that particular virtuemart_order_id. If the result of the query returns value other than 1, you can simply make the field show empty like $fieldvalue ='';.
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,

We don't have conditional replacements, however apart from coding your own override, you could also write your own rule plugin to do this.
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. # 2
Accepted Answer Pending Moderation
Hi, wouldn't a plugin be enough to allow this modification?

I believe you guys don't do custom developments no?

I have no coding abilities so if ill wait to see if someone else ever requests conditional replacements.

Regards
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,

We don't do custom developments. As I said, you can do it with a replacement plugin. Let's see what the future holds :)
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. # 4
  • Page :
  • 1


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