Using Transaction custom fields from a Scrip

Hi,

I’m currently developing a scrip which is meant to act based on a custom
field on the transaction, however it appears that at the point the scrip
is fired, the transaction’s custom fields havn’t been saved yet.

It may be that I just need to find a different way to deal with this
problem, but I was wondering if that is considered a bug, or just how
things work.

Cheers,

Jon Wood

Hi,

I’m currently developing a scrip which is meant to act based on a
custom
field on the transaction, however it appears that at the point the
scrip
is fired, the transaction’s custom fields havn’t been saved yet.

It may be that I just need to find a different way to deal with this
problem, but I was wondering if that is considered a bug, or just how
things work.

It’s a longstanding design issue. The “right” fix would be very, very
invasive. I believe that if you move your new scrip to the
TransactionBatch stage, things will work out for you.

-j

Hi,

I’m currently developing a scrip which is meant to act based on a
custom
field on the transaction, however it appears that at the point the
scrip
is fired, the transaction’s custom fields havn’t been saved yet.

It may be that I just need to find a different way to deal with this
problem, but I was wondering if that is considered a bug, or just how
things work.

It’s a longstanding design issue. The “right” fix would be very, very
invasive. I believe that if you move your new scrip to the
TransactionBatch stage, things will work out for you.

Thanks - that’s exactly what I was looking for, and actually resulted in
nicer code then I had anyway.

-j

Cheers,

Jon Wood


List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Jon Wood
SYSTEMS DEVELOPER

Claranet Limited
21 Southampton Row
London - WC1B 5HA
United Kingdom

+44 (0)20 7685 8643
jonathan.wood@uk.clara.net

Company registration no: 3152737
Place of registration: England

All the information contained within this this electronic message from
Claranet Ltd is covered by the disclaimer at

Thanks for the resource. I see you are promoting Claranet hosting service which is operational in UK. Seems like a fun thing to me. However, I was wondering if you could be able to give me some more insights about the host.
You see, I have an ecommerce store which is currently hosted on Cloudways. I opted it because it provides managed magento hosting provider. So, what I know about Claranet is are they providing considering magento website hosting service.