Home › Support › Image Store › hook addition requests
-
AuthorPosts
-
March 13, 2014 at 9:09 am #57092lch503Participant
Hello,
Hope you are well.
I have a couple of requests for additional filter hooks in the image-store. Would you consider these for the next release?
sagepay.php line 199 ( before return when status != OK )
I would like to be able to move the order to the trash when the order fails, so that the client does not see them in the sales unless they are looking at the trash section. At the moment, when the order fails after sagepay, the order and payment status are both set to pending.sales-details.php
I would like to able to add a table row for the custom fields that are used during the sagepay checkout process. At the moment, there are fields such as billing_address that are not viewable in sales-details as these custom fields are not set to appear. I can use the extension I have written if you implement a hook if you could add one in!Many thanks,
Leon
March 17, 2014 at 11:38 pm #57111Xpark MediaKeymasterWill look into, would you be able to test it before is release?
March 19, 2014 at 3:23 am #57121lch503ParticipantThank you,
More than happy to at my usual email address!
Leon
March 31, 2014 at 9:33 pm #70191Xpark MediaKeymasterWe added the hooks in the last release, we hope it will help
April 2, 2014 at 12:55 pm #71892lch503ParticipantGreat! They have indeed!
There is one issue in sagepay.php with the
do_action( ‘ims_sagepay_notice_error’, $ImStore->error, $cartid );
hook.
Note that one on the parameters is $cartid which is not set until after the if statement. Moving the line
$cartid = trim( $crypt_array[‘VendorTxCode’] );
to before the if statement
if( $crypt_array[‘Status’] != ‘OK’ ){
fixes the issue. Apart from that the hooks work great 🙂
Thanks again!
Leon
April 8, 2014 at 12:41 am #78237Xpark MediaKeymasterThank you, we made the change and it will be fix on the next release
April 8, 2014 at 9:42 am #78664lch503ParticipantThanks,
Could you also make the following change to sagepay.php
in the function add_hidden_fields( $output ),
could you add a conditional statement for the lines
$crypt .= ‘BillingState=’ . $data[‘billing_state’] . ‘&’;
and
$crypt .= ‘DeliveryState=’ . $data[‘address_state’] . ‘&’;
as these are only required for the US, at the moment I must comment these out after every release.
So, for example in psuedocode
if ( currency = US dollars ) $crypt .= ‘BillingState=’ . $data[‘billing_state’] . ‘&’;
and
if ( currency = US dollars ) $crypt .= ‘DeliveryState=’ . $data[‘address_state’] . ‘&’;
Thanks!
April 26, 2014 at 11:35 pm #98437Xpark MediaKeymasterthe values were added, but the data has changed to an array to allow other plugins to remove, change or add values.
The new filter(hook) name will be ‘ims_sage_crypt_data’
-
AuthorPosts
- You must be logged in to reply to this topic.