Jump to content

Looking for a solution to receive a string in the gateway from a text set somewhere in the product


Finn

Recommended Posts

I am trying using a custom field in our product with a Drop Down field with only one option so I would expect this option to be the default and be always set for this product. This field can not be changes by the customer when using a Drop Down field with only one option, so this usable.

 

But the custom field parameter does not seem to return the value of the only option set in the Select Options field.

In the product under Custom Fields the following are defined:

 

Field Name : productrule

Field Type : Drop Down

Select Options: dk12e1249

 

In the payment gateway code the following variables are defined as:

 

$customfields = $params['customfields']; # Array of custom field values for the product

$rule = $customfields['productrule'];

 

I would expect $rule to receive the value dk12e1249 but it does not.

 

Does anyone knows why this does not work and how to fix it?

 

It does not make any difference if I define

$rule = $params['customfields']['productrule'];

which I had done originally.

 

Do you have another solution to receive a string in the payment gateway module from a text set somewhere in each product?

Where can I find some good documentation with examples about this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated